Skip to content

Commit 68516f7

Browse files
igoragoliBridgeAR
andauthored
ci: set benchmarking jobs to be interruptible outside master (#6940)
* set benchmarking jobs to be interruptible outside main * set serverless benchmarking jobs to be interruptible outside main * change macrobenchmark runner type since they're also run on every branch * test interruptibility * test interruptibility * set workflow:auto_cancel:on_new_commit to interruptible * test interruptibility * Update .gitlab/macrobenchmarks.yml Co-authored-by: Ruben Bridgewater <ruben@bridgewater.de> --------- Co-authored-by: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 2dd3573 commit 68516f7

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

.gitlab-ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ include:
2727
- local: ".gitlab/macrobenchmarks.yml"
2828

2929
workflow:
30+
auto_cancel:
31+
on_new_commit: interruptible
3032
rules:
3133
- if: $CI_COMMIT_TAG =~ /^v?[0-9]+\.[0-9]+\.[0-9]+$/
3234
variables:

.gitlab/benchmarks.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ variables:
1212
when: on_success
1313
tags: ["runner:apm-k8s-m7i-metal"]
1414
image: $MICROBENCHMARKS_CI_IMAGE
15-
interruptible: true
15+
rules:
16+
- if: $CI_COMMIT_BRANCH == 'master'
17+
interruptible: false
18+
- interruptible: true
1619
timeout: 15m # TODO: Fix worker queueing and reduce this.
1720
script:
1821
- git clone --branch dd-trace-js https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/benchmarking-platform platform && cd platform
@@ -97,6 +100,10 @@ benchmark-serverless:
97100
image: $SLS_CI_IMAGE
98101
tags: ["arch:amd64"]
99102
when: on_success
103+
rules:
104+
- if: $CI_COMMIT_BRANCH == 'master'
105+
interruptible: false
106+
- interruptible: true
100107
needs:
101108
- benchmark-serverless-trigger
102109
script:
@@ -106,6 +113,10 @@ benchmark-serverless:
106113
benchmark-serverless-trigger:
107114
stage: benchmarks
108115
needs: []
116+
rules:
117+
- if: $CI_COMMIT_BRANCH == 'master'
118+
interruptible: false
119+
- interruptible: true
109120
trigger:
110121
project: DataDog/serverless-tools
111122
strategy: depend

.gitlab/macrobenchmarks.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ include:
66

77
.macrobenchmarks:
88
stage: macrobenchmarks
9+
when: always
910
rules:
10-
- when: always
11-
- when: manual
11+
- if: $CI_COMMIT_BRANCH == 'master'
12+
interruptible: false
13+
- interruptible: true
1214
tags: ["runner:apm-k8s-same-cpu"]
1315
needs: []
14-
interruptible: true
1516
timeout: 15m # TODO: Fix worker queueing and reduce this.
1617
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/benchmarking-platform:js-hapi
1718
script:

0 commit comments

Comments
 (0)