summaryrefslogtreecommitdiffstats
path: root/jjb/apex/apex-build.sh
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2017-09-23 10:23:33 -0400
committerTim Rozet <trozet@redhat.com>2017-09-23 10:41:59 -0400
commit426fd8603c24d0fdb5cc019f2aea6080ddba6744 (patch)
tree7608a8f5e75429bb4343f8d51d63cbeae7d14907 /jjb/apex/apex-build.sh
parent66799d851d0a64563a59bb2d92840d46a527a79d (diff)
Apex: Fixes iso verify depending on previous build workspace
There is a bug where if there are multiple builds queued and daily build completes, the following iso verify job will try to use the workspace of the completed daily build to get the iso file. However, if another build job has already started it may clean and overwrite the workspace of the daily build job, and the iso verify job will fail because the file is now gone. This makes the build job copy the iso to a tmp directory for apex iso verify to consume. This should be safe since only one daily can run at a time on the host and daily jobs build and iso verify have to always execute on the same node. Change-Id: Ie8e32c4abefbc311e505688d6da2b26ae08ed98f Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'jjb/apex/apex-build.sh')
-rwxr-xr-xjjb/apex/apex-build.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/jjb/apex/apex-build.sh b/jjb/apex/apex-build.sh
index 23ce81015..cf5999832 100755
--- a/jjb/apex/apex-build.sh
+++ b/jjb/apex/apex-build.sh
@@ -46,6 +46,12 @@ echo "Cache Directory Contents:"
echo "-------------------------"
ls -al $CACHE_DIRECTORY
+if [[ "$BUILD_ARGS" =~ '--iso' ]]; then
+ mkdir -p /tmp/apex-iso/
+ rm -f /tmp/apex-iso/*.iso
+ cp -f $BUILD_DIRECTORY/../.build/release/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso /tmp/apex-iso/
+fi
+
if ! echo $ARTIFACT_VERSION | grep "dev" 1> /dev/null; then
echo "Writing opnfv.properties file"
# save information regarding artifact into file