Skip to content

Commit

Permalink
[packaging] use commit version
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v committed Oct 20, 2020
1 parent 7f212d3 commit cad5685
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .ci/packaging.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,18 @@ pipeline {
options { skipDefaultCheckout() }
steps {
deleteDir()
gitCheckout(basedir: "${BASE_DIR}")
script {
if(isUpstreamTrigger()) {
copyArtifacts(filter: 'packaging.properties',
flatten: true,
projectName: "Beats/beats/${env.JOB_BASE_NAME}",
selector: upstream(fallbackToLastSuccessful: true))
def props = readProperties('packaging.properties')
gitCheckout(basedir: "${BASE_DIR}", branch: props.COMMIT)
} else {
gitCheckout(basedir: "${BASE_DIR}")
}
}
setEnvVar("GO_VERSION", readFile("${BASE_DIR}/.go-version").trim())
stashV2(name: 'source', bucket: "${JOB_GCS_BUCKET_STASH}", credentialsId: "${JOB_GCS_CREDENTIALS}")
}
Expand Down

0 comments on commit cad5685

Please sign in to comment.