summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
ed8ea73)
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 <matthew.mcneilly@est.tech>
Change-Id: Ia8ae707230ee8dab5bd97c429ca3e99b0d810f87
# Ensure at root of $WORKSPACE
cd $WORKSPACE
# 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
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
if [ ! -f "$ARTIFACT" ]; then
echo "$ARTIFACT does not exist."
exit 1
echo "----------------------------------------------------"
echo "Info: Copy $ARTIFACT into $ARTIFACT_DIRECTORY"
echo "----------------------------------------------------"
echo "----------------------------------------------------"
echo "Info: Copy $ARTIFACT into $ARTIFACT_DIRECTORY"
echo "----------------------------------------------------"
- ln -sf $WORKSPACE/$ARTIFACT $ARTIFACT_DIRECTORY
+ cp $WORKSPACE/$ARTIFACT $ARTIFACT_DIRECTORY
done
cd $ARTIFACT_DIRECTORY
done
cd $ARTIFACT_DIRECTORY