mirror of
https://gitlab.com/components/sast.git
synced 2025-06-30 07:28:29 +02:00
use toolkit component for ensure-job-added
This commit is contained in:
parent
586d546db3
commit
1627993727
1 changed files with 5 additions and 16 deletions
|
@ -3,23 +3,12 @@ include:
|
||||||
inputs:
|
inputs:
|
||||||
run_advanced_sast: true
|
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:
|
stages: [test, release]
|
||||||
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/
|
|
||||||
|
|
||||||
# Ensure that a project description exists, because it will be important to display
|
# Ensure that a project description exists, because it will be important to display
|
||||||
# the resource in the catalog.
|
# the resource in the catalog.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue