Skip to content

Commit 94543e3

Browse files
authored
update rules to not use deprecated syntax and allow for manual pushes (#6184)
1 parent baa1ef8 commit 94543e3

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

.gitlab-ci.yml

+19-11
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,14 @@ fossa:
122122
eval $(creds-helper aws --eval "aws:v1/o11y-infra/role/o11y_gdi_otel_releaser_role")
123123

124124
.trigger-filter:
125-
only:
126-
variables:
127-
- $CI_COMMIT_BRANCH == "main"
128-
- $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+.*/
129-
except:
130-
- schedules
125+
rules:
126+
- &main-condition
127+
if: $CI_COMMIT_BRANCH == "main"
128+
- &release-condition
129+
if: $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+.*/
130+
- &no-schedules-condition
131+
if: $CI_PIPELINE_SOURCE == "schedule"
132+
when: never
131133

132134
.deploy-release:
133135
image: '${DOCKER_CICD_REPO}/ci-container/python-3.12-bookworm:3.5.0'
@@ -431,7 +433,13 @@ agent-bundle-windows:
431433
artifacts:
432434
paths:
433435
- dist/agent-bundle_windows_amd64.zip
434-
436+
.ta-trigger:
437+
rules:
438+
- <<*main-condition
439+
- <<*release-condition
440+
- <<*no-schedules-condition
441+
- if: $CI_COMMIT_BRANCH != "main" && $CI_COMMIT_TAG == null && $CI_COMMIT_REF_PROTECTED == 'true'
442+
when: manual
435443
.auth-setup:
436444
id_tokens:
437445
CI_JOB_JWT:
@@ -474,7 +482,7 @@ agent-bundle-windows:
474482
475483
package-technical-addon:
476484
extends:
477-
- .trigger-filter
485+
- .ta-trigger
478486
image: "${DOCKER_CICD_REPO}/ci-container/python-3.11-bullseye:1.19.0"
479487
stage: "package"
480488
script: |
@@ -491,7 +499,7 @@ package-technical-addon:
491499
test-happypath-ta:
492500
image: "${DOCKER_CICD_REPO}/ci-container/python-3.11-bullseye:1.19.0"
493501
extends:
494-
- .trigger-filter
502+
- .ta-trigger
495503
- .auth-setup
496504
stage: orca-tests
497505
dependencies:
@@ -523,7 +531,7 @@ test-happypath-ta:
523531
test-collectd-ta:
524532
image: "${DOCKER_CICD_REPO}/ci-container/python-3.11-bullseye:1.19.0"
525533
extends:
526-
- .trigger-filter
534+
- .ta-trigger
527535
- .auth-setup
528536
stage: orca-tests
529537
variables:
@@ -585,7 +593,7 @@ test-gateway-ta:
585593
- "$BUILD_DIR/$CI_JOB_ID/**/*"
586594
AppInspect_local:
587595
extends:
588-
- .trigger-filter
596+
- .ta-trigger
589597
dependencies:
590598
- "package-technical-addon"
591599
stage: code-analysis

0 commit comments

Comments
 (0)