mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 11:38:15 +00:00
Merge pull request #20969 from justinsb/configurable_status_upload
Auto commit by PR queue bot
This commit is contained in:
commit
b0d8f361ab
@ -29,9 +29,17 @@ if [[ $# -ne 1 ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# TODO: DRY. Refactor into upload-to-gcs.sh ?
|
||||||
|
: ${JENKINS_GCS_LOGS_PATH:="gs://kubernetes-jenkins/logs"}
|
||||||
|
: ${JENKINS_UPLOAD_TO_GCS:="y"}
|
||||||
|
|
||||||
|
if [[ ! ${JENKINS_UPLOAD_TO_GCS:-} =~ ^[yY]$ ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
readonly result="$1"
|
readonly result="$1"
|
||||||
readonly timestamp=$(date +%s)
|
readonly timestamp=$(date +%s)
|
||||||
readonly location="gs://kubernetes-jenkins/logs/${JOB_NAME}/${BUILD_NUMBER}/finished.json"
|
readonly location="${JENKINS_GCS_LOGS_PATH}/${JOB_NAME}/${BUILD_NUMBER}/finished.json"
|
||||||
|
|
||||||
echo -n 'Run finished at '; date -d "@${timestamp}"
|
echo -n 'Run finished at '; date -d "@${timestamp}"
|
||||||
|
|
||||||
|
@ -24,9 +24,17 @@ set -o errexit
|
|||||||
set -o nounset
|
set -o nounset
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
|
# TODO: DRY. Refactor into upload-to-gcs.sh ?
|
||||||
|
: ${JENKINS_GCS_LOGS_PATH:="gs://kubernetes-jenkins/logs"}
|
||||||
|
: ${JENKINS_UPLOAD_TO_GCS:="y"}
|
||||||
|
|
||||||
|
if [[ ! ${JENKINS_UPLOAD_TO_GCS:-} =~ ^[yY]$ ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
version=""
|
version=""
|
||||||
readonly timestamp=$(date +%s)
|
readonly timestamp=$(date +%s)
|
||||||
readonly location="gs://kubernetes-jenkins/logs/${JOB_NAME}/${BUILD_NUMBER}/started.json"
|
readonly location="${JENKINS_GCS_LOGS_PATH}/${JOB_NAME}/${BUILD_NUMBER}/started.json"
|
||||||
|
|
||||||
echo -n 'Run starting at '; date -d "@${timestamp}"
|
echo -n 'Run starting at '; date -d "@${timestamp}"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user