File tree Expand file tree Collapse file tree 5 files changed +52
-35
lines changed Expand file tree Collapse file tree 5 files changed +52
-35
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,13 @@ variables:
22 SAST_EXCLUDED_ANALYZERS : " semgrep-sast,gosec-sast"
33 DOCKER_DRIVER : overlay2
44
5+ workflow :
6+ rules :
7+ - if : $CI_PIPELINE_SOURCE == "merge_request_event"
8+ - if : $CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
9+ when : never
10+ - if : $CI_COMMIT_TAG
11+
512include :
6- - template : Security/SAST.gitlab-ci.yml
713 - local : ' engine/.gitlab-ci.yml'
814 - local : ' ui/.gitlab-ci.yml'
Original file line number Diff line number Diff line change @@ -12,7 +12,10 @@ stages:
1212.only_engine : &only_engine
1313 rules :
1414 - if : $CI_COMMIT_TAG =~ /^v[a-zA-Z0-9_.-]*/
15- - if : $CI_COMMIT_BRANCH
15+ - if : $CI_PIPELINE_SOURCE == "merge_request_event"
16+ changes :
17+ - engine/**/*
18+ - if : ' $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
1619 changes :
1720 - engine/**/*
1821
@@ -32,7 +35,7 @@ stages:
3235
3336.only_dle_feature : &only_feature
3437 rules :
35- - if : $CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
38+ - if : $CI_PIPELINE_SOURCE == "merge_request_event"
3639 changes :
3740 - engine/**/*
3841
@@ -346,18 +349,14 @@ build-image-swagger-latest:
346349 - export LATEST_TAG=$(echo ${CLEAN_TAG%.*}-latest)
347350 - export TAGS="${DOCKER_NAME}:${LATEST_TAG}"
348351
349-
350352.bash-test : &bash_test
351353 stage : integration-test
352354 variables :
353355 IMAGE_TAG : " ${CI_COMMIT_REF_SLUG}"
354356 rules :
355- - changes :
356- - ui/**/*
357- when : never
358357 - if : ' $CI_PROJECT_NAMESPACE != "postgres-ai"'
359358 when : never
360- - if : $CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
359+ - if : $CI_PIPELINE_SOURCE == "merge_request_event"
361360 changes :
362361 - engine/**/*
363362 artifacts :
Original file line number Diff line number Diff line change 1+ include :
2+ - template : Security/SAST.gitlab-ci.yml
3+ - local : ' ui/packages/ce/.gitlab-ci.yml'
4+ - local : ' ui/packages/platform/.gitlab-ci.yml'
5+
16.only_ui : &only_ui
27 rules :
38 - if : $CI_COMMIT_TAG =~ /^ui\/[0-9.]+$/
4- - if : $CI_COMMIT_BRANCH
9+ - if : $CI_PIPELINE_SOURCE == "merge_request_event"
510 changes :
611 - ui/**/*
712
@@ -14,6 +19,20 @@ check_code_style:
1419 - npm --prefix ui/ run lint -w packages/ce
1520 - npm --prefix ui/ run lint -w packages/platform
1621
17- include :
18- - local : ' ui/packages/ce/.gitlab-ci.yml'
19- - local : ' ui/packages/platform/.gitlab-ci.yml'
22+ eslint-sast :
23+ << : *only_ui
24+ extends : .sast-analyzer
25+ image :
26+ name : " $SAST_ANALYZER_IMAGE"
27+ variables :
28+ SAST_ANALYZER_IMAGE_TAG : 2
29+ SAST_ANALYZER_IMAGE : " $SECURE_ANALYZERS_PREFIX/eslint:$SAST_ANALYZER_IMAGE_TAG"
30+
31+ nodejs-scan-sast :
32+ << : *only_ui
33+ extends : .sast-analyzer
34+ image :
35+ name : " $SAST_ANALYZER_IMAGE"
36+ variables :
37+ SAST_ANALYZER_IMAGE_TAG : 2
38+ SAST_ANALYZER_IMAGE : " $SECURE_ANALYZERS_PREFIX/nodejs-scan:$SAST_ANALYZER_IMAGE_TAG"
Original file line number Diff line number Diff line change 11# Conditions.
22.only_ui_feature : &only_ui_feature
33 rules :
4- - if : $CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
4+ - if : $CI_PIPELINE_SOURCE == "merge_request_event"
55 changes :
66 - ui/**/*
77
Original file line number Diff line number Diff line change 55# Proprietary and confidential
66# --------------------------------------------------------------------------
77
8- workflow :
8+ # Conditions.
9+ .only_ui_tag_release : &only_ui_tag_release
10+ rules :
11+ - if : $CI_COMMIT_TAG =~ /^ui\/[0-9.]+$/
12+
13+ .only_ui_staging : &only_ui_staging
14+ rules :
15+ - if : ' $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
16+ changes :
17+ - ui/**/*
18+
19+ .only_ui_feature : &only_ui_feature
920 rules :
1021 - if : $CI_PIPELINE_SOURCE == "merge_request_event"
11- when : never
12- - if : $CI_COMMIT_BRANCH
13- - if : $CI_COMMIT_TAG
22+ changes :
23+ - ui/**/*
24+ when : manual
1425
1526# Environments.
1627.environment_production : &env_production
@@ -64,24 +75,6 @@ workflow:
6475 # Deploy to k8s cluster.
6576 - kubectl apply --filename /tmp/platform-console.yaml -n $NAMESPACE
6677
67- # Conditions.
68- .only_ui_tag_release : &only_ui_tag_release
69- rules :
70- - if : $CI_COMMIT_TAG =~ /^ui\/[0-9.]+$/
71-
72- .only_ui_staging : &only_ui_staging
73- rules :
74- - if : ' $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
75- changes :
76- - ui/**/*
77-
78- .only_ui_feature : &only_ui_feature
79- rules :
80- - if : $CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
81- changes :
82- - ui/**/*
83- when : manual
84-
8578# Jobs.
8679# Production.
8780ui_build_platform_image_tag_release :
You can’t perform that action at this time.
0 commit comments