diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eb0263a..a3b148a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,23 +3,12 @@ include: inputs: run_advanced_sast: true -stages: [test, release] + - component: $CI_SERVER_FQDN/components/toolkit/ensure-job-added@main + inputs: + job_name: gitlab-advanced-sast + exact: true -ensure-job-added: - parallel: - matrix: - - JOB_NAME: - - gitlab-advanced-sast - image: badouralix/curl-jq - script: - - | - route="$CI_API_V4_URL/projects/$CI_PROJECT_ID/pipelines/$CI_PIPELINE_ID/jobs" - count=`curl --silent $route | jq "map(select(.name | contains(\"$JOB_NAME\"))) | length"` - if [ "$count" != "1" ]; then - exit 1 - fi - rules: - - if: $CI_COMMIT_BRANCH && $CI_SERVER_HOST =~ /gitlab.com/ +stages: [test, release] # Ensure that a project description exists, because it will be important to display # the resource in the catalog.