Prepare the different options for the builds.
This commit is contained in:
parent
342047ad60
commit
82afb3ecf2
|
@ -1,13 +1,27 @@
|
||||||
|
|
||||||
|
// set the job options according to the Type of build
|
||||||
|
def options = ''
|
||||||
if (params.Type == 'SNAPSHOT') {
|
if (params.Type == 'SNAPSHOT') {
|
||||||
echo "Will configure Maven for SNAPSHOT artifacts"
|
echo "Will configure Maven for SNAPSHOT artifacts"
|
||||||
}
|
options = ''
|
||||||
|
maven_local_repo_path = ''
|
||||||
|
maven_settings_file = ''
|
||||||
|
}
|
||||||
if (params.Type == 'RELEASE') {
|
if (params.Type == 'RELEASE') {
|
||||||
echo "Will configure Maven for RELEASE artifacts"
|
echo "Will configure Maven for RELEASE artifacts"
|
||||||
|
options = ''
|
||||||
|
maven_local_repo_path = ''
|
||||||
|
maven_settings_file = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
|
||||||
|
// environment variables available to the Pipeline
|
||||||
|
environment {
|
||||||
|
JOB_OPTIONS = "${options}"
|
||||||
|
}
|
||||||
|
|
||||||
parameters {
|
parameters {
|
||||||
choice(choices: ['SNAPSHOT', 'RELEASE'],
|
choice(choices: ['SNAPSHOT', 'RELEASE'],
|
||||||
description: 'The type of artifacts the build is expected to generate',
|
description: 'The type of artifacts the build is expected to generate',
|
||||||
|
@ -18,10 +32,10 @@ pipeline {
|
||||||
stage('build core components') {
|
stage('build core components') {
|
||||||
steps {
|
steps {
|
||||||
withMaven(jdk: 'OpenJDK 8') {
|
withMaven(jdk: 'OpenJDK 8') {
|
||||||
build 'maven-parent'
|
build 'maven-parent/master'
|
||||||
build 'gcube-bom'
|
build 'gcube-bom/master'
|
||||||
build 'authorization-common-library'
|
build 'authorization-common-library/master'
|
||||||
build 'gxRest'
|
build 'gxRest/master'
|
||||||
}
|
}
|
||||||
script {
|
script {
|
||||||
echo "Done with core components"
|
echo "Done with core components"
|
||||||
|
|
Loading…
Reference in New Issue