From 495450865c7b26db7fb5ac3b131dd7e5cd4ca718 Mon Sep 17 00:00:00 2001 From: Joe Finney Date: Thu, 10 Dec 2015 09:11:48 -0800 Subject: [PATCH] Add kubernetes-e2e-gce job --- hack/jenkins/e2e.sh | 2 + hack/jenkins/job-configs/global.yaml | 47 +++++++++++++++++++ .../jenkins/job-configs/kubernetes-build.yaml | 21 ++------- hack/jenkins/job-configs/kubernetes-e2e.yaml | 38 +++++++++++++++ .../kubernetes-update-jenkins-jobs.yaml | 2 +- 5 files changed, 91 insertions(+), 19 deletions(-) create mode 100644 hack/jenkins/job-configs/global.yaml create mode 100644 hack/jenkins/job-configs/kubernetes-e2e.yaml diff --git a/hack/jenkins/e2e.sh b/hack/jenkins/e2e.sh index 9f48d26a67c5c..2c090cf9794f2 100755 --- a/hack/jenkins/e2e.sh +++ b/hack/jenkins/e2e.sh @@ -224,6 +224,7 @@ E2E_OPT=${E2E_OPT:-""} # Set environment variables shared for all of the GCE Jenkins projects. if [[ ${JOB_NAME} =~ ^kubernetes-.*-gce ]]; then KUBERNETES_PROVIDER="gce" + : ${GCE_SERVICE_ACCOUNT:=$(gcloud auth list 2> /dev/null | grep active | cut -f3 -d' ')} : ${E2E_MIN_STARTUP_PODS:="1"} : ${E2E_ZONE:="us-central1-f"} : ${NUM_NODES_PARALLEL:="6"} # Number of nodes required to run all of the tests in parallel @@ -389,6 +390,7 @@ case ${JOB_NAME} in # Runs all non-flaky, non-slow tests on GCE, sequentially. kubernetes-e2e-gce) : ${E2E_CLUSTER_NAME:="jenkins-gce-e2e"} + : ${E2E_PUBLISH_GREEN_VERSION:="true"} : ${E2E_NETWORK:="e2e-gce"} : ${GINKGO_TEST_ARGS:="--ginkgo.skip=$(join_regex_allow_empty \ ${GCE_DEFAULT_SKIP_TESTS[@]:+${GCE_DEFAULT_SKIP_TESTS[@]}} \ diff --git a/hack/jenkins/job-configs/global.yaml b/hack/jenkins/job-configs/global.yaml new file mode 100644 index 0000000000000..5fcbd24098a53 --- /dev/null +++ b/hack/jenkins/job-configs/global.yaml @@ -0,0 +1,47 @@ +# Mail Watcher Plugin alerts the specified address whenever a job config is updated or deleted. +- property: + name: mail-watcher + properties: + - raw: + xml: | + + cloud-kubernetes-team@google.com + + +- publisher: + name: gcs-uploader + publishers: + - google-cloud-storage: + credentials-id: kubernetes-jenkins + uploads: + - build-log: + log-name: build-log.txt + storage-location: gs://kubernetes-jenkins/logs/$JOB_NAME/$BUILD_NUMBER + share-publicly: true + upload-for-failed-jobs: true + +# Default log parser rules. +- publisher: + name: log-parser + publishers: + - logparser: + parse-rules: /jenkins-master-data/log_parser_rules.txt + unstable-on-warning: false + fail-on-error: false + +# There is a junit JJB tag, but it doesn't handle the flaky-test-handler plugin. +- publisher: + name: junit-publisher + publishers: + - raw: + xml: | + + _artifacts/junit*.xml + true + + + + + + 100.0 + diff --git a/hack/jenkins/job-configs/kubernetes-build.yaml b/hack/jenkins/job-configs/kubernetes-build.yaml index 26c3ee6b08e89..e02e479f4dfeb 100644 --- a/hack/jenkins/job-configs/kubernetes-build.yaml +++ b/hack/jenkins/job-configs/kubernetes-build.yaml @@ -6,12 +6,7 @@ builders: - shell: './hack/jenkins/build.sh' properties: - # Mail Watcher Plugin alerts the specified address whenever a job config is updated or deleted. - - raw: - xml: | - - cloud-kubernetes-team@google.com - + - mail-watcher publishers: - claim-build - email-ext: @@ -22,18 +17,8 @@ send-to: - culprits - recipients - - google-cloud-storage: - credentials-id: kubernetes-jenkins - uploads: - - build-log: - log-name: build-log.txt - storage-location: gs://kubernetes-jenkins/logs/$JOB_NAME/$BUILD_NUMBER - share-publicly: true - upload-for-failed-jobs: true - - logparser: - parse-rules: /jenkins-master-data/log_parser_rules.txt - unstable-on-warning: false - fail-on-error: false + - gcs-uploader + - log-parser scm: - git: url: https://github.com/kubernetes/kubernetes diff --git a/hack/jenkins/job-configs/kubernetes-e2e.yaml b/hack/jenkins/job-configs/kubernetes-e2e.yaml new file mode 100644 index 0000000000000..325e011dc01b5 --- /dev/null +++ b/hack/jenkins/job-configs/kubernetes-e2e.yaml @@ -0,0 +1,38 @@ +- job-template: + name: 'kubernetes-e2e-{suffix}' + description: 'Run E2E tests on GCE using the latest successful build. Test owner: Build Cop.' + logrotate: + daysToKeep: 7 + builders: + - shell: | + curl -fsS -o upload-to-gcs.sh --retry 3 "https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/upload-to-gcs.sh" && source upload-to-gcs.sh; rm -f upload-to-gcs.sh + curl -fsS --retry 3 "https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/e2e.sh" | bash - + properties: + - mail-watcher + publishers: + - claim-build + - email-ext + - gcs-uploader + - log-parser + - junit-publisher + triggers: + - reverse: + jobs: kubernetes-build + result: success + - timed: 'H/30 * * * *' + wrappers: + - ansicolor: + colormap: xterm + - timeout: + timeout: 150 + abort: true + fail: true + - timestamps + - workspace-cleanup + +- project: + name: kubernetes-e2e + suffix: + - 'gce' + jobs: + - 'kubernetes-e2e-{suffix}' diff --git a/hack/jenkins/job-configs/kubernetes-update-jenkins-jobs.yaml b/hack/jenkins/job-configs/kubernetes-update-jenkins-jobs.yaml index c5af96c358c81..77229e376a4a8 100644 --- a/hack/jenkins/job-configs/kubernetes-update-jenkins-jobs.yaml +++ b/hack/jenkins/job-configs/kubernetes-update-jenkins-jobs.yaml @@ -1,6 +1,6 @@ - job: name: kubernetes-update-jenkins-jobs - description: 'Update Jenkins jobs' + description: 'Update Jenkins jobs. Test owner: spxtr.' triggers: - timed: 'H/15 * * * *'