feature/22849 #2
|
@ -2,7 +2,7 @@
|
||||||
import org.yaml.snakeyaml.Yaml
|
import org.yaml.snakeyaml.Yaml
|
||||||
|
|
||||||
// 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, maven_activation_property, maven_parent_file) = ['', '', '', '', '']
|
def (options, maven_local_repo_path, maven_settings_file, maven_activation_property) = ['', '', '', '']
|
||||||
def agent_root_folder = '/var/lib/jenkins/.m2'
|
def agent_root_folder = '/var/lib/jenkins/.m2'
|
||||||
def verbose = true
|
def verbose = true
|
||||||
def resume = params.resume_from
|
def resume = params.resume_from
|
||||||
|
@ -12,7 +12,6 @@ if (params.Type == 'SNAPSHOT-DRY-RUN') {
|
||||||
maven_local_repo_path = "local-snapshots"
|
maven_local_repo_path = "local-snapshots"
|
||||||
maven_settings_file = "gcube-settings.xml"
|
maven_settings_file = "gcube-settings.xml"
|
||||||
maven_activation_property="-Pdry-run";
|
maven_activation_property="-Pdry-run";
|
||||||
// maven_parent_file = "jenkins-snapshots-dry-run-settings.xml"
|
|
||||||
}
|
}
|
||||||
if (params.Type == 'SNAPSHOT') {
|
if (params.Type == 'SNAPSHOT') {
|
||||||
echo "Configure Maven for SNAPSHOT artifacts"
|
echo "Configure Maven for SNAPSHOT artifacts"
|
||||||
|
@ -20,7 +19,6 @@ if (params.Type == 'SNAPSHOT') {
|
||||||
maven_local_repo_path = "local-snapshots"
|
maven_local_repo_path = "local-snapshots"
|
||||||
maven_settings_file = "gcube-settings.xml"
|
maven_settings_file = "gcube-settings.xml"
|
||||||
maven_activation_property='';
|
maven_activation_property='';
|
||||||
// maven_parent_file = "jenkins-snapshots-dry-run-settings.xml"
|
|
||||||
}
|
}
|
||||||
if (params.Type == 'RELEASE-DRY-RUN') {
|
if (params.Type == 'RELEASE-DRY-RUN') {
|
||||||
echo "Configure Maven for RELEASE-DRY-RUN artifacts"
|
echo "Configure Maven for RELEASE-DRY-RUN artifacts"
|
||||||
|
@ -28,7 +26,6 @@ if (params.Type == 'RELEASE-DRY-RUN') {
|
||||||
maven_local_repo_path = "local-releases"
|
maven_local_repo_path = "local-releases"
|
||||||
maven_settings_file = "jenkins-releases-settings.xml"
|
maven_settings_file = "jenkins-releases-settings.xml"
|
||||||
maven_activation_property="-Pdry-run -Djenkins-releases -DRelease";
|
maven_activation_property="-Pdry-run -Djenkins-releases -DRelease";
|
||||||
// maven_parent_file = "jenkins-releases-dry-run-settings.xml"
|
|
||||||
}
|
}
|
||||||
if (params.Type == 'STAGING') {
|
if (params.Type == 'STAGING') {
|
||||||
echo "Configure Maven for STAGING artifacts"
|
echo "Configure Maven for STAGING artifacts"
|
||||||
|
@ -36,7 +33,6 @@ if (params.Type == 'STAGING') {
|
||||||
maven_local_repo_path = "local-staging"
|
maven_local_repo_path = "local-staging"
|
||||||
maven_settings_file = "jenkins-staging-settings.xml"
|
maven_settings_file = "jenkins-staging-settings.xml"
|
||||||
maven_activation_property="-Djenkins-staging -DRelease";
|
maven_activation_property="-Djenkins-staging -DRelease";
|
||||||
// maven_parent_file = "jenkins-staging-dry-run-settings.xml"
|
|
||||||
}
|
}
|
||||||
if (params.Type == 'RELEASE') {
|
if (params.Type == 'RELEASE') {
|
||||||
echo "Configure Maven for RELEASE artifacts"
|
echo "Configure Maven for RELEASE artifacts"
|
||||||
|
@ -44,9 +40,7 @@ if (params.Type == 'RELEASE') {
|
||||||
maven_local_repo_path = "local-releases"
|
maven_local_repo_path = "local-releases"
|
||||||
maven_settings_file = "jenkins-releases-settings.xml"
|
maven_settings_file = "jenkins-releases-settings.xml"
|
||||||
maven_activation_property="-Djenkins-releases -DRelease";
|
maven_activation_property="-Djenkins-releases -DRelease";
|
||||||
// maven_parent_file = "jenkins-releases-dry-run-settings.xml"
|
|
||||||
}
|
}
|
||||||
maven_parent_file=maven_settings_file;
|
|
||||||
|
|
||||||
echo "Use settings file at ${maven_settings_file} with the following activation property: ${maven_activation_property}"
|
echo "Use settings file at ${maven_settings_file} with the following activation property: ${maven_activation_property}"
|
||||||
echo "Use local repo at ${maven_local_repo_path}"
|
echo "Use local repo at ${maven_local_repo_path}"
|
||||||
|
@ -99,7 +93,6 @@ pipeline {
|
||||||
AGENT_ROOT_FOLDER = "${agent_root_folder}"
|
AGENT_ROOT_FOLDER = "${agent_root_folder}"
|
||||||
MAVEN_SETTINGS_FILE = "${maven_settings_file}"
|
MAVEN_SETTINGS_FILE = "${maven_settings_file}"
|
||||||
MAVEN_ACTIVATION_PROPERTY = "${maven_activation_property}"
|
MAVEN_ACTIVATION_PROPERTY = "${maven_activation_property}"
|
||||||
MAVEN_PARENT_FILE = "${maven_parent_file}"
|
|
||||||
MAVEN_LOCAL_REPO = "${agent_root_folder}/${maven_local_repo_path}"
|
MAVEN_LOCAL_REPO = "${agent_root_folder}/${maven_local_repo_path}"
|
||||||
CLEANUP_GCUBE_REPO = "${params.cleanup_gcube_artifacts}"
|
CLEANUP_GCUBE_REPO = "${params.cleanup_gcube_artifacts}"
|
||||||
REMOVE_LOCAL_REPO = "${params.cleanup_local_repo}"
|
REMOVE_LOCAL_REPO = "${params.cleanup_local_repo}"
|
||||||
|
|
Loading…
Reference in New Issue