Skip to content

Commit

Permalink
Remove automatic --repo flag from bazel runner.
Browse files Browse the repository at this point in the history
If a periodic job uses the bazelbuild image and passes an argument of
"--repo=...", it ends up getting appended to the list of repos instead
of overwriting it. Since not all jobs want this behavior, move the
--repo flag to config.yaml per job instead.

This also reverts the attempted (failed) workaround from
kubernetes#2393.
  • Loading branch information
pipejakob committed Apr 5, 2017
1 parent cead27d commit ac2b119
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 17 deletions.
2 changes: 1 addition & 1 deletion images/pull_kubernetes_bazel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

VERSION = 0.11
VERSION = 0.12

image:
docker build -t "gcr.io/k8s-testimages/bazelbuild:$(VERSION)" .
Expand Down
1 change: 0 additions & 1 deletion images/pull_kubernetes_bazel/runner
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ set -o pipefail

git clone https://github.com/kubernetes/test-infra
./test-infra/jenkins/bootstrap.py \
--repo="k8s.io/${REPO_NAME:-test-infra}" \
--job=${JOB_NAME} \
--service-account=${GOOGLE_APPLICATION_CREDENTIALS} \
"$@"
37 changes: 22 additions & 15 deletions prow/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ presubmits:
- master
spec:
containers:
- image: gcr.io/k8s-testimages/bazelbuild:0.11
- image: gcr.io/k8s-testimages/bazelbuild:0.12
args:
- "--repo=k8s.io/$(REPO_NAME)"
- "--pull=$(PULL_REFS)"
- "--upload=gs://kubernetes-jenkins/pr-logs"
- "--git-cache=/root/.cache/git"
Expand Down Expand Up @@ -226,8 +227,9 @@ presubmits:
- master
spec:
containers:
- image: gcr.io/k8s-testimages/bazelbuild:0.11
- image: gcr.io/k8s-testimages/bazelbuild:0.12
args:
- "--repo=k8s.io/$(REPO_NAME)"
- "--pull=$(PULL_REFS)"
- "--upload=gs://kubernetes-jenkins/pr-logs"
- "--git-cache=/root/.cache/git"
Expand Down Expand Up @@ -400,8 +402,9 @@ presubmits:
trigger: "@k8s-bot (bazel )?test this"
spec:
containers:
- image: gcr.io/k8s-testimages/bazelbuild:0.11
- image: gcr.io/k8s-testimages/bazelbuild:0.12
args:
- "--repo=k8s.io/$(REPO_NAME)"
- "--pull=$(PULL_REFS)"
- "--upload=gs://kubernetes-jenkins/pr-logs"
- "--git-cache=/root/.cache/git"
Expand Down Expand Up @@ -490,8 +493,9 @@ postsubmits:
- master
spec:
containers:
- image: gcr.io/k8s-testimages/bazelbuild:0.11
- image: gcr.io/k8s-testimages/bazelbuild:0.12
args:
- "--repo=k8s.io/$(REPO_NAME)"
- "--branch=$(PULL_REFS)"
- "--upload=gs://kubernetes-jenkins/logs"
- "--git-cache=/root/.cache/git"
Expand Down Expand Up @@ -519,8 +523,9 @@ postsubmits:
- name: ci-kubernetes-bazel-test
spec:
containers:
- image: gcr.io/k8s-testimages/bazelbuild:0.11
- image: gcr.io/k8s-testimages/bazelbuild:0.12
args:
- "--repo=k8s.io/$(REPO_NAME)"
- "--branch=$(PULL_REFS)"
- "--upload=gs://kubernetes-jenkins/logs"
- "--git-cache=/root/.cache/git"
Expand Down Expand Up @@ -587,8 +592,9 @@ postsubmits:
- release-1.6
spec:
containers:
- image: gcr.io/k8s-testimages/bazelbuild:0.9
- image: gcr.io/k8s-testimages/bazelbuild:0.12
args:
- "--repo=k8s.io/$(REPO_NAME)"
- "--branch=$(PULL_REFS)"
- "--upload=gs://kubernetes-jenkins/logs"
- "--git-cache=/root/.cache/git"
Expand Down Expand Up @@ -616,8 +622,9 @@ postsubmits:
- name: ci-kubernetes-bazel-test-1-6
spec:
containers:
- image: gcr.io/k8s-testimages/bazelbuild:0.9
- image: gcr.io/k8s-testimages/bazelbuild:0.12
args:
- "--repo=k8s.io/$(REPO_NAME)"
- "--branch=$(PULL_REFS)"
- "--upload=gs://kubernetes-jenkins/logs"
- "--git-cache=/root/.cache/git"
Expand Down Expand Up @@ -686,8 +693,9 @@ postsubmits:
- master
spec:
containers:
- image: gcr.io/k8s-testimages/bazelbuild:0.11
- image: gcr.io/k8s-testimages/bazelbuild:0.12
args:
- "--repo=k8s.io/$(REPO_NAME)"
- "--branch=$(PULL_REFS)"
- "--upload=gs://kubernetes-jenkins/logs"
- "--git-cache=/root/.cache/git"
Expand Down Expand Up @@ -739,8 +747,9 @@ periodics:
interval: 1h
spec:
containers:
- image: gcr.io/k8s-testimages/bazelbuild:0.11
- image: gcr.io/k8s-testimages/bazelbuild:0.12
args:
- "--repo=k8s.io/test-infra"
- "--branch=master"
- "--upload=gs://kubernetes-jenkins/logs"
- "--git-cache=/root/.cache/git"
Expand Down Expand Up @@ -821,17 +830,16 @@ periodics:
interval: 2h
spec:
containers:
- image: gcr.io/k8s-testimages/bazelbuild:0.9
- image: gcr.io/k8s-testimages/bazelbuild:0.12
args:
- "--repo=k8s.io/kubernetes=release-1.6"
- "--upload=gs://kubernetes-jenkins/logs"
- "--git-cache=/root/.cache/git"
- "--clean"
# Bazel needs privileged mode in order to sandbox builds.
securityContext:
privileged: true
env:
- name: REPO_NAME
value: kubernetes=release-1.6
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /etc/service-account/service-account.json
volumeMounts:
Expand All @@ -851,16 +859,15 @@ periodics:
- name: periodic-kubernetes-bazel-test-1-6
spec:
containers:
- image: gcr.io/k8s-testimages/bazelbuild:0.9
- image: gcr.io/k8s-testimages/bazelbuild:0.12
args:
- "--repo=k8s.io/kubernetes=release-1.6"
- "--upload=gs://kubernetes-jenkins/logs"
- "--git-cache=/root/.cache/git"
- "--clean"
securityContext:
privileged: true
env:
- name: REPO_NAME
value: kubernetes=release-1.6
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /etc/service-account/service-account.json
volumeMounts:
Expand Down

0 comments on commit ac2b119

Please sign in to comment.