diff --git a/Jenkinsfile b/Jenkinsfile index 42c0c61..79d17e1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,13 +1,27 @@ + +// set the job options according to the Type of build +def options = '' 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') { - echo "Will configure Maven for RELEASE artifacts" + echo "Will configure Maven for RELEASE artifacts" + options = '' + maven_local_repo_path = '' + maven_settings_file = '' } pipeline { agent any - + + // environment variables available to the Pipeline + environment { + JOB_OPTIONS = "${options}" + } + parameters { choice(choices: ['SNAPSHOT', 'RELEASE'], description: 'The type of artifacts the build is expected to generate', @@ -18,10 +32,10 @@ pipeline { stage('build core components') { steps { withMaven(jdk: 'OpenJDK 8') { - build 'maven-parent' - build 'gcube-bom' - build 'authorization-common-library' - build 'gxRest' + build 'maven-parent/master' + build 'gcube-bom/master' + build 'authorization-common-library/master' + build 'gxRest/master' } script { echo "Done with core components"