Fix ensure-brakeman-job-added job

This commit is contained in:
Ahmed Hemdan 2023-06-12 11:07:26 +02:00
parent c00f9059e9
commit ce7d0f9b53
No known key found for this signature in database
GPG key ID: 35C579218532E2FF

View file

@ -8,8 +8,8 @@ ensure-brakeman-job-added:
script:
- |
route="https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/pipelines/$CI_PIPELINE_ID/jobs"
count=`curl --silent --header "PRIVATE-TOKEN: $API_TOKEN" $route | jq 'map(select(.name | contains("brakeman-sast"))) | length'`
if [ "$count" != "2" ]; then
count=`curl --silent $route | jq 'map(select(.name | contains("brakeman-sast"))) | length'`
if [ "$count" != "1" ]; then
exit 1
fi