Manage the dry-run parameters.
This commit is contained in:
parent
be04eb00e4
commit
3fc96549bd
|
@ -2,20 +2,31 @@
|
||||||
// set the build options according to the Type of build
|
// set the build options according to the Type of build
|
||||||
def (options,maven_local_repo_path,maven_settings_file) = ['','','']
|
def (options,maven_local_repo_path,maven_settings_file) = ['','','']
|
||||||
|
|
||||||
|
if (params.Type == 'SNAPSHOT-DRY-RUN') {
|
||||||
|
echo "Will configure Maven for SNAPSHOT-DRY-RUN artifacts"
|
||||||
|
options = ''
|
||||||
|
maven_local_repo_path = '~/local-snapshots'
|
||||||
|
maven_settings_file = '~/.m2/jenkins-shapshots-dry-run-settings.xml'
|
||||||
|
}
|
||||||
if (params.Type == 'SNAPSHOT') {
|
if (params.Type == 'SNAPSHOT') {
|
||||||
echo "Will configure Maven for SNAPSHOT artifacts"
|
echo "Will configure Maven for SNAPSHOT artifacts"
|
||||||
options = ''
|
options = ''
|
||||||
maven_local_repo_path = '~/local-snapshots'
|
maven_local_repo_path = '~/local-snapshots'
|
||||||
|
// use the default settings
|
||||||
maven_settings_file = '~/.m2/settings.xml'
|
maven_settings_file = '~/.m2/settings.xml'
|
||||||
}
|
}
|
||||||
|
if (params.Type == 'RELEASE-DRY-RUN') {
|
||||||
|
echo "Will configure Maven for RELEASE-DRY-RUN artifacts"
|
||||||
|
options = ''
|
||||||
|
maven_local_repo_path = '~/local-releases'
|
||||||
|
maven_settings_file = '~/.m2/jenkins-releases-dry-run-settings.xml'
|
||||||
|
}
|
||||||
if (params.Type == 'RELEASE') {
|
if (params.Type == 'RELEASE') {
|
||||||
echo "Will configure Maven for RELEASE artifacts"
|
echo "Will configure Maven for RELEASE artifacts"
|
||||||
options = ''
|
options = ''
|
||||||
maven_local_repo_path = '~/local-releases'
|
maven_local_repo_path = '~/local-releases'
|
||||||
maven_settings_file = '~/.m2/settings.xml'
|
maven_settings_file = '~/.m2/jenkins-releases-settings.xml'
|
||||||
}
|
}
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
|
||||||
|
@ -25,7 +36,7 @@ pipeline {
|
||||||
}
|
}
|
||||||
|
|
||||||
parameters {
|
parameters {
|
||||||
choice(choices: ['SNAPSHOT', 'RELEASE'],
|
choice(choices: ['SNAPSHOT-DRY-RUN', 'SNAPSHOT', 'RELEASE-DRY-RUN', 'RELEASE'],
|
||||||
description: 'The type of artifacts the build is expected to generate',
|
description: 'The type of artifacts the build is expected to generate',
|
||||||
name: 'Type')
|
name: 'Type')
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue