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

Add new badges for execution run success/error

parent 296454d1
Branches
Tags
2 merge requests!77Docs,!76Develop
Pipeline #9209 passed with stages
in 3 minutes and 7 seconds
......@@ -13,27 +13,52 @@ staging_workflow_RID=$(curl -s https://staging.gudmap.org/ermrest/catalog/2/enti
prod_workflow_RID=$(curl -s https://www.gudmap.org/ermrest/catalog/2/entity/RNASeq:Workflow/Version::ciregexp::%5E${current_pipeline_versionMajor} | grep -o '\"RID\":\".*\",\"RCT' | cut -f4 -d"\"")
echo "collecting unique replicates with successful execution runs"
dev_count=0
dev_total=0
dev_success=0
dev_error=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})
temp_total=$(curl -s https://dev.gudmap.org/ermrest/catalog/2/entity/Q:=RNASeq:mRNA_QC/E:=(Execution_Run)=(RNASeq:Execution_Run:RID)/Workflow=${rid}/!Execution_Status=In-progress/\$Q | grep -o \"Replicate\".*,\"Paired_End | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Paired_End)" | sort | uniq | wc -l)
dev_total=$(expr ${dev_total} + ${temp_total})
temp_sucess=$(curl -s https://dev.gudmap.org/ermrest/catalog/2/entity/Q:=RNASeq:mRNA_QC/E:=(Execution_Run)=(RNASeq:Execution_Run:RID)/Workflow=${rid}/!Execution_Status=In-progress/\$Q | grep -o \"Replicate\".*,\"Paired_End | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Paired_End)" | sort | uniq | wc -l)
dev_success=$(expr ${dev_success} + ${temp_success})
temp_error=$(curl -s https://dev.gudmap.org/ermrest/catalog/2/entity/Q:=RNASeq:mRNA_QC/E:=(Execution_Run)=(RNASeq:Execution_Run:RID)/Workflow=${rid}/!Execution_Status=In-progress/\$Q | grep -o \"Replicate\".*,\"Paired_End | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Paired_End)" | sort | uniq | wc -l)
dev_error=$(expr ${dev_error} + ${temp_error})
done
staging_count=0
staging_total=0
staging_success=0
staging_error=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})
temp_total=$(curl -s https://dev.gudmap.org/ermrest/catalog/2/entity/Q:=RNASeq:mRNA_QC/E:=(Execution_Run)=(RNASeq:Execution_Run:RID)/Workflow=${rid}/!Execution_Status=In-progress/\$Q | grep -o \"Replicate\".*,\"Paired_End | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Paired_End)" | sort | uniq | wc -l)
staging_total=$(expr ${staging_total} + ${temp_total})
temp_sucess=$(curl -s https://dev.gudmap.org/ermrest/catalog/2/entity/Q:=RNASeq:mRNA_QC/E:=(Execution_Run)=(RNASeq:Execution_Run:RID)/Workflow=${rid}/!Execution_Status=In-progress/\$Q | grep -o \"Replicate\".*,\"Paired_End | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Paired_End)" | sort | uniq | wc -l)
staging_success=$(expr ${staging_success} + ${temp_success})
temp_error=$(curl -s https://dev.gudmap.org/ermrest/catalog/2/entity/Q:=RNASeq:mRNA_QC/E:=(Execution_Run)=(RNASeq:Execution_Run:RID)/Workflow=${rid}/!Execution_Status=In-progress/\$Q | grep -o \"Replicate\".*,\"Paired_End | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Paired_End)" | sort | uniq | wc -l)
staging_error=$(expr ${staging_error} + ${temp_error})
done
prod_count=0
prod_total=0
prod_success=0
prod_error=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})
temp_total=$(curl -s https://dev.gudmap.org/ermrest/catalog/2/entity/Q:=RNASeq:mRNA_QC/E:=(Execution_Run)=(RNASeq:Execution_Run:RID)/Workflow=${rid}/!Execution_Status=In-progress/\$Q | grep -o \"Replicate\".*,\"Paired_End | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Paired_End)" | sort | uniq | wc -l)
prod_total=$(expr ${prod_total} + ${temp_total})
temp_sucess=$(curl -s https://dev.gudmap.org/ermrest/catalog/2/entity/Q:=RNASeq:mRNA_QC/E:=(Execution_Run)=(RNASeq:Execution_Run:RID)/Workflow=${rid}/!Execution_Status=In-progress/\$Q | grep -o \"Replicate\".*,\"Paired_End | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Paired_End)" | sort | uniq | wc -l)
prod_success=$(expr ${prod_success} + ${temp_success})
temp_error=$(curl -s https://dev.gudmap.org/ermrest/catalog/2/entity/Q:=RNASeq:mRNA_QC/E:=(Execution_Run)=(RNASeq:Execution_Run:RID)/Workflow=${rid}/!Execution_Status=In-progress/\$Q | grep -o \"Replicate\".*,\"Paired_End | grep -oP "(?<=\"Replicate\":\").*(?=\",\"Paired_End)" | sort | uniq | wc -l)
prod_error=$(expr ${prod_error} + ${temp_error})
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%20Count-${dev_success}/${dev_total}-green?style=flat > ./badges/counts/dev_success.svg
curl --request GET https://img.shields.io/badge/Development%20Replicate%20Count-${dev_error}/${dev_total}-green?style=flat > ./badges/counts/dev_error.svg
curl --request GET https://img.shields.io/badge/Development%20Replicate%20Count-${staging_success}/${staging_total}-green?style=flat > ./badges/counts/staging_success.svg
curl --request GET https://img.shields.io/badge/Development%20Replicate%20Count-${staging_error}/${staging_total}-green?style=flat > ./badges/counts/staging_error.svg
curl --request GET https://img.shields.io/badge/Development%20Replicate%20Count-${prod_success}/${prod_total}-green?style=flat > ./badges/counts/prod_success.svg
curl --request GET https://img.shields.io/badge/Development%20Replicate%20Count-${prod_error}/${prod_total}-green?style=flat > ./badges/counts/prod_error.svg
curl --request GET https://img.shields.io/badge/Development%20Replicate%20Count-${dev_success}-lightgrey?style=flat > ./badges/counts/dev_counts.svg
curl --request GET https://img.shields.io/badge/Staging%20Replicate%20Count-${staging_success}-lightgrey?style=flat > ./badges/counts/staging_counts.svg
curl --request GET https://img.shields.io/badge/Production%20Replicate%20Count-${prod_success}-lightgrey?style=flat > ./badges/counts/prod_counts.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