From 69412326d1c12836dac25149b378c813d73d3b89 Mon Sep 17 00:00:00 2001 From: Benjamin Elder Date: Tue, 23 Feb 2021 14:40:23 -0800 Subject: [PATCH] create make test cached k/k presubmit (optional, always_run: false) --- .../kubernetes/sig-testing/make-test.yaml | 38 ++++++++++++++++++- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/config/jobs/kubernetes/sig-testing/make-test.yaml b/config/jobs/kubernetes/sig-testing/make-test.yaml index 6b9d69ddd4506..3de674a844838 100644 --- a/config/jobs/kubernetes/sig-testing/make-test.yaml +++ b/config/jobs/kubernetes/sig-testing/make-test.yaml @@ -1,3 +1,37 @@ +presubmits: + kubernetes/kubernetes: + - name: pull-kubernetes-make-test + decorate: true + cluster: k8s-infra-prow-build + skip_branches: + - release-\d+.\d+ # per-release job + labels: + preset-service-account: "true" + optional: true + always_run: false + spec: + containers: + - image: gcr.io/k8s-testimages/kubekins-e2e:v20210223-952586a143-master + command: + - runner.sh + - bash + args: + - -c + - | + # Restore the cache + time curl https://storage.googleapis.com/kubernetes-jenkins/cache/poc/k8s-test-cache.tar.gz -o cache.tar.gz + mkdir -p _output/local/go/ + time tar -xzf cache.tar.gz -C _output/local/go + # Run tests as usual + time make test KUBE_RACE=-race KUBE_TIMEOUT=--timeout=240s + # TODO: direct copy from pull-kubernetes-bazel-test, tune these + resources: + limits: + cpu: 4 + memory: "36Gi" + requests: + cpu: 4 + memory: "36Gi" periodics: - interval: 1h name: ci-kubernetes-generate-make-test-cache @@ -23,7 +57,7 @@ periodics: result=0 # Run the tests as usual ( cd hack/tools && GO111MODULE=on go install gotest.tools/gotestsum ) || result=$? - time make test KUBE_TIMEOUT="--timeout=600s" || result=$? + time make test KUBE_TIMEOUT=--timeout=600s KUBE_RACE=-race || result=$? # Send the cache off to gcs time tar -czf cache.tar.gz -C _output/local/go cache/ || result=$? time gsutil cp cache.tar.gz gs://kubernetes-jenkins/cache/poc/k8s-test-cache.tar.gz || result=$? @@ -54,5 +88,5 @@ periodics: # Run tests as usual result=0 ( cd hack/tools && GO111MODULE=on go install gotest.tools/gotestsum ) || result=$? - time make test KUBE_TIMEOUT="--timeout=600s" || result=$? + time make test KUBE_TIMEOUT=--timeout=600s KUBE_RACE=-race || result=$? exit $result