when the resume option is selected, the local repo won't be deleted

#18304
This commit is contained in:
Roberto Cirillo 2020-01-13 15:12:25 +01:00
parent 43416769e3
commit 2fb8abfaa2
1 changed files with 13 additions and 11 deletions

2
Jenkinsfile vendored
View File

@ -165,6 +165,7 @@ pipeline {
stage('initialize local repository') {
steps {
sh '''
if [ "$RESUME" = "false" ]; then
echo "REMOVE_LOCAL_REPO: ${REMOVE_LOCAL_REPO}"
echo "CLEANUP_GCUBE_REPO: ${CLEANUP_GCUBE_REPO}"
if [ "$CLEANUP_GCUBE_REPO" = "true" ]; then
@ -176,6 +177,7 @@ pipeline {
rm -rf $MAVEN_LOCAL_REPO
mkdir -p $MAVEN_LOCAL_REPO
fi
fi
mv "${AGENT_ROOT_FOLDER}/settings.xml" "${AGENT_ROOT_FOLDER}/settings.${PIPELINE_BUILD_NUMBER}"
cp "${AGENT_ROOT_FOLDER}/${MAVEN_SETTINGS_FILE}" "${AGENT_ROOT_FOLDER}/settings.xml"
echo "Done with local repository and settings"