diff --git a/Jenkinsfile b/Jenkinsfile index 383a1fd..e3e0de2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -77,7 +77,7 @@ pipeline { MAVEN_SETTINGS_FILE = "${maven_settings_file}" MAVEN_LOCAL_REPO = "${agent_root_folder}/${maven_local_repo_path}" CLEANUP_GCUBE_REPO = "${params.cleanup_gcube_artifacts}" - REMOVE_LOCAL_REPO = "true" + REMOVE_LOCAL_REPO = "${params.cleanup_local_repo}" GCUBE_RELEASE_NUMBER = "${params.gCube_release_version}" PIPELINE_BUILD_NUMBER = "${env.BUILD_NUMBER}" } @@ -112,7 +112,7 @@ pipeline { echo "Remove gCube artifacts from local repository" rm -rf $MAVEN_LOCAL_REPO/org/gcube fi - if [ "$CLEANUP_LOCAL_REPO" = "true" ]; then + if [ "$REMOVE_LOCAL_REPO" = "true" ]; then echo "Create a fresh local repository" rm -rf $MAVEN_LOCAL_REPO mkdir -p $MAVEN_LOCAL_REPO