From 50fd1bcfe4af334dd0de6af3d6047d2ba6e9fee0 Mon Sep 17 00:00:00 2001 From: Chris McClimans Date: Fri, 26 May 2017 04:49:23 +1200 Subject: [PATCH 01/17] create ci-master .gitlab-ci.yml --- .gitlab-ci.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000..751ba6929f2a4 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,37 @@ +image: docker:17.05.0 +stages: + - build +before_script: + - apk update + - apk add bash tar rsync git curl make file + - sed -i -e '/ linux\/arm/ s/^/#/' hack/lib/golang.sh + - sed -i -e '/ linux\/s390/ s/^/#/' hack/lib/golang.sh + - sed -i -e '/ linux\/386/ s/^/#/' hack/lib/golang.sh + - sed -i -e '/ linux\/ppc64le/ s/^/#/' hack/lib/golang.sh + - sed -i -e '/ darwin\/amd64/ s/^/#/' hack/lib/golang.sh + - sed -i -e '/ darwin\/386/ s/^/#/' hack/lib/golang.sh + - sed -i -e '/ windows\/386/ s/^/#/' hack/lib/golang.sh + - sed -i -e '/ windows\/amd64/ s/^/#/' hack/lib/golang.sh + - sed -i -e 's/kube::release::package_tarballs//g' ./build/release.sh +build: + stage: build + variables: + KUBE_DOCKER_REGISTRY: "${CI_REGISTRY_IMAGE}" + KUBE_DOCKER_IMAGE_TAG: "${CI_COMMIT_REF_SLUG}.job.${CI_JOB_ID}" + KUBE_RELEASE_RUN_TESTS: "n" + KUBE_FASTBUILD: "false" + KUBE_VERBOSE: "0" + FEDERATION: "false" + script: + - ./build/release.sh || sleep 99999 + - docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" $CI_REGISTRY + - docker push "$CI_REGISTRY_IMAGE/hyperkube-amd64:$KUBE_DOCKER_IMAGE_TAG" + - cp -a _output/dockerized/bin/linux/amd64 linux-amd64 + - echo export TF_VAR_kubelet_image_url="$CI_REGISTRY_IMAGE/hyperkube-amd64" > ci.vars + - echo export TF_VAR_kubelet_image_tag="$KUBE_DOCKER_IMAGE_TAG" >> ci.vars + artifacts: + name: "${CI_JOB_NAME}.${CI_PIPELINE_ID}.${CI_JOB_ID}" + expire_in: 1 weeks + paths: + - ci.vars + - linux-amd64 From 05ac213bd46bd6f6ce9101d35c4d0ec6b2991a4b Mon Sep 17 00:00:00 2001 From: Chris McClimans Date: Mon, 5 Jun 2017 14:22:17 +1200 Subject: [PATCH 02/17] update ci-master gitlab-ci.yml --- .gitlab-ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 751ba6929f2a4..f2bc56a59001b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,9 +29,23 @@ build: - cp -a _output/dockerized/bin/linux/amd64 linux-amd64 - echo export TF_VAR_kubelet_image_url="$CI_REGISTRY_IMAGE/hyperkube-amd64" > ci.vars - echo export TF_VAR_kubelet_image_tag="$KUBE_DOCKER_IMAGE_TAG" >> ci.vars + - echo export KUBERNETES_IMAGE="$CI_REGISTRY_IMAGE/hyperkube-amd64" > release.vars + - echo export KUBERNETES_TAG="$KUBE_DOCKER_IMAGE_TAG" >> release.vars + - cat release.vars artifacts: name: "${CI_JOB_NAME}.${CI_PIPELINE_ID}.${CI_JOB_ID}" expire_in: 1 weeks paths: - ci.vars + - release.vars - linux-amd64 + +build-e2e: + stage: build + variables: + KUBE_DOCKER_REGISTRY: "${CI_REGISTRY_IMAGE}" + KUBE_DOCKER_IMAGE_TAG: "${CI_COMMIT_REF_SLUG}.job.${CI_JOB_ID}" + script: + - docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" $CI_REGISTRY + - docker build -t "$CI_REGISTRY_IMAGE/kubernetes-e2e:$KUBE_DOCKER_IMAGE_TAG" ./e2e/ + - docker push "$CI_REGISTRY_IMAGE/kubernetes-e2e:$KUBE_DOCKER_IMAGE_TAG" From 894d879400bb3b23e998a9b35b9f1c442f5e87f5 Mon Sep 17 00:00:00 2001 From: Chris McClimans Date: Mon, 5 Jun 2017 14:49:25 +1200 Subject: [PATCH 03/17] Use release.env instead of release.vars --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f2bc56a59001b..1a9c063073dac 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,15 +29,15 @@ build: - cp -a _output/dockerized/bin/linux/amd64 linux-amd64 - echo export TF_VAR_kubelet_image_url="$CI_REGISTRY_IMAGE/hyperkube-amd64" > ci.vars - echo export TF_VAR_kubelet_image_tag="$KUBE_DOCKER_IMAGE_TAG" >> ci.vars - - echo export KUBERNETES_IMAGE="$CI_REGISTRY_IMAGE/hyperkube-amd64" > release.vars - - echo export KUBERNETES_TAG="$KUBE_DOCKER_IMAGE_TAG" >> release.vars - - cat release.vars + - echo export KUBERNETES_IMAGE="$CI_REGISTRY_IMAGE/hyperkube-amd64" > release.env + - echo export KUBERNETES_TAG="$KUBE_DOCKER_IMAGE_TAG" >> release.env + - cat release.env artifacts: name: "${CI_JOB_NAME}.${CI_PIPELINE_ID}.${CI_JOB_ID}" expire_in: 1 weeks paths: - ci.vars - - release.vars + - release.env - linux-amd64 build-e2e: From cd06bb882cc00c903b1c8eb39282dee6b712668a Mon Sep 17 00:00:00 2001 From: Chris McClimans Date: Mon, 5 Jun 2017 15:05:59 +1200 Subject: [PATCH 04/17] add e2e to ci-master --- e2e/Dockerfile | 16 ++++++++++++++++ e2e/files/Makefile | 24 ++++++++++++++++++++++++ e2e/files/run-conformance.sh | 19 +++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 e2e/Dockerfile create mode 100644 e2e/files/Makefile create mode 100755 e2e/files/run-conformance.sh diff --git a/e2e/Dockerfile b/e2e/Dockerfile new file mode 100644 index 0000000000000..27145154ed2d1 --- /dev/null +++ b/e2e/Dockerfile @@ -0,0 +1,16 @@ +FROM golang:1.7 +MAINTAINER "Denver Williams " + +# Install Deps +RUN apt-get update \ +&& apt-get install -y rsync + + +# Copy Files +COPY files/ /kubernetes/e2e/ + +WORKDIR /kubernetes/e2e + +RUN make build-conformance + +CMD ["/bin/bash"] diff --git a/e2e/files/Makefile b/e2e/files/Makefile new file mode 100644 index 0000000000000..01c39c4cb46de --- /dev/null +++ b/e2e/files/Makefile @@ -0,0 +1,24 @@ +KUBERNETES_VERSION=v1.6.3 +GOOS=$(shell go env GOOS) +GOPATH=$(shell go env GOPATH) +KUBERNETES_SRC=$(GOPATH)/src/k8s.io/kubernetes + +build-conformance: kubernetes build-tests kubectl ginkgo + +kubernetes: + git clone https://github.com/kubernetes/kubernetes + mkdir -p $(GOPATH)/src/k8s.io + mv kubernetes $(KUBERNETES_SRC) + cd $(KUBERNETES_SRC) && git checkout $(KUBERNETES_VERSION) + +build-tests: + cd $(KUBERNETES_SRC) && make WHAT=test/e2e/e2e.test + +kubectl: + cd $(KUBERNETES_SRC) && make WHAT=cmd/kubectl + +ginkgo: + go get github.com/onsi/ginkgo/ginkgo + mkdir -p $(KUBERNETES_SRC)/_output/bin + cp $(shell go env GOPATH)/bin/ginkgo $(KUBERNETES_SRC)/_output/bin/ginkgo + diff --git a/e2e/files/run-conformance.sh b/e2e/files/run-conformance.sh new file mode 100755 index 0000000000000..5235c90b8ec0d --- /dev/null +++ b/e2e/files/run-conformance.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +set -e + +# Run conformance test +# export KUBECONFIG=/cncf/data/aws-mvci-stable/kubeconfig +export KUBERNETES_CONFORMANCE_TEST=y +export KUBERNETES_PROVIDER=skeleton + +# Run all conformance tests +cd $GOPATH/src/k8s.io/kubernetes +go run hack/e2e.go -v --test --test_args="--ginkgo.focus=\[Conformance\]" + +# Run all parallel-safe conformance tests in parallel +GINKGO_PARALLEL=y go run hack/e2e.go -v --test --test_args="--ginkgo.focus=\[Conformance\] --ginkgo.skip=\[Serial\]" + +# ... and finish up with remaining tests in serial +go run hack/e2e.go -v --test --test_args="--ginkgo.focus=\[Serial\].*\[Conformance\]" + From 96cce19b7f1e5b2f25ce39aaaa6f5cf01f4fd41d Mon Sep 17 00:00:00 2001 From: Chris McClimans Date: Fri, 23 Jun 2017 12:29:31 -0500 Subject: [PATCH 05/17] Update k8s builds to rebuild cross-cloud --- .gitlab-ci.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1a9c063073dac..224a02b321b36 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,8 @@ image: docker:17.05.0 stages: - build + - release + before_script: - apk update - apk add bash tar rsync git curl make file @@ -13,6 +15,7 @@ before_script: - sed -i -e '/ windows\/386/ s/^/#/' hack/lib/golang.sh - sed -i -e '/ windows\/amd64/ s/^/#/' hack/lib/golang.sh - sed -i -e 's/kube::release::package_tarballs//g' ./build/release.sh + build: stage: build variables: @@ -49,3 +52,29 @@ build-e2e: - docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" $CI_REGISTRY - docker build -t "$CI_REGISTRY_IMAGE/kubernetes-e2e:$KUBE_DOCKER_IMAGE_TAG" ./e2e/ - docker push "$CI_REGISTRY_IMAGE/kubernetes-e2e:$KUBE_DOCKER_IMAGE_TAG" + - echo export KUBERNETES_E2E_IMAGE="$CI_REGISTRY_IMAGE/kubernetes-e2e" > e2e.env + - echo export KUBERNETES_E2E_TAG="$KUBE_DOCKER_IMAGE_TAG" >> e2e.env + artifacts: + name: "${CI_JOB_NAME}.${CI_PIPELINE_ID}.${CI_JOB_ID}" + expire_in: 1 weeks + paths: + - e2e.env + + +release: + stage: release + script: + - cat e2e.env + - cat release.env + - curl -X POST + -F token=$CI_JOB_TOKEN + -F ref=ci-master + https://gitlab.cncf.ci/api/v4/projects/2/trigger/pipeline + artifacts: + name: "${CI_JOB_NAME}.${CI_PIPELINE_ID}.${CI_JOB_ID}" + expire_in: 1 weeks + paths: + - ci.vars + - release.env + - e2e.env + - linux-amd64 From 4f1cbdb0722205e0791fea85e83d8da35aded814 Mon Sep 17 00:00:00 2001 From: Chris McClimans Date: Fri, 23 Jun 2017 12:46:19 -0500 Subject: [PATCH 06/17] Remove k8s binaries from release We only want the *env files for now --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 224a02b321b36..f64f73d274ab3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -77,4 +77,3 @@ release: - ci.vars - release.env - e2e.env - - linux-amd64 From 1366ed44e43595be5ce88966c0bb22526bad6624 Mon Sep 17 00:00:00 2001 From: Chris McClimans Date: Mon, 10 Jul 2017 13:49:12 -0500 Subject: [PATCH 07/17] update ci-master to build binaries + containers --- .gitlab-ci.yml | 30 +++++++++++++++++++++++++----- e2e/files/run-conformance.sh | 2 -- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f64f73d274ab3..942c31d7452c0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,7 @@ stages: before_script: - apk update - apk add bash tar rsync git curl make file + - echo "We are only going to build for amd64 for this demo" - sed -i -e '/ linux\/arm/ s/^/#/' hack/lib/golang.sh - sed -i -e '/ linux\/s390/ s/^/#/' hack/lib/golang.sh - sed -i -e '/ linux\/386/ s/^/#/' hack/lib/golang.sh @@ -14,29 +15,49 @@ before_script: - sed -i -e '/ darwin\/386/ s/^/#/' hack/lib/golang.sh - sed -i -e '/ windows\/386/ s/^/#/' hack/lib/golang.sh - sed -i -e '/ windows\/amd64/ s/^/#/' hack/lib/golang.sh - - sed -i -e 's/kube::release::package_tarballs//g' ./build/release.sh build: stage: build variables: KUBE_DOCKER_REGISTRY: "${CI_REGISTRY_IMAGE}" - KUBE_DOCKER_IMAGE_TAG: "${CI_COMMIT_REF_SLUG}.job.${CI_JOB_ID}" + KUBE_DOCKER_IMAGE_TAG: "${CI_COMMIT_REF_SLUG}.${CI_PIPELINE_ID}.${CI_JOB_ID}" KUBE_RELEASE_RUN_TESTS: "n" KUBE_FASTBUILD: "false" KUBE_VERBOSE: "0" FEDERATION: "false" script: - ./build/release.sh || sleep 99999 + - docker images | grep kubernetes/kubernetes - docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" $CI_REGISTRY - docker push "$CI_REGISTRY_IMAGE/hyperkube-amd64:$KUBE_DOCKER_IMAGE_TAG" + - docker push "$CI_REGISTRY_IMAGE/kube-apiserver-amd64:$KUBE_DOCKER_IMAGE_TAG" + - docker push "$CI_REGISTRY_IMAGE/kube-controller-manager-amd64:$KUBE_DOCKER_IMAGE_TAG" + - docker push "$CI_REGISTRY_IMAGE/kube-scheduler-amd64:$KUBE_DOCKER_IMAGE_TAG" + - docker push "$CI_REGISTRY_IMAGE/kube-proxy-amd64:$KUBE_DOCKER_IMAGE_TAG" + - docker push "$CI_REGISTRY_IMAGE/kube-aggregator-amd64:$KUBE_DOCKER_IMAGE_TAG" + - docker push "$CI_REGISTRY_IMAGE/cloud-controller-manager-amd64:$KUBE_DOCKER_IMAGE_TAG" - cp -a _output/dockerized/bin/linux/amd64 linux-amd64 - echo export TF_VAR_kubelet_image_url="$CI_REGISTRY_IMAGE/hyperkube-amd64" > ci.vars - echo export TF_VAR_kubelet_image_tag="$KUBE_DOCKER_IMAGE_TAG" >> ci.vars - echo export KUBERNETES_IMAGE="$CI_REGISTRY_IMAGE/hyperkube-amd64" > release.env - echo export KUBERNETES_TAG="$KUBE_DOCKER_IMAGE_TAG" >> release.env + - echo export KUBE_APISERVER_IMAGE="$CI_REGISTRY_IMAGE/kube-apiserver-amd64" >> release.env + - echo export KUBE_APISERVER_TAG="$KUBE_DOCKER_IMAGE_TAG" >> release.env + - echo export KUBE_CONTROLLER_MANAGER_IMAGE="$CI_REGISTRY_IMAGE/kube-controller-manager-amd64" >> release.env + - echo export KUBE_CONTROLLER_MANAGER_TAG="$KUBE_DOCKER_IMAGE_TAG" >> release.env + - echo export KUBE_SCHEDULER_IMAGE="$CI_REGISTRY_IMAGE/kube-scheduler-amd64" >> release.env + - echo export KUBE_SCHEDULER_TAG="$KUBE_DOCKER_IMAGE_TAG" >> release.env + - echo export KUBE_PROXY_IMAGE="$CI_REGISTRY_IMAGE/kube-proxy-amd64" >> release.env + - echo export KUBE_PROXY_TAG="$KUBE_DOCKER_IMAGE_TAG" >> release.env + - echo export KUBE_AGGREGATOR_IMAGE="$CI_REGISTRY_IMAGE/kube-aggregator-amd64" >> release.env + - echo export KUBE_AGGREGATOR_TAG="$KUBE_DOCKER_IMAGE_TAG" >> release.env + - echo export CLOUD_CONTROLLER_IMAGE="$CI_REGISTRY_IMAGE/cloud-controller-manager-amd64" >> release.env + - echo export CLOUD_CONTROLLER_TAG="$KUBE_DOCKER_IMAGE_TAG" >> release.env + - echo export KUBE_BINARIES_URL=https://gitlab.cncf.ci/kubernetes/kubernetes/-/jobs/${CI_JOB_ID}/artifacts/raw/linux-amd64/ >> release.env - cat release.env artifacts: name: "${CI_JOB_NAME}.${CI_PIPELINE_ID}.${CI_JOB_ID}" + when: always expire_in: 1 weeks paths: - ci.vars @@ -47,7 +68,7 @@ build-e2e: stage: build variables: KUBE_DOCKER_REGISTRY: "${CI_REGISTRY_IMAGE}" - KUBE_DOCKER_IMAGE_TAG: "${CI_COMMIT_REF_SLUG}.job.${CI_JOB_ID}" + KUBE_DOCKER_IMAGE_TAG: "${CI_COMMIT_REF_SLUG}.${CI_PIPELINE_ID}.${CI_JOB_ID}" script: - docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" $CI_REGISTRY - docker build -t "$CI_REGISTRY_IMAGE/kubernetes-e2e:$KUBE_DOCKER_IMAGE_TAG" ./e2e/ @@ -60,13 +81,12 @@ build-e2e: paths: - e2e.env - release: stage: release script: - cat e2e.env - cat release.env - - curl -X POST + - echo curl -X POST -F token=$CI_JOB_TOKEN -F ref=ci-master https://gitlab.cncf.ci/api/v4/projects/2/trigger/pipeline diff --git a/e2e/files/run-conformance.sh b/e2e/files/run-conformance.sh index 5235c90b8ec0d..e1bf7ba07f133 100755 --- a/e2e/files/run-conformance.sh +++ b/e2e/files/run-conformance.sh @@ -1,5 +1,4 @@ #!/bin/bash - set -e # Run conformance test @@ -16,4 +15,3 @@ GINKGO_PARALLEL=y go run hack/e2e.go -v --test --test_args="--ginkgo.focus=\[Con # ... and finish up with remaining tests in serial go run hack/e2e.go -v --test --test_args="--ginkgo.focus=\[Serial\].*\[Conformance\]" - From f74b94a05d778747241f297e0d5b2e1674037f0e Mon Sep 17 00:00:00 2001 From: Chris McClimans Date: Mon, 10 Jul 2017 14:10:39 -0500 Subject: [PATCH 08/17] add util-linux so we have uuidgen --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 942c31d7452c0..2c7388497cc18 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,7 +5,7 @@ stages: before_script: - apk update - - apk add bash tar rsync git curl make file + - apk add bash tar rsync git curl make file util-linux - echo "We are only going to build for amd64 for this demo" - sed -i -e '/ linux\/arm/ s/^/#/' hack/lib/golang.sh - sed -i -e '/ linux\/s390/ s/^/#/' hack/lib/golang.sh From b648be84a64ce8077c5bf0760a3bd917e8bb3459 Mon Sep 17 00:00:00 2001 From: Chris McClimans Date: Mon, 10 Jul 2017 16:51:38 -0500 Subject: [PATCH 09/17] Build hypercube for ci-master --- .gitlab-ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2c7388497cc18..7d9cff14a3dd8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,12 +21,17 @@ build: variables: KUBE_DOCKER_REGISTRY: "${CI_REGISTRY_IMAGE}" KUBE_DOCKER_IMAGE_TAG: "${CI_COMMIT_REF_SLUG}.${CI_PIPELINE_ID}.${CI_JOB_ID}" + KUBE_BUILD_HYPERKUBE: "n" KUBE_RELEASE_RUN_TESTS: "n" KUBE_FASTBUILD: "false" KUBE_VERBOSE: "0" FEDERATION: "false" script: - ./build/release.sh || sleep 99999 + - ARCH=amd64 + REGISTRY=${CI_REGISTRY_IMAGE} + VERSION=${KUBE_DOCKER_IMAGE_TAG} + make -C cluster/images/hypercube/ build - docker images | grep kubernetes/kubernetes - docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" $CI_REGISTRY - docker push "$CI_REGISTRY_IMAGE/hyperkube-amd64:$KUBE_DOCKER_IMAGE_TAG" From 807d328da84ea02f209195ebc766e7d6e3dc045e Mon Sep 17 00:00:00 2001 From: Hippie Hacker Date: Mon, 10 Jul 2017 22:07:20 +0000 Subject: [PATCH 10/17] hyperkube not hypercube --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7d9cff14a3dd8..b21b26561eca0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,7 +31,7 @@ build: - ARCH=amd64 REGISTRY=${CI_REGISTRY_IMAGE} VERSION=${KUBE_DOCKER_IMAGE_TAG} - make -C cluster/images/hypercube/ build + make -C cluster/images/hyperkube/ build - docker images | grep kubernetes/kubernetes - docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" $CI_REGISTRY - docker push "$CI_REGISTRY_IMAGE/hyperkube-amd64:$KUBE_DOCKER_IMAGE_TAG" From 34e4efa36971d3ff5d98e9e7f189ed05f399f438 Mon Sep 17 00:00:00 2001 From: Hippie Hacker Date: Tue, 11 Jul 2017 16:50:33 +0000 Subject: [PATCH 11/17] Trigger cross-cloud with Kubernetes Master --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b21b26561eca0..6b83cf1fc0562 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -91,9 +91,9 @@ release: script: - cat e2e.env - cat release.env - - echo curl -X POST + - curl -X POST -F token=$CI_JOB_TOKEN - -F ref=ci-master + -F ref=ci-stable-v0.1.0 https://gitlab.cncf.ci/api/v4/projects/2/trigger/pipeline artifacts: name: "${CI_JOB_NAME}.${CI_PIPELINE_ID}.${CI_JOB_ID}" From 6af2eab13d4f19ca631ba4e653cd26706bfeccf5 Mon Sep 17 00:00:00 2001 From: Hippie Hacker Date: Tue, 11 Jul 2017 17:14:19 +0000 Subject: [PATCH 12/17] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6b83cf1fc0562..64049940b003f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -93,7 +93,7 @@ release: - cat release.env - curl -X POST -F token=$CI_JOB_TOKEN - -F ref=ci-stable-v0.1.0 + -F ref=ci-master-v0.1.0 https://gitlab.cncf.ci/api/v4/projects/2/trigger/pipeline artifacts: name: "${CI_JOB_NAME}.${CI_PIPELINE_ID}.${CI_JOB_ID}" From 9bf4822194ba20480525535ac585e22c46ee3c49 Mon Sep 17 00:00:00 2001 From: wolfpack Date: Thu, 16 Nov 2017 19:04:36 -0500 Subject: [PATCH 13/17] k8s update_dashboard for ci-master --- .gitlab-ci.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 64049940b003f..652e9f33cc9d6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,6 +15,43 @@ before_script: - sed -i -e '/ darwin\/386/ s/^/#/' hack/lib/golang.sh - sed -i -e '/ windows\/386/ s/^/#/' hack/lib/golang.sh - sed -i -e '/ windows\/amd64/ s/^/#/' hack/lib/golang.sh + - export CI_COMMIT_SHA_SHORT=$(echo ${CI_COMMIT_SHA} | cut -c -8) + - echo "Starting job ${CI_JOB_NAME}" + - > + if [ "$CI_COMMIT_REF_NAME" = "ci-master"] ; then + export PIPELINE_RELEASE_TYPE="head" # or "head" + elif [ "$CI_COMMIT_REF_NAME" = "ci-v1.7.2"] ; then + export PIPELINE_RELEASE_TYPE="stable" # or "head" + else + export PIPELINE_RELEASE_TYPE="unknown" # or "head" + fi + - rm -f update_dashboard + - wget -nv http://gitlab.dev.cncf.ci/cncf/cross-cloud/raw/ci-stable-v0.1.0/update_dashboard || apk update && apk add bash curl && curl -o update_dashboard http://gitlab.dev.cncf.ci/cncf/cross-cloud/raw/ci-stable-v0.1.0/update_dashboard + - chmod +x update_dashboard + - > + if [ ! "$PIPELINE_RELEASE_TYPE" = "unknown" ] ; then + bash ./update_dashboard + fi + +after_script: + - echo "Ending job ${CI_JOB_NAME}" + - > + if [ "$CI_COMMIT_REF_NAME" = "ci-master"] ; then + export PIPELINE_RELEASE_TYPE="head" # or "head" + elif [ "$CI_COMMIT_REF_NAME" = "ci-v1.7.2"] ; then + export PIPELINE_RELEASE_TYPE="stable" # or "head" + else + export PIPELINE_RELEASE_TYPE="unknown" # or "head" + fi + - rm -f update_dashboard + - wget -nv http://gitlab.dev.cncf.ci/cncf/cross-cloud/raw/ci-stable-v0.1.0/update_dashboard || apk update && apk add bash curl && curl -o update_dashboard http://gitlab.dev.cncf.ci/cncf/cross-cloud/raw/ci-stable-v0.1.0/update_dashboard + - chmod +x update_dashboard + - > + if [ ! "$PIPELINE_RELEASE_TYPE" = "unknown" ] ; then + bash ./update_dashboard + fi + + build: stage: build From 0687f75190d997cb83e32f40c7813672d7af8657 Mon Sep 17 00:00:00 2001 From: wolfpack Date: Fri, 17 Nov 2017 00:05:48 -0500 Subject: [PATCH 14/17] moved branch ref check to dashboard update client --- .gitlab-ci.yml | 37 ++++++++----------------------------- 1 file changed, 8 insertions(+), 29 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 652e9f33cc9d6..5ed5e85f2894a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,11 @@ stages: - build - release +variables: + DASHBOARD_STABLE_REF_NAME: "ci-v1.7.2" + DASHBOARD_MASTER_REF_NAME: "ci-master" + DASHBOARD_HEAD_REF_NAME: "$MASTER_REF_NAME" + before_script: - apk update - apk add bash tar rsync git curl make file util-linux @@ -16,42 +21,16 @@ before_script: - sed -i -e '/ windows\/386/ s/^/#/' hack/lib/golang.sh - sed -i -e '/ windows\/amd64/ s/^/#/' hack/lib/golang.sh - export CI_COMMIT_SHA_SHORT=$(echo ${CI_COMMIT_SHA} | cut -c -8) - - echo "Starting job ${CI_JOB_NAME}" - - > - if [ "$CI_COMMIT_REF_NAME" = "ci-master"] ; then - export PIPELINE_RELEASE_TYPE="head" # or "head" - elif [ "$CI_COMMIT_REF_NAME" = "ci-v1.7.2"] ; then - export PIPELINE_RELEASE_TYPE="stable" # or "head" - else - export PIPELINE_RELEASE_TYPE="unknown" # or "head" - fi - rm -f update_dashboard - - wget -nv http://gitlab.dev.cncf.ci/cncf/cross-cloud/raw/ci-stable-v0.1.0/update_dashboard || apk update && apk add bash curl && curl -o update_dashboard http://gitlab.dev.cncf.ci/cncf/cross-cloud/raw/ci-stable-v0.1.0/update_dashboard + - wget -O update_dashboard http://gitlab.dev.cncf.ci/cncf/cross-cloud/raw/ci-stable-v0.1.0/update_dashboard || apk update && apk add bash curl && curl -o update_dashboard http://gitlab.dev.cncf.ci/cncf/cross-cloud/raw/ci-stable-v0.1.0/update_dashboard - chmod +x update_dashboard - - > - if [ ! "$PIPELINE_RELEASE_TYPE" = "unknown" ] ; then - bash ./update_dashboard - fi + - bash ./update_dashboard after_script: - - echo "Ending job ${CI_JOB_NAME}" - - > - if [ "$CI_COMMIT_REF_NAME" = "ci-master"] ; then - export PIPELINE_RELEASE_TYPE="head" # or "head" - elif [ "$CI_COMMIT_REF_NAME" = "ci-v1.7.2"] ; then - export PIPELINE_RELEASE_TYPE="stable" # or "head" - else - export PIPELINE_RELEASE_TYPE="unknown" # or "head" - fi - rm -f update_dashboard - wget -nv http://gitlab.dev.cncf.ci/cncf/cross-cloud/raw/ci-stable-v0.1.0/update_dashboard || apk update && apk add bash curl && curl -o update_dashboard http://gitlab.dev.cncf.ci/cncf/cross-cloud/raw/ci-stable-v0.1.0/update_dashboard - chmod +x update_dashboard - - > - if [ ! "$PIPELINE_RELEASE_TYPE" = "unknown" ] ; then - bash ./update_dashboard - fi - - + - bash ./update_dashboard build: stage: build From ed4e7d6d585716f8916ca4255bd80d743ff601fb Mon Sep 17 00:00:00 2001 From: wolfpack Date: Fri, 17 Nov 2017 01:10:59 -0500 Subject: [PATCH 15/17] master head var update --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5ed5e85f2894a..f58632c0cc427 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,7 +6,7 @@ stages: variables: DASHBOARD_STABLE_REF_NAME: "ci-v1.7.2" DASHBOARD_MASTER_REF_NAME: "ci-master" - DASHBOARD_HEAD_REF_NAME: "$MASTER_REF_NAME" + DASHBOARD_HEAD_REF_NAME: "$DASHBOARD_MASTER_REF_NAME" before_script: - apk update From 7f40dead642f17701550d6378e017b0f37912de4 Mon Sep 17 00:00:00 2001 From: DenverWilliams Date: Wed, 22 Nov 2017 06:58:18 +1300 Subject: [PATCH 16/17] Add Container job for Kubernetes --- .gitlab-ci.yml | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f58632c0cc427..e33cf3f9bad73 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,7 @@ image: docker:17.05.0 stages: - build + - package - release variables: @@ -32,22 +33,41 @@ after_script: - chmod +x update_dashboard - bash ./update_dashboard -build: +compile: stage: build variables: KUBE_DOCKER_REGISTRY: "${CI_REGISTRY_IMAGE}" KUBE_DOCKER_IMAGE_TAG: "${CI_COMMIT_REF_SLUG}.${CI_PIPELINE_ID}.${CI_JOB_ID}" - KUBE_BUILD_HYPERKUBE: "n" KUBE_RELEASE_RUN_TESTS: "n" KUBE_FASTBUILD: "false" KUBE_VERBOSE: "0" FEDERATION: "false" script: - - ./build/release.sh || sleep 99999 - - ARCH=amd64 - REGISTRY=${CI_REGISTRY_IMAGE} - VERSION=${KUBE_DOCKER_IMAGE_TAG} - make -C cluster/images/hyperkube/ build + - apk update + - apk add bash tar rsync git curl make file + - export KUBE_DOCKER_REGISTRY="${CI_REGISTRY_IMAGE}" + - export KUBE_DOCKER_IMAGE_TAG="${CI_COMMIT_REF_SLUG}.${CI_COMMIT_SHA_SHORT}" + - echo "${KUBE_DOCKER_IMAGE_TAG}" + - ./build/release.sh + - cp -a _output/dockerized/bin/linux/amd64 linux-amd64 + - echo export KUBELET_ARTIFACT=https://gitlab.cncf.ci/kubernetes/kubernetes/-/jobs/${CI_JOB_ID}/artifacts/raw/linux-amd64/kubelet >> release.env + artifacts: + name: "${CI_JOB_NAME}.${CI_PIPELINE_ID}.${CI_JOB_ID}" + when: always + expire_in: 1 weeks + paths: + - release.env + - linux-amd64 + +container: + stage: package + variables: + KUBE_DOCKER_REGISTRY: "${CI_REGISTRY_IMAGE}" + KUBE_DOCKER_IMAGE_TAG: "${CI_COMMIT_REF_SLUG}.${CI_PIPELINE_ID}.${CI_COMMIT_SHA_SHORT}" + script: + - export KUBE_DOCKER_REGISTRY="${CI_REGISTRY_IMAGE}" + - export KUBE_DOCKER_IMAGE_TAG="${CI_COMMIT_REF_SLUG}.${CI_COMMIT_SHA_SHORT}" + - echo "${KUBE_DOCKER_IMAGE_TAG}" - docker images | grep kubernetes/kubernetes - docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" $CI_REGISTRY - docker push "$CI_REGISTRY_IMAGE/hyperkube-amd64:$KUBE_DOCKER_IMAGE_TAG" @@ -57,9 +77,6 @@ build: - docker push "$CI_REGISTRY_IMAGE/kube-proxy-amd64:$KUBE_DOCKER_IMAGE_TAG" - docker push "$CI_REGISTRY_IMAGE/kube-aggregator-amd64:$KUBE_DOCKER_IMAGE_TAG" - docker push "$CI_REGISTRY_IMAGE/cloud-controller-manager-amd64:$KUBE_DOCKER_IMAGE_TAG" - - cp -a _output/dockerized/bin/linux/amd64 linux-amd64 - - echo export TF_VAR_kubelet_image_url="$CI_REGISTRY_IMAGE/hyperkube-amd64" > ci.vars - - echo export TF_VAR_kubelet_image_tag="$KUBE_DOCKER_IMAGE_TAG" >> ci.vars - echo export KUBERNETES_IMAGE="$CI_REGISTRY_IMAGE/hyperkube-amd64" > release.env - echo export KUBERNETES_TAG="$KUBE_DOCKER_IMAGE_TAG" >> release.env - echo export KUBE_APISERVER_IMAGE="$CI_REGISTRY_IMAGE/kube-apiserver-amd64" >> release.env @@ -74,16 +91,13 @@ build: - echo export KUBE_AGGREGATOR_TAG="$KUBE_DOCKER_IMAGE_TAG" >> release.env - echo export CLOUD_CONTROLLER_IMAGE="$CI_REGISTRY_IMAGE/cloud-controller-manager-amd64" >> release.env - echo export CLOUD_CONTROLLER_TAG="$KUBE_DOCKER_IMAGE_TAG" >> release.env - - echo export KUBE_BINARIES_URL=https://gitlab.cncf.ci/kubernetes/kubernetes/-/jobs/${CI_JOB_ID}/artifacts/raw/linux-amd64/ >> release.env - cat release.env artifacts: name: "${CI_JOB_NAME}.${CI_PIPELINE_ID}.${CI_JOB_ID}" when: always expire_in: 1 weeks paths: - - ci.vars - release.env - - linux-amd64 build-e2e: stage: build From 8cbdcc609badcc7e19d5e5ddc5ee2140af047712 Mon Sep 17 00:00:00 2001 From: DenverWilliams Date: Wed, 22 Nov 2017 07:25:33 +1300 Subject: [PATCH 17/17] Build Hyperkube --- .gitlab-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e33cf3f9bad73..46f6b795dbc25 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -49,6 +49,10 @@ compile: - export KUBE_DOCKER_IMAGE_TAG="${CI_COMMIT_REF_SLUG}.${CI_COMMIT_SHA_SHORT}" - echo "${KUBE_DOCKER_IMAGE_TAG}" - ./build/release.sh + - ARCH=amd64 + REGISTRY=${KUBE_DOCKER_REGISTRY} + VERSION=${KUBE_DOCKER_IMAGE_TAG} + make -C cluster/images/hyperkube/ build - cp -a _output/dockerized/bin/linux/amd64 linux-amd64 - echo export KUBELET_ARTIFACT=https://gitlab.cncf.ci/kubernetes/kubernetes/-/jobs/${CI_JOB_ID}/artifacts/raw/linux-amd64/kubelet >> release.env artifacts: