Add gCube_release_number parameter to the pipeline and set a corresponding ENV variable for the builds.

This commit is contained in:
Manuele Simi 2019-06-11 15:32:57 -04:00
parent f55295faaa
commit de6129cd32
1 changed files with 10 additions and 3 deletions

13
Jenkinsfile vendored
View File

@ -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