Skip to content
Snippets Groups Projects
Commit 87097361 authored by Gervaise Henry's avatar Gervaise Henry :cowboy:
Browse files

Fix aws status check conditional

parent ff3c5146
Branches
Tags
1 merge request!81Develop
Pipeline #9723 passed with warnings with stages
in 53 seconds
...@@ -1102,10 +1102,10 @@ aws: ...@@ -1102,10 +1102,10 @@ aws:
id=$(echo ${id}| grep -oP "jobId\K.*" | tr -d '"' | tr -d ":" | tr -d " " | tr -d "}") id=$(echo ${id}| grep -oP "jobId\K.*" | tr -d '"' | tr -d ":" | tr -d " " | tr -d "}")
- > - >
status=$(aws batch describe-jobs --jobs ${id} | grep -oP "status\": \K.*" | tr -d '"' | tr -d ',' | tr -d " " ) && status=$(aws batch describe-jobs --jobs ${id} | grep -oP "status\": \K.*" | tr -d '"' | tr -d ',' | tr -d " " ) &&
until [[ "${status}" == "SUCCEEDED" ] || [ "${status}" == "FAILED" ]]; do until [[ "${status}" == "SUCCEEDED" || "${status}" == "FAILED" ]]; do
status=$(aws batch describe-jobs --jobs ${id} | grep -oP "status\": \K.*" | tr -d '"' | tr -d ',' | tr -d " " ) && status=$(aws batch describe-jobs --jobs ${id} | grep -oP "status\": \K.*" | tr -d '"' | tr -d ',' | tr -d " " ) &&
echo ${status} && echo ${status}
if [[ "${status}" != "SUCCEEDED" && "${status}" != "FAILED" ]]; then if [[ "${status}" != "SUCCEEDED" ] && [ "${status}" != "FAILED" ]]; then
sleep 1m sleep 1m
fi fi
done done
...@@ -1114,6 +1114,7 @@ aws: ...@@ -1114,6 +1114,7 @@ aws:
curl --request GET https://img.shields.io/badge/Envronment%3A%20AWS-run%20succesful-success?style=flat > ./badges/env/aws.svg curl --request GET https://img.shields.io/badge/Envronment%3A%20AWS-run%20succesful-success?style=flat > ./badges/env/aws.svg
else else
curl --request GET https://img.shields.io/badge/Envronment%3A%20AWS-run%20failed-critical?style=flat > ./badges/env/aws.svg curl --request GET https://img.shields.io/badge/Envronment%3A%20AWS-run%20failed-critical?style=flat > ./badges/env/aws.svg
exit 1
fi fi
after_script: after_script:
- module load awscli/1.11.139 - module load awscli/1.11.139
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment