update tests to run advanced-sast

This commit is contained in:
Duncan Macleod 2024-09-25 15:33:37 +02:00
parent ef68374448
commit 586d546db3
No known key found for this signature in database

View file

@ -1,14 +1,20 @@
include: include:
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/sast@$CI_COMMIT_SHA - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/sast@$CI_COMMIT_SHA
inputs:
run_advanced_sast: true
stages: [test, release] stages: [test, release]
ensure-semgrep-job-added: ensure-job-added:
parallel:
matrix:
- JOB_NAME:
- gitlab-advanced-sast
image: badouralix/curl-jq image: badouralix/curl-jq
script: script:
- | - |
route="$CI_API_V4_URL/projects/$CI_PROJECT_ID/pipelines/$CI_PIPELINE_ID/jobs" route="$CI_API_V4_URL/projects/$CI_PROJECT_ID/pipelines/$CI_PIPELINE_ID/jobs"
count=`curl --silent $route | jq 'map(select(.name | contains("semgrep-sast"))) | length'` count=`curl --silent $route | jq "map(select(.name | contains(\"$JOB_NAME\"))) | length"`
if [ "$count" != "1" ]; then if [ "$count" != "1" ]; then
exit 1 exit 1
fi fi