Remove the options map. Initialize the maven options.
This commit is contained in:
parent
86941c78ac
commit
2cb403e808
|
@ -1,19 +1,19 @@
|
|||
|
||||
// set the build options according to the Type of build
|
||||
def jobOptions = ''
|
||||
def mavenOptions = [jdk: 'OpenJDK 8']
|
||||
def (options,maven_local_repo_path,maven_settings_file) = ['','','']
|
||||
|
||||
if (params.Type == 'SNAPSHOT') {
|
||||
echo "Will configure Maven for SNAPSHOT artifacts"
|
||||
jobOptions = ''
|
||||
mavenOptions['mavenLocalRepo'] = ''
|
||||
mavenOptions['mavenSettingsFilePath'] = ''
|
||||
}
|
||||
if (params.Type == 'RELEASE') {
|
||||
jobOptions "Will configure Maven for RELEASE artifacts"
|
||||
options = ''
|
||||
mavenOptions['mavenLocalRepo'] = ''
|
||||
mavenOptions['mavenSettingsFilePath'] = ''
|
||||
maven_local_repo_path = '~/local-snapshots'
|
||||
maven_settings_file = '~/.m2/settings.xml'
|
||||
}
|
||||
|
||||
if (params.Type == 'RELEASE') {
|
||||
echo "Will configure Maven for RELEASE artifacts"
|
||||
options = ''
|
||||
maven_local_repo_path = '~/local-releases'
|
||||
maven_settings_file = '~/.m2/settings.xml'
|
||||
}
|
||||
|
||||
pipeline {
|
||||
|
@ -21,7 +21,7 @@ pipeline {
|
|||
|
||||
// environment variables available to the Pipeline
|
||||
environment {
|
||||
JOB_OPTIONS = "${jobOptions}"
|
||||
JOB_OPTIONS = "${options}"
|
||||
}
|
||||
|
||||
parameters {
|
||||
|
@ -33,7 +33,7 @@ pipeline {
|
|||
stages {
|
||||
stage('build core components') {
|
||||
steps {
|
||||
withMaven($mavenOptions) {
|
||||
withMaven(jdk: 'OpenJDK 8', mavenLocalRepo: "${maven_local_repo_path}, mavenSettingsFilePath: "${maven_settings_file}) {
|
||||
build 'maven-parent'
|
||||
build 'gcube-bom'
|
||||
build 'authorization-common-library'
|
||||
|
@ -67,4 +67,3 @@ pipeline {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue