From 370260f2c84af80843af6efb6644ed5a0ff9d6c4 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Tue, 21 Aug 2018 23:58:47 +0300 Subject: [PATCH] kubeadm: pull kubernetes-anywhere per job kubernetes-anywhere (k-a) now has a specific branch for use with e2e tests and it is no longer needed to bake a k-a commit SHA into the kubeadm image. The following is used to pull the `kubeadm-e2e` branch of k-a: `--repo=k8s.io/kubernetes-anywhere=kubeadm-e2e` This removes a step where after fixing a k-a bug, the test-infra kubeadm image has to be updated. Also removes the kubeadm runner as it is no longer needed. --- .../generated-security-jobs.yaml | 3 ++ .../sig-cluster-lifecycle/kubeadm.yaml | 17 ++++++++ .../sig-testing/bazel-build-test.yaml | 3 ++ images/kubeadm/Dockerfile | 2 - images/kubeadm/runner | 41 ------------------- 5 files changed, 23 insertions(+), 43 deletions(-) delete mode 100755 images/kubeadm/runner diff --git a/config/jobs/kubernetes-security/generated-security-jobs.yaml b/config/jobs/kubernetes-security/generated-security-jobs.yaml index 92cd3ab18b1f..4ae90c754779 100644 --- a/config/jobs/kubernetes-security/generated-security-jobs.yaml +++ b/config/jobs/kubernetes-security/generated-security-jobs.yaml @@ -1433,6 +1433,7 @@ presubmits: - args: - --ssh=/etc/ssh-security/ssh-security - --repo=github.com/kubernetes-security/$(REPO_NAME)=$(PULL_REFS) + - --repo=github.com/kubernetes-security/kubernetes-anywhere=kubeadm-e2e - --upload=gs://kubernetes-security-prow/pr-logs - --timeout=75 - --scenario=kubernetes_e2e @@ -1529,6 +1530,7 @@ presubmits: - args: - --ssh=/etc/ssh-security/ssh-security - --repo=github.com/kubernetes-security/$(REPO_NAME)=$(PULL_REFS) + - --repo=github.com/kubernetes-security/kubernetes-anywhere=kubeadm-e2e - --upload=gs://kubernetes-security-prow/pr-logs - --timeout=75 - --scenario=kubernetes_e2e @@ -1622,6 +1624,7 @@ presubmits: - args: - --ssh=/etc/ssh-security/ssh-security - --repo=github.com/kubernetes-security/$(REPO_NAME)=$(PULL_REFS) + - --repo=github.com/kubernetes-security/kubernetes-anywhere=kubeadm-e2e - --upload=gs://kubernetes-security-prow/pr-logs - --timeout=75 - --scenario=kubernetes_e2e diff --git a/config/jobs/kubernetes/sig-cluster-lifecycle/kubeadm.yaml b/config/jobs/kubernetes/sig-cluster-lifecycle/kubeadm.yaml index a0120ce6808f..336c855cbe23 100644 --- a/config/jobs/kubernetes/sig-cluster-lifecycle/kubeadm.yaml +++ b/config/jobs/kubernetes/sig-cluster-lifecycle/kubeadm.yaml @@ -9,6 +9,7 @@ periodics: - image: gcr.io/k8s-testimages/e2e-kubeadm:v20180730-c8036c3a7 args: - --repo=k8s.io/kubernetes=master + - --repo=k8s.io/kubernetes-anywhere=kubeadm-e2e - --timeout=320 - --upload=gs://kubernetes-jenkins/logs - --scenario=kubernetes_e2e @@ -36,6 +37,7 @@ periodics: - image: gcr.io/k8s-testimages/e2e-kubeadm:v20180730-c8036c3a7 args: - --repo=k8s.io/kubernetes=release-1.10 + - --repo=k8s.io/kubernetes-anywhere=kubeadm-e2e - --timeout=320 - --upload=gs://kubernetes-jenkins/logs - --scenario=kubernetes_e2e @@ -61,6 +63,7 @@ periodics: - image: gcr.io/k8s-testimages/e2e-kubeadm:v20180730-c8036c3a7 args: - --repo=k8s.io/kubernetes=release-1.11 + - --repo=k8s.io/kubernetes-anywhere=kubeadm-e2e - --timeout=320 - --upload=gs://kubernetes-jenkins/logs - --scenario=kubernetes_e2e @@ -86,6 +89,7 @@ periodics: - image: gcr.io/k8s-testimages/e2e-kubeadm:v20180730-c8036c3a7 args: - --repo=k8s.io/kubernetes=release-1.11 + - --repo=k8s.io/kubernetes-anywhere=kubeadm-e2e - --timeout=320 - --upload=gs://kubernetes-jenkins/logs - --scenario=kubernetes_e2e @@ -112,6 +116,7 @@ periodics: - image: gcr.io/k8s-testimages/e2e-kubeadm:v20180730-c8036c3a7 args: - --repo=k8s.io/kubernetes=release-1.8 + - --repo=k8s.io/kubernetes-anywhere=kubeadm-e2e - --timeout=320 - --upload=gs://kubernetes-jenkins/logs - --scenario=kubernetes_e2e @@ -137,6 +142,7 @@ periodics: - image: gcr.io/k8s-testimages/e2e-kubeadm:v20180730-c8036c3a7 args: - --repo=k8s.io/kubernetes=release-1.9 + - --repo=k8s.io/kubernetes-anywhere=kubeadm-e2e - --timeout=320 - --upload=gs://kubernetes-jenkins/logs - --scenario=kubernetes_e2e @@ -162,6 +168,7 @@ periodics: - image: gcr.io/k8s-testimages/e2e-kubeadm:v20180730-c8036c3a7 args: - --repo=k8s.io/kubernetes=release-1.9 + - --repo=k8s.io/kubernetes-anywhere=kubeadm-e2e - --timeout=320 - --upload=gs://kubernetes-jenkins/logs - --scenario=kubernetes_e2e @@ -187,6 +194,7 @@ periodics: - image: gcr.io/k8s-testimages/e2e-kubeadm:v20180730-c8036c3a7 args: - --repo=k8s.io/kubernetes=release-1.10 + - --repo=k8s.io/kubernetes-anywhere=kubeadm-e2e - --timeout=320 - --upload=gs://kubernetes-jenkins/logs - --scenario=kubernetes_e2e @@ -212,6 +220,7 @@ periodics: - image: gcr.io/k8s-testimages/e2e-kubeadm:v20180730-c8036c3a7 args: - --repo=k8s.io/kubernetes=master + - --repo=k8s.io/kubernetes-anywhere=kubeadm-e2e - --timeout=320 - --upload=gs://kubernetes-jenkins/logs - --scenario=kubernetes_e2e @@ -238,6 +247,7 @@ periodics: - image: gcr.io/k8s-testimages/e2e-kubeadm:v20180730-c8036c3a7 args: - --repo=k8s.io/kubernetes=master + - --repo=k8s.io/kubernetes-anywhere=kubeadm-e2e - --timeout=320 - --upload=gs://kubernetes-jenkins/logs - --scenario=kubernetes_e2e @@ -264,6 +274,7 @@ periodics: - image: gcr.io/k8s-testimages/e2e-kubeadm:v20180730-c8036c3a7 args: - --repo=k8s.io/kubernetes=master + - --repo=k8s.io/kubernetes-anywhere=kubeadm-e2e - --timeout=320 - --upload=gs://kubernetes-jenkins/logs - --scenario=kubernetes_e2e @@ -290,6 +301,7 @@ periodics: - image: gcr.io/k8s-testimages/e2e-kubeadm:v20180730-c8036c3a7 args: - --repo=k8s.io/kubernetes=master + - --repo=k8s.io/kubernetes-anywhere=kubeadm-e2e - --timeout=320 - --upload=gs://kubernetes-jenkins/logs - --scenario=kubernetes_e2e @@ -316,6 +328,7 @@ periodics: - image: gcr.io/k8s-testimages/e2e-kubeadm:v20180730-c8036c3a7 args: - --repo=k8s.io/kubernetes=master + - --repo=k8s.io/kubernetes-anywhere=kubeadm-e2e - --timeout=320 - --upload=gs://kubernetes-jenkins/logs - --scenario=kubernetes_e2e @@ -341,6 +354,7 @@ periodics: - image: gcr.io/k8s-testimages/e2e-kubeadm:v20180730-c8036c3a7 args: - --repo=k8s.io/kubernetes=release-1.11 + - --repo=k8s.io/kubernetes-anywhere=kubeadm-e2e - --timeout=320 - --upload=gs://kubernetes-jenkins/logs - --scenario=kubernetes_e2e @@ -371,6 +385,7 @@ periodics: - image: gcr.io/k8s-testimages/e2e-kubeadm:v20180730-c8036c3a7 args: - --repo=k8s.io/kubernetes=release-1.9 + - --repo=k8s.io/kubernetes-anywhere=kubeadm-e2e - --timeout=320 - --upload=gs://kubernetes-jenkins/logs - --scenario=kubernetes_e2e @@ -401,6 +416,7 @@ periodics: - image: gcr.io/k8s-testimages/e2e-kubeadm:v20180730-c8036c3a7 args: - --repo=k8s.io/kubernetes=release-1.10 + - --repo=k8s.io/kubernetes-anywhere=kubeadm-e2e - --timeout=320 - --upload=gs://kubernetes-jenkins/logs - --scenario=kubernetes_e2e @@ -431,6 +447,7 @@ periodics: - image: gcr.io/k8s-testimages/e2e-kubeadm:v20180730-c8036c3a7 args: - --repo=k8s.io/kubernetes=master + - --repo=k8s.io/kubernetes-anywhere=kubeadm-e2e - --timeout=320 - --upload=gs://kubernetes-jenkins/logs - --scenario=kubernetes_e2e diff --git a/config/jobs/kubernetes/sig-testing/bazel-build-test.yaml b/config/jobs/kubernetes/sig-testing/bazel-build-test.yaml index 8dda1be224e9..a49b0c0a5cb8 100644 --- a/config/jobs/kubernetes/sig-testing/bazel-build-test.yaml +++ b/config/jobs/kubernetes/sig-testing/bazel-build-test.yaml @@ -44,6 +44,7 @@ presubmits: - image: gcr.io/k8s-testimages/e2e-kubeadm:v20180730-c8036c3a7 args: - "--repo=k8s.io/$(REPO_NAME)=$(PULL_REFS)" + - "--repo=k8s.io/kubernetes-anywhere=kubeadm-e2e" - "--upload=gs://kubernetes-jenkins/pr-logs" - "--timeout=75" - --scenario=kubernetes_e2e @@ -103,6 +104,7 @@ presubmits: - image: gcr.io/k8s-testimages/e2e-kubeadm:v20180730-c8036c3a7 args: - "--repo=k8s.io/$(REPO_NAME)=$(PULL_REFS)" + - "--repo=k8s.io/kubernetes-anywhere=kubeadm-e2e" - "--upload=gs://kubernetes-jenkins/pr-logs" - "--timeout=75" - --scenario=kubernetes_e2e @@ -161,6 +163,7 @@ presubmits: - image: gcr.io/k8s-testimages/e2e-kubeadm:v20180730-c8036c3a7 args: - "--repo=k8s.io/$(REPO_NAME)=$(PULL_REFS)" + - "--repo=k8s.io/kubernetes-anywhere=kubeadm-e2e" - "--upload=gs://kubernetes-jenkins/pr-logs" - "--timeout=75" - --scenario=kubernetes_e2e diff --git a/images/kubeadm/Dockerfile b/images/kubeadm/Dockerfile index 3df38bd4de4d..468df3a93826 100644 --- a/images/kubeadm/Dockerfile +++ b/images/kubeadm/Dockerfile @@ -49,5 +49,3 @@ RUN mkdir -p /tmp/terraform/ && \ rm -rf /tmp/terraform WORKDIR /workspace -ADD runner / -ENTRYPOINT ["/bin/bash", "/runner"] diff --git a/images/kubeadm/runner b/images/kubeadm/runner deleted file mode 100755 index 68f0e7971f28..000000000000 --- a/images/kubeadm/runner +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2017 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -o errexit -set -o nounset -set -o pipefail - -if [ ! -e test-infra ]; then - git clone https://github.com/kubernetes/test-infra -fi - -if [ ! -e kubernetes-anywhere ]; then - git clone https://github.com/kubernetes/kubernetes-anywhere - - # Explicitly version this dependency so that upstream commits can't - # immediately break e2e jobs, and we have control over upgrading/downgrading. - git -C kubernetes-anywhere checkout a26f42c716028c4ba967b2d2f3de5ed50acc51da -fi - -# This is required until https://github.com/kubernetes/kubernetes-anywhere/issues/332 -# is implemented. -if [ ! -e kubernetes-anywhere/phase1/gce/account.json ]; then - ln -s "${GOOGLE_APPLICATION_CREDENTIALS}" kubernetes-anywhere/phase1/gce/account.json -fi - -./test-infra/jenkins/bootstrap.py \ - --job="${JOB_NAME}" \ - --service-account="${GOOGLE_APPLICATION_CREDENTIALS}" \ - "$@"