File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11def workpath_linux = " /src/github.com/deis/workflow-cli"
22def windows = ' windows'
33def linux = ' linux'
4+ def git_commit = ' '
5+ def git_branch = ' '
46
57def getBasePath = { String filepath ->
68 def filename = filepath. lastIndexOf(File . separator)
@@ -35,9 +37,14 @@ def upload_artifacts = { boolean cache ->
3537 sh " mkdir -p ${ getBasePath(gcs_key)} "
3638 sh " cat \"\$ {GCSKEY}\" > ${ gcs_key} "
3739 gcs_cmd ' gcloud auth activate-service-account -q --key-file /.config/key.json'
38- headers = " "
40+
41+ headers = " -h 'x-goog-meta-git-branch:${ git_branch} ' "
42+ headers + = " -h 'x-goog-meta-git-sha:${ git_commit} ' "
43+ headers + = " -h 'x-goog-meta-ci-job:${ env.JOB_NAME} ' "
44+ headers + = " -h 'x-goog-meta-ci-number:${ env.BUILD_NUMBER} ' "
45+ headers + = " -h 'x-goog-meta-ci-url:${ env.BUILD_URL} '"
3946 if (! cache) {
40- headers + = ' -h "Cache-Control:no-cache"'
47+ headers + = ' -h "Cache-Control:no-cache"'
4148 }
4249 gcs_cmd " gsutil -mq ${ headers} cp -a public-read -r /upload/* ${ gcs_bucket} "
4350 gcs_cmd gcs_cleanup_cmd
@@ -111,9 +118,6 @@ node(linux) {
111118 }
112119}
113120
114- def git_commit = ' '
115- def git_branch = ' '
116-
117121stage ' Git Info'
118122node(linux) {
119123
You can’t perform that action at this time.
0 commit comments