Add executable attribute to opnfv bin file 05/29205/1
authorAlex Yang <yangyang1@zte.com.cn>
Wed, 22 Feb 2017 08:57:37 +0000 (16:57 +0800)
committerAlex Yang <yangyang1@zte.com.cn>
Wed, 22 Feb 2017 08:57:37 +0000 (16:57 +0800)
1. Add executable attribute to the build-output bin file
2. Determine whether the bin file exists and is excutable before deployment

Change-Id: I95b43c9efacfbd47a5f570dac793c0a8d3fe9bbb
Signed-off-by: Alex Yang <yangyang1@zte.com.cn>
ci/build_rpm/build_rpms_docker.sh
ci/deploy/deploy.sh

index 6299304..4434157 100755 (executable)
@@ -52,5 +52,6 @@ do
 done
 cd ..
 mv target/el7/noarch/installdaisy_el7_noarch.bin target/el7/noarch/opnfv-${OPNFV_ARTIFACT_VERSION}.bin
+chmod +x target/el7/noarch/opnfv-${OPNFV_ARTIFACT_VERSION}.bin
 cp target/el7/noarch/opnfv-${OPNFV_ARTIFACT_VERSION}.bin $rpm_output_dir
 exit $rc
index e68368a..af044f4 100755 (executable)
@@ -179,6 +179,11 @@ if [ $DRY_RUN -eq 1 ]; then
     exit 1
 fi
 
+if [ ! -x ${WORKSPACE}/opnfv.bin ]; then
+    echo "opnfv.bin does not exist in WORKSPACE or is not executable, exit."
+    exit 1
+fi
+
 test -d ${VM_STORAGE} || mkdir -p ${VM_STORAGE}
 
 function create_node