From c00f9059e963b68c2aa738816fe6a3eb4418a055 Mon Sep 17 00:00:00 2001 From: Fabio Pitino Date: Wed, 3 May 2023 17:07:29 +0100 Subject: [PATCH] Enable CI job to check for brakeman-sast job --- .gitlab-ci.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6d829e0..a1e7599 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,15 +3,15 @@ include: stages: [test, release] -# ensure-jobs-added: -# image: badouralix/curl-jq -# 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("component-job-"))) | length'` -# if [ "$count" != "2" ]; then -# exit 1 -# fi +ensure-brakeman-job-added: + image: badouralix/curl-jq + 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 + exit 1 + fi # Ensure that a project description exists, because it will be important to display # the resource in the catalog.