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

Fix the hub count badges

parent 50b56cab
Branches
Tags
1 merge request!76Develop
Pipeline #9637 canceled with stages
in 1 hour, 52 minutes, and 44 seconds
......@@ -17,23 +17,32 @@ dev_count=0
for rid in ${dev_workflow_RID}
do
temp_count=$(curl -s https://dev.gudmap.org/ermrest/catalog/2/entity/RNASeq:Execution_Run/Execution_Status=Success/Workflow=${rid} | grep -o \"Replicate\".*,\"Workflow | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Workflow)" | sort | uniq | wc -l)
dev_count=$(expr ${dev_count} + ${temp_count})
dev_success=$(expr ${dev_success} + ${temp_count})
temp_count=$(curl -s https://dev.gudmap.org/ermrest/catalog/2/entity/RNASeq:Execution_Run/Execution_Status=Error/Workflow=${rid} | grep -o \"Replicate\".*,\"Workflow | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Workflow)" | sort | uniq | wc -l)
dev_error=$(expr ${dev_error} + ${temp_count})
done
staging_count=0
for rid in ${staging_workflow_RID}
do
temp_count=$(curl -s https://staging.gudmap.org/ermrest/catalog/2/entity/RNASeq:Execution_Run/Execution_Status=Success/Workflow=${rid} | grep -o \"Replicate\".*,\"Workflow | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Workflow)" | sort | uniq | wc -l)
staging_count=$(expr ${staging_count} + ${temp_count})
staging_success=$(expr ${staging_success} + ${temp_count})
temp_count=$(curl -s https://staging.gudmap.org/ermrest/catalog/2/entity/RNASeq:Execution_Run/Execution_Status=Error/Workflow=${rid} | grep -o \"Replicate\".*,\"Workflow | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Workflow)" | sort | uniq | wc -l)
staging_error=$(expr ${staging_error} + ${temp_count})
done
prod_count=0
for rid in ${prod_workflow_RID}
do
temp_count=$(curl -s https://www.gudmap.org/ermrest/catalog/2/entity/RNASeq:Execution_Run/Execution_Status=Success/Workflow=${rid} | grep -o \"Replicate\".*,\"Workflow | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Workflow)" | sort | uniq | wc -l)
prod_count=$(expr ${prod_count} + ${temp_count})
prod_success=$(expr ${prod_success} + ${temp_count})
temp_count=$(curl -s https://www.gudmap.org/ermrest/catalog/2/entity/RNASeq:Execution_Run/Execution_Status=Error/Workflow=${rid} | grep -o \"Replicate\".*,\"Workflow | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Workflow)" | sort | uniq | wc -l)
prod_error=$(expr ${prod_error} + ${temp_count})
done
echo "collecting badges"
mkdir -p ./badges/counts
curl --request GET https://img.shields.io/badge/Development%20Replicate%20Count-${dev_count}-lightgrey?style=flat > ./badges/counts/dev_counts.svg
curl --request GET https://img.shields.io/badge/Staging%20Replicate%20Count-${staging_count}-lightgrey?style=flat > ./badges/counts/staging_counts.svg
curl --request GET https://img.shields.io/badge/Production%20Replicate%20Count-${prod_count}-lightgrey?style=flat > ./badges/counts/prod_counts.svg
curl --request GET https://img.shields.io/badge/Development%20Replicate%20Success-${dev_success}-lightgrey?style=flat > ./badges/counts/dev_success.svg
curl --request GET https://img.shields.io/badge/Staging%20Replicate%20Success-${staging_success}-lightgrey?style=flat > ./badges/counts/staging_success.svg
curl --request GET https://img.shields.io/badge/Production%20Replicate%20Success-${prod_success}-lightgrey?style=flat > ./badges/counts/prod_success.svg
curl --request GET https://img.shields.io/badge/Development%20Replicate%20Error-${dev_error}-lightgrey?style=flat > ./badges/counts/dev_error.svg
curl --request GET https://img.shields.io/badge/Staging%20Replicate%20Error-${staging_error}-lightgrey?style=flat > ./badges/counts/staging_error.svg
curl --request GET https://img.shields.io/badge/Production%20Replicate%20Error-${prod_error}-lightgrey?style=flat > ./badges/counts/prod_error.svg
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