From: matthew-mcneilly Date: Wed, 29 Jul 2020 15:36:04 +0000 (+0100) Subject: Fix for the collecting of artifacts X-Git-Url: https://gerrit.nordix.org/gitweb?a=commitdiff_plain;h=5e47a57d9047f3c56ba770538bc5afa9e8687ffd;p=infra%2Fcicd.git Fix for the collecting of artifacts Follow on change for https://gerrit.nordix.org/#/c/infra/cicd/+/5154/ Switching from soft links to copying artifacts Artifacts in target directories are removed during mvn clean process when archving source repos resulting in build failing because they arent found when promoting Signed-off-by: matthew-mcneilly Change-Id: Ia8ae707230ee8dab5bd97c429ca3e99b0d810f87 --- diff --git a/jjb/onap/uds/scripts/collect-artifacts.sh b/jjb/onap/uds/scripts/collect-artifacts.sh index 3cc778e96..20bb3eed0 100644 --- a/jjb/onap/uds/scripts/collect-artifacts.sh +++ b/jjb/onap/uds/scripts/collect-artifacts.sh @@ -27,12 +27,13 @@ mkdir -p $ARTIFACT_DIRECTORY # Ensure at root of $WORKSPACE cd $WORKSPACE -# For each file artifact create a reference in ARTIFACT_DIRECTORY -# uses softlinks in order to save space and time -# ARTIFACT_DIRECTORY contents will be pushed to Artifactory +# For each file artifact create a copy in ARTIFACT_DIRECTORY +# ARTIFACT_DIRECTORY's contents will be pushed to Artifactory +# Required because artifacts in target directories will be deleted during a mvn clean +# which is done before archiving the source repos in order limit file size for ARTIFACT in $ARTIFACT_PATHS do - # Check if file exists before creating a softlink + # Check if file exists before copying if [ ! -f "$ARTIFACT" ]; then echo "$ARTIFACT does not exist." exit 1 @@ -41,7 +42,7 @@ do echo "----------------------------------------------------" echo "Info: Copy $ARTIFACT into $ARTIFACT_DIRECTORY" echo "----------------------------------------------------" - ln -sf $WORKSPACE/$ARTIFACT $ARTIFACT_DIRECTORY + cp $WORKSPACE/$ARTIFACT $ARTIFACT_DIRECTORY done cd $ARTIFACT_DIRECTORY