when the resume option is selected, the local repo won't be deleted
#18304
This commit is contained in:
parent
43416769e3
commit
2fb8abfaa2
|
@ -165,17 +165,19 @@ pipeline {
|
||||||
stage('initialize local repository') {
|
stage('initialize local repository') {
|
||||||
steps {
|
steps {
|
||||||
sh '''
|
sh '''
|
||||||
echo "REMOVE_LOCAL_REPO: ${REMOVE_LOCAL_REPO}"
|
if [ "$RESUME" = "false" ]; then
|
||||||
echo "CLEANUP_GCUBE_REPO: ${CLEANUP_GCUBE_REPO}"
|
echo "REMOVE_LOCAL_REPO: ${REMOVE_LOCAL_REPO}"
|
||||||
if [ "$CLEANUP_GCUBE_REPO" = "true" ]; then
|
echo "CLEANUP_GCUBE_REPO: ${CLEANUP_GCUBE_REPO}"
|
||||||
echo "Remove gCube artifacts from local repository"
|
if [ "$CLEANUP_GCUBE_REPO" = "true" ]; then
|
||||||
rm -rf $MAVEN_LOCAL_REPO/org/gcube
|
echo "Remove gCube artifacts from local repository"
|
||||||
fi
|
rm -rf $MAVEN_LOCAL_REPO/org/gcube
|
||||||
if [ "$REMOVE_LOCAL_REPO" = "true" ]; then
|
fi
|
||||||
echo "Create a fresh local repository"
|
if [ "$REMOVE_LOCAL_REPO" = "true" ]; then
|
||||||
rm -rf $MAVEN_LOCAL_REPO
|
echo "Create a fresh local repository"
|
||||||
mkdir -p $MAVEN_LOCAL_REPO
|
rm -rf $MAVEN_LOCAL_REPO
|
||||||
fi
|
mkdir -p $MAVEN_LOCAL_REPO
|
||||||
|
fi
|
||||||
|
fi
|
||||||
mv "${AGENT_ROOT_FOLDER}/settings.xml" "${AGENT_ROOT_FOLDER}/settings.${PIPELINE_BUILD_NUMBER}"
|
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"
|
cp "${AGENT_ROOT_FOLDER}/${MAVEN_SETTINGS_FILE}" "${AGENT_ROOT_FOLDER}/settings.xml"
|
||||||
echo "Done with local repository and settings"
|
echo "Done with local repository and settings"
|
||||||
|
|
Loading…
Reference in New Issue