Use upload-to-gcs.sh everywhere

This commit is contained in:
Jeff Grafton 2016-03-23 16:55:17 -07:00
parent f83a6f1665
commit 62b3587b62
4 changed files with 11 additions and 17 deletions

View File

@ -207,8 +207,9 @@ fi
cd kubernetes
# Upload build start time and k8s version to GCS, but not on PR Jenkins.
# On PR Jenkins this is done before the build.
if [[ ! "${JOB_NAME}" =~ -pull- ]]; then
bash <(curl -fsS --retry 3 "https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/upload-started.sh")
JENKINS_BUILD_STARTED=true bash <(curl -fsS --retry 3 "https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/upload-to-gcs.sh")
fi
# Have cmd/e2e run by goe2e.sh generate JUnit report in ${WORKSPACE}/junit*.xml

View File

@ -14,40 +14,33 @@
- postbuildscript:
builders:
- shell: |
curl -fsS --retry 3 "https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/upload-finished.sh" > upload-finished.sh
chmod +x upload-finished.sh
mkdir -p _tmp
curl -fsS --retry 3 "https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/upload-to-gcs.sh" > ./_tmp/upload-to-gcs.sh
chmod +x ./_tmp/upload-to-gcs.sh
- conditional-step:
condition-kind: current-status
condition-worst: SUCCESS
condition-best: SUCCESS
steps:
- shell: './upload-finished.sh SUCCESS'
- shell: 'JENKINS_BUILD_FINISHED=SUCCESS ./_tmp/upload-to-gcs.sh'
- conditional-step:
condition-kind: current-status
condition-worst: UNSTABLE
condition-best: UNSTABLE
steps:
- shell: './upload-finished.sh UNSTABLE'
- shell: 'JENKINS_BUILD_FINISHED=UNSTABLE ./_tmp/upload-to-gcs.sh'
- conditional-step:
condition-kind: current-status
condition-worst: FAILURE
condition-best: FAILURE
steps:
- shell: './upload-finished.sh FAILURE'
- shell: 'JENKINS_BUILD_FINISHED=FAILURE ./_tmp/upload-to-gcs.sh'
- conditional-step:
condition-kind: current-status
condition-worst: ABORTED
condition-best: ABORTED
steps:
- shell: './upload-finished.sh ABORTED'
# Use our script for build artifacts, since it's more flexible.
# Run last since it updates latest-build.txt.
- shell: |
if [[ -x ./hack/jenkins/upload-to-gcs.sh ]]; then
./hack/jenkins/upload-to-gcs.sh
else
curl -fsS --retry 3 "https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/upload-to-gcs.sh" | bash -
fi
- shell: 'JENKINS_BUILD_FINISHED=ABORTED ./_tmp/upload-to-gcs.sh'
script-only-if-succeeded: False
script-only-if-failed: False
# Use the plugin for the build log, since it isn't available on Jenkins slaves.

View File

@ -5,7 +5,7 @@
logrotate:
numToKeep: 200
builders:
- shell: 'bash <(curl -fsS --retry 3 "https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/upload-started.sh")'
- shell: 'JENKINS_BUILD_STARTED=true bash <(curl -fsS --retry 3 "https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/upload-to-gcs.sh")'
- shell: |
timeout -k {kill-timeout}m 30m ./hack/jenkins/build.sh && rc=$? || rc=$?
{report-rc}

View File

@ -7,7 +7,7 @@
numToKeep: 200
node: unittest
builders:
- shell: 'bash <(curl -fsS --retry 3 "https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/upload-started.sh")'
- shell: 'JENKINS_BUILD_STARTED=true bash <(curl -fsS --retry 3 "https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/upload-to-gcs.sh")'
- shell: |
export KUBE_FORCE_VERIFY_CHECKS='y'
export KUBE_VERIFY_GIT_BRANCH='{branch}'