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 cd kubernetes
# Upload build start time and k8s version to GCS, but not on PR Jenkins. # 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 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 fi
# Have cmd/e2e run by goe2e.sh generate JUnit report in ${WORKSPACE}/junit*.xml # Have cmd/e2e run by goe2e.sh generate JUnit report in ${WORKSPACE}/junit*.xml

View File

@ -14,40 +14,33 @@
- postbuildscript: - postbuildscript:
builders: builders:
- shell: | - shell: |
curl -fsS --retry 3 "https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/upload-finished.sh" > upload-finished.sh mkdir -p _tmp
chmod +x upload-finished.sh 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: - conditional-step:
condition-kind: current-status condition-kind: current-status
condition-worst: SUCCESS condition-worst: SUCCESS
condition-best: SUCCESS condition-best: SUCCESS
steps: steps:
- shell: './upload-finished.sh SUCCESS' - shell: 'JENKINS_BUILD_FINISHED=SUCCESS ./_tmp/upload-to-gcs.sh'
- conditional-step: - conditional-step:
condition-kind: current-status condition-kind: current-status
condition-worst: UNSTABLE condition-worst: UNSTABLE
condition-best: UNSTABLE condition-best: UNSTABLE
steps: steps:
- shell: './upload-finished.sh UNSTABLE' - shell: 'JENKINS_BUILD_FINISHED=UNSTABLE ./_tmp/upload-to-gcs.sh'
- conditional-step: - conditional-step:
condition-kind: current-status condition-kind: current-status
condition-worst: FAILURE condition-worst: FAILURE
condition-best: FAILURE condition-best: FAILURE
steps: steps:
- shell: './upload-finished.sh FAILURE' - shell: 'JENKINS_BUILD_FINISHED=FAILURE ./_tmp/upload-to-gcs.sh'
- conditional-step: - conditional-step:
condition-kind: current-status condition-kind: current-status
condition-worst: ABORTED condition-worst: ABORTED
condition-best: ABORTED condition-best: ABORTED
steps: steps:
- shell: './upload-finished.sh ABORTED' - shell: 'JENKINS_BUILD_FINISHED=ABORTED ./_tmp/upload-to-gcs.sh'
# 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
script-only-if-succeeded: False script-only-if-succeeded: False
script-only-if-failed: False script-only-if-failed: False
# Use the plugin for the build log, since it isn't available on Jenkins slaves. # Use the plugin for the build log, since it isn't available on Jenkins slaves.

View File

@ -5,7 +5,7 @@
logrotate: logrotate:
numToKeep: 200 numToKeep: 200
builders: 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: | - shell: |
timeout -k {kill-timeout}m 30m ./hack/jenkins/build.sh && rc=$? || rc=$? timeout -k {kill-timeout}m 30m ./hack/jenkins/build.sh && rc=$? || rc=$?
{report-rc} {report-rc}

View File

@ -7,7 +7,7 @@
numToKeep: 200 numToKeep: 200
node: unittest node: unittest
builders: 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: | - shell: |
export KUBE_FORCE_VERIFY_CHECKS='y' export KUBE_FORCE_VERIFY_CHECKS='y'
export KUBE_VERIFY_GIT_BRANCH='{branch}' export KUBE_VERIFY_GIT_BRANCH='{branch}'