Restore release-dry-run. Remove build number from the repo path.

This commit is contained in:
Manuele Simi 2019-10-10 10:18:12 -04:00
parent d748085413
commit b9c2e5a12c
1 changed files with 4 additions and 4 deletions

8
Jenkinsfile vendored
View File

@ -77,7 +77,7 @@ pipeline {
// see https://jenkins.io/doc/book/pipeline/syntax/#parameters // see https://jenkins.io/doc/book/pipeline/syntax/#parameters
parameters { parameters {
choice(name: 'Type', choice(name: 'Type',
choices: ['SNAPSHOT-DRY-RUN', 'SNAPSHOT', 'STAGING', 'RELEASE'], choices: ['SNAPSHOT-DRY-RUN', 'SNAPSHOT', 'STAGING', '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')
string(name: 'gCube_release_version', string(name: 'gCube_release_version',
@ -92,7 +92,7 @@ pipeline {
sh ''' sh '''
echo "Create a fresh local repository" echo "Create a fresh local repository"
rm -rf $MAVEN_LOCAL_REPO rm -rf $MAVEN_LOCAL_REPO
mkdir -p $MAVEN_LOCAL_REPO/${PIPELINE_BUILD_NUMBER}/ mkdir -p $MAVEN_LOCAL_REPO
echo "Done with local repository" echo "Done with local repository"
''' '''
@ -103,7 +103,7 @@ pipeline {
steps { steps {
echo build(job: 'maven-parent', wait: true, echo build(job: 'maven-parent', wait: true,
parameters: [[$class: 'StringParameterValue', name: 'gcube_settings', value: "${maven_settings_file}"], parameters: [[$class: 'StringParameterValue', name: 'gcube_settings', value: "${maven_settings_file}"],
[$class: 'StringParameterValue', name: 'local_repo', value: "${maven_local_repo_path}/${PIPELINE_BUILD_NUMBER}"], [$class: 'StringParameterValue', name: 'local_repo', value: "${maven_local_repo_path}"],
[$class: 'LabelParameterValue', name: 'exec_label', label: "CD", nodeEligibility: [$class: 'AllNodeEligibility']] [$class: 'LabelParameterValue', name: 'exec_label', label: "CD", nodeEligibility: [$class: 'AllNodeEligibility']]
]).result ]).result
echo "Done with maven-parent" echo "Done with maven-parent"
@ -198,7 +198,7 @@ def buildComponents(args, maven_settings_file, maven_local_repo_path) {
if (name && !"NONE".equalsIgnoreCase(name)) if (name && !"NONE".equalsIgnoreCase(name))
build(job: name, build(job: name,
parameters: [[$class: 'StringParameterValue', name: 'gcube_settings', value: "${maven_settings_file}"], parameters: [[$class: 'StringParameterValue', name: 'gcube_settings', value: "${maven_settings_file}"],
[$class: 'StringParameterValue', name: 'local_repo', value: "${maven_local_repo_path}/${PIPELINE_BUILD_NUMBER}"], [$class: 'StringParameterValue', name: 'local_repo', value: "${maven_local_repo_path}"],
[$class: 'LabelParameterValue', name: 'exec_label', label: "CD", nodeEligibility: [$class: 'AllNodeEligibility']] [$class: 'LabelParameterValue', name: 'exec_label', label: "CD", nodeEligibility: [$class: 'AllNodeEligibility']]
]) ])
} }