Add gCube_release_number parameter to the pipeline and set a corresponding ENV variable for the builds.
This commit is contained in:
parent
f55295faaa
commit
de6129cd32
|
@ -31,6 +31,7 @@ if (params.Type == 'RELEASE') {
|
|||
}
|
||||
echo "Use settings file at ${maven_settings_file}"
|
||||
echo "Use local repo at ${maven_local_repo_path}"
|
||||
echo "Release number: ${params.gCube_release_number}"
|
||||
|
||||
pipeline {
|
||||
// see https://jenkins.io/doc/book/pipeline/syntax/#agent
|
||||
|
@ -42,13 +43,19 @@ pipeline {
|
|||
environment {
|
||||
JOB_OPTIONS = "${options}"
|
||||
MAVEN_LOCAL_REPO = "${maven_local_repo_path}"
|
||||
GCUBE_RELEASE_NUMBER = "${params.gCube_release_number}"
|
||||
|
||||
}
|
||||
|
||||
// see https://jenkins.io/doc/book/pipeline/syntax/#parameters
|
||||
parameters {
|
||||
choice(choices: ['SNAPSHOT-DRY-RUN', 'SNAPSHOT', 'RELEASE-DRY-RUN', 'RELEASE'],
|
||||
description: 'The type of artifacts the build is expected to generate',
|
||||
name: 'Type')
|
||||
choice(name: 'Type',
|
||||
choices: ['SNAPSHOT-DRY-RUN', 'SNAPSHOT', 'RELEASE-DRY-RUN', 'RELEASE'],
|
||||
description: 'The type of artifacts the build is expected to generate')
|
||||
|
||||
string(name: 'gCube_release_number',
|
||||
defaultValue: 'invalid',
|
||||
description: 'The number of the gCube release to build. Ignored by the SNAPSHOT builds. Sample values: 4.14, 4.15, etc.')
|
||||
}
|
||||
|
||||
//see https://jenkins.io/doc/book/pipeline/syntax/#stages
|
||||
|
|
Loading…
Reference in New Issue