Skip to content

Commit

Permalink
create make test cached k/k presubmit (optional, always_run: false)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenTheElder committed Feb 23, 2021
1 parent 6e331a9 commit 6941232
Showing 1 changed file with 36 additions and 2 deletions.
38 changes: 36 additions & 2 deletions config/jobs/kubernetes/sig-testing/make-test.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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=$?
Expand Down Expand Up @@ -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

0 comments on commit 6941232

Please sign in to comment.