-
-
Save hh/6c3fd97e32f3c4e135d5a73c1d29dfc4 to your computer and use it in GitHub Desktop.
Build Docker image of Kubernetes E2E tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -x | |
set -euo pipefail | |
echo "Building conformance image..." | |
echo | |
APT_PACKAGES="rsync" | |
# build docker image of repository | |
docker build -t "${IMAGE_NAME}:${IMAGE_TAG}" - <<EOF | |
FROM golang:1.8 | |
# install conformance dependencies | |
RUN apt-get update && apt-get install -y ${APT_PACKAGES} && rm -rf /var/lib/apt/lists/* | |
# clone conformance repository | |
RUN mkdir -p \${GOPATH}/src/k8s.io && git clone --branch ${CONFORMANCE_TAG} --depth 1 https://${CONFORMANCE_REPO} \${GOPATH}/src/k8s.io/kubernetes | |
WORKDIR \${GOPATH}/src/k8s.io/kubernetes | |
# install build dependencies | |
RUN go get -u github.com/jteeuwen/go-bindata/go-bindata | |
# build all test dependencies | |
RUN GOLDFLAGS="--s -w" make all WHAT="cmd/kubectl vendor/github.com/onsi/ginkgo/ginkgo test/e2e/e2e.test" | |
ENV TEST_FLAGS="-v --test --check-version-skew=false --test_args=--ginkgo.focus=\[Conformance\]" | |
CMD HOME=/go/src/k8s.io/kubernetes KUBECONFIG=/kubeconfig KUBE_OS_DISTRIBUTION=coreos KUBERNETES_CONFORMANCE_TEST=Y go run hack/e2e.go -- \${TEST_FLAGS} | |
EOF | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment