From 5e47a57d9047f3c56ba770538bc5afa9e8687ffd Mon Sep 17 00:00:00 2001 From: matthew-mcneilly Date: Wed, 29 Jul 2020 16:36:04 +0100 Subject: [PATCH] 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 --- jjb/onap/uds/scripts/collect-artifacts.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/jjb/onap/uds/scripts/collect-artifacts.sh b/jjb/onap/uds/scripts/collect-artifacts.sh index 3cc778e9..20bb3eed 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 -- 2.25.1