mirror of
https://gitlab.com/components/sast.git
synced 2025-06-30 07:28:29 +02:00
Merge branch 'CI_SERVER_HOST' into 'main'
Use variables instead of hardcoded references in CI pipeline See merge request components/sast!5
This commit is contained in:
commit
6299531f9b
1 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
include:
|
include:
|
||||||
- component: gitlab.com/$CI_PROJECT_PATH/sast@$CI_COMMIT_SHA
|
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/sast@$CI_COMMIT_SHA
|
||||||
|
|
||||||
stages: [test, release]
|
stages: [test, release]
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ ensure-brakeman-job-added:
|
||||||
image: badouralix/curl-jq
|
image: badouralix/curl-jq
|
||||||
script:
|
script:
|
||||||
- |
|
- |
|
||||||
route="https://gitlab.com/api/v4/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("brakeman-sast"))) | length'`
|
count=`curl --silent $route | jq 'map(select(.name | contains("brakeman-sast"))) | length'`
|
||||||
if [ "$count" != "1" ]; then
|
if [ "$count" != "1" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -21,7 +21,7 @@ check-description:
|
||||||
image: badouralix/curl-jq
|
image: badouralix/curl-jq
|
||||||
script:
|
script:
|
||||||
- |
|
- |
|
||||||
route="https://gitlab.com/api/v4/projects/$CI_PROJECT_ID"
|
route="$CI_API_V4_URL/projects/$CI_PROJECT_ID"
|
||||||
desc=`curl --silent $route | jq '.description'`
|
desc=`curl --silent $route | jq '.description'`
|
||||||
if [ "$desc" = "null" ]; then
|
if [ "$desc" = "null" ]; then
|
||||||
echo "Description not set. Please set a projet description"
|
echo "Description not set. Please set a projet description"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue