proper exit codes

pull/10408/head
Sharif Elgamal 2021-02-18 14:48:46 -08:00
parent df036e1e00
commit dfc2e85465
1 changed files with 3 additions and 2 deletions

View File

@ -52,13 +52,14 @@ yes|make push-kic-base-image
# Abort with error message if above command failed # Abort with error message if above command failed
if [ $? -gt 0 ]; then if [ $? -gt 0 ]; then
ec=$?
curl -s -H "Authorization: token ${access_token}" \ curl -s -H "Authorization: token ${access_token}" \
-H "Accept: application/vnd.github.v3+json" \ -H "Accept: application/vnd.github.v3+json" \
-X POST -d "{\"body\": \"Hi ${ghprbPullAuthorLoginMention}, building a new kicbase image failed, please try again.\"}" "https://api.github.com/repos/kubernetes/minikube/issues/$ghprbPullId/comments" -X POST -d "{\"body\": \"Hi ${ghprbPullAuthorLoginMention}, building a new kicbase image failed, please try again.\"}" "https://api.github.com/repos/kubernetes/minikube/issues/$ghprbPullId/comments"
exit $? exit $ec
fi fi
# Retrieve the sha from the new imnage # Retrieve the sha from the new image
docker pull $GCR_IMG docker pull $GCR_IMG
fullsha=$(docker inspect --format='{{index .RepoDigests 0}}' $KICBASE_IMAGE_REGISTRIES) fullsha=$(docker inspect --format='{{index .RepoDigests 0}}' $KICBASE_IMAGE_REGISTRIES)
sha=$(echo ${fullsha} | cut -d ":" -f 2) sha=$(echo ${fullsha} | cut -d ":" -f 2)