New parameter to wipe out the gcube artifacts before the builds.
This commit is contained in:
parent
f9035789e8
commit
1b642328ec
|
@ -76,6 +76,8 @@ pipeline {
|
|||
GCUBE_RELEASE_NUMBER = "${params.gCube_release_version}"
|
||||
PIPELINE_BUILD_NUMBER = "${env.BUILD_NUMBER}"
|
||||
CLEANUP_LOCAL_REPO = "${params.cleanup_local_repo}"
|
||||
CLEANUP_GCUBE_REPO = "${params.cleanup_gcube_artifacts}"
|
||||
|
||||
}
|
||||
|
||||
// see https://jenkins.io/doc/book/pipeline/syntax/#parameters
|
||||
|
@ -88,9 +90,13 @@ pipeline {
|
|||
defaultValue: 'x.y.z',
|
||||
description: 'The number of the gCube release to build. Sample values: 4.14, 4.15, etc.')
|
||||
|
||||
booleanParam(name: 'cleanup_gcube_artifacts',
|
||||
defaultValue: true,
|
||||
description: 'Wipe out the gcube artifacts from the local maven repository before the builds?')
|
||||
|
||||
booleanParam(name: 'cleanup_local_repo',
|
||||
defaultValue: true,
|
||||
description: 'Whether the local maven repository needs to be wiped out before the builds.')
|
||||
description: 'Wipe out the local maven repository before the builds?')
|
||||
}
|
||||
|
||||
//see https://jenkins.io/doc/book/pipeline/syntax/#stages
|
||||
|
@ -98,6 +104,10 @@ pipeline {
|
|||
stage('clean up before starting') {
|
||||
steps {
|
||||
sh '''
|
||||
if [ "$CLEANUP_GCUBE_REPO" = "true" ]; then
|
||||
echo "REmove gCube artifacts from local repository"
|
||||
rm -rf $MAVEN_LOCAL_REPO/org/gcube
|
||||
fi
|
||||
if [ "$CLEANUP_LOCAL_REPO" = "true" ]; then
|
||||
echo "Create a fresh local repository"
|
||||
rm -rf $MAVEN_LOCAL_REPO
|
||||
|
|
Loading…
Reference in New Issue