diff --git a/builder/build-image.sh b/builder/build-image.sh index feb4e97..17ca853 100755 --- a/builder/build-image.sh +++ b/builder/build-image.sh @@ -75,19 +75,22 @@ else pushd builder sed -i -e "s/%TOKEN%/$(cat ../.oidc_token)/" auth.dat sed -i -e "s/%IMAGE%/$IMAGE_ID/" vm.yaml + set -x im_client.py create vm.yaml IM_INFRA_ID=$(im_client.py list | grep --extended-regexp --invert-match 'im.egi.eu|ID') # get SSH command to connect to the VM # do pay attention to the "1" parameter, it corresponds to the "show_only" flag SSH_CMD=$(im_client.py ssh "$IM_INFRA_ID" 1 | grep --invert-match 'im.egi.eu') # if the below works, the VM is up and running and responds to SSH - "$SSH_CMD true" + "$SSH_CMD true" || echo "Failed, still keep going" # at this point we may want to run more sophisticated tests # delete test VM im_client.py destroy "$IM_INFRA_ID" # delete test VMI openstack --os-cloud tests --os-token "$OS_TOKEN" image delete "$IMAGE_ID" popd + # force failure to avoid uploading + exit 1 # All going well, upload the VMI for sharing in AppDB builder/refresh.sh vo.access.egi.eu "$(cat /var/tmp/egi/.refresh_token)" images