Skip to content

Commit 5ee90d5

Browse files
committed
update rules to not use deprecated syntax and allow for manual pushes
1 parent baa1ef8 commit 5ee90d5

File tree

1 file changed

+25
-11
lines changed

1 file changed

+25
-11
lines changed

.gitlab-ci.yml

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,21 @@ fossa:
121121
creds-helper init
122122
eval $(creds-helper aws --eval "aws:v1/o11y-infra/role/o11y_gdi_otel_releaser_role")
123123

124+
.:
125+
- if: $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+.*/
126+
127+
.main-merge-condition:
128+
- if: $CI_COMMIT_BRANCH == "main"
129+
124130
.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
131+
rules:
132+
- &main-condition
133+
if: $CI_COMMIT_BRANCH == "main"
134+
- &release-condition
135+
if: $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+.*/
136+
- &no-schedules-condition
137+
if: $CI_PIPELINE_SOURCE == "schedule"
138+
when: never
131139

132140
.deploy-release:
133141
image: '${DOCKER_CICD_REPO}/ci-container/python-3.12-bookworm:3.5.0'
@@ -431,7 +439,13 @@ agent-bundle-windows:
431439
artifacts:
432440
paths:
433441
- dist/agent-bundle_windows_amd64.zip
434-
442+
.ta-trigger:
443+
rules:
444+
- <<*main-condition
445+
- <<*release-condition
446+
- <<*no-schedules-condition
447+
- if: $CI_COMMIT_BRANCH != "main" && $CI_COMMIT_TAG == null && $CI_COMMIT_REF_PROTECTED == 'true'
448+
when: manual
435449
.auth-setup:
436450
id_tokens:
437451
CI_JOB_JWT:
@@ -474,7 +488,7 @@ agent-bundle-windows:
474488
475489
package-technical-addon:
476490
extends:
477-
- .trigger-filter
491+
- .ta-trigger
478492
image: "${DOCKER_CICD_REPO}/ci-container/python-3.11-bullseye:1.19.0"
479493
stage: "package"
480494
script: |
@@ -491,7 +505,7 @@ package-technical-addon:
491505
test-happypath-ta:
492506
image: "${DOCKER_CICD_REPO}/ci-container/python-3.11-bullseye:1.19.0"
493507
extends:
494-
- .trigger-filter
508+
- .ta-trigger
495509
- .auth-setup
496510
stage: orca-tests
497511
dependencies:
@@ -523,7 +537,7 @@ test-happypath-ta:
523537
test-collectd-ta:
524538
image: "${DOCKER_CICD_REPO}/ci-container/python-3.11-bullseye:1.19.0"
525539
extends:
526-
- .trigger-filter
540+
- .ta-trigger
527541
- .auth-setup
528542
stage: orca-tests
529543
variables:
@@ -585,7 +599,7 @@ test-gateway-ta:
585599
- "$BUILD_DIR/$CI_JOB_ID/**/*"
586600
AppInspect_local:
587601
extends:
588-
- .trigger-filter
602+
- .ta-trigger
589603
dependencies:
590604
- "package-technical-addon"
591605
stage: code-analysis

0 commit comments

Comments
 (0)