Skip to content

Commit debc001

Browse files
Cluster API Operator: use 'run_if_changed' consistently in presubmit jobs
Signed-off-by: Furkat Gofurov <[email protected]>
1 parent 36d545a commit debc001

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

config/jobs/kubernetes-sigs/cluster-api-operator/cluster-api-operator-presubmits-main.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ presubmits:
4343
- name: pull-cluster-api-operator-apidiff-main
4444
decorate: true
4545
path_alias: sigs.k8s.io/cluster-api-operator
46-
always_run: true
4746
optional: true
4847
labels:
4948
preset-service-account: "true"
5049
branches:
5150
# The script this job runs is not in all branches.
5251
- ^main$
52+
run_if_changed: '^((api|cmd|config|controllers|hack|internal|scripts|test|util|webhook)/|go\.mod|go\.sum|Dockerfile|Makefile)'
5353
spec:
5454
containers:
5555
- command:
@@ -80,12 +80,12 @@ presubmits:
8080
- name: pull-cluster-api-operator-test-main
8181
decorate: true
8282
path_alias: sigs.k8s.io/cluster-api-operator
83-
always_run: true
8483
labels:
8584
preset-service-account: "true"
8685
branches:
8786
# The script this job runs is not in all branches.
8887
- ^main$
88+
run_if_changed: '^((api|cmd|config|controllers|hack|internal|scripts|test|util|webhook)/|go\.mod|go\.sum|Dockerfile|Makefile)'
8989
spec:
9090
containers:
9191
- image: gcr.io/k8s-staging-test-infra/kubekins-e2e:v20230513-7e1db2f1bb-1.25
@@ -99,8 +99,7 @@ presubmits:
9999
path_alias: "sigs.k8s.io/cluster-api-operator"
100100
optional: false
101101
decorate: true
102-
# please see: https://play.golang.org/p/JJSVylVPd53 for more insights
103-
run_if_changed: (^[^d].*$)|(^d$)|(^.[^o].*$)|(^do$)|(^..[^c].*$)|(^doc$)|(^...[^s].*$)|(^docs$)|(^....[^/].*$)|(^[^d][^o][^c][^s]/.*$)
102+
run_if_changed: '^((api|cmd|config|controllers|hack|internal|scripts|test|util|webhook)/|go\.mod|go\.sum|Dockerfile|Makefile)'
104103
max_concurrency: 5
105104
labels:
106105
preset-dind-enabled: "true"

config/jobs/kubernetes-sigs/cluster-api-operator/cluster-api-operator-presubmits-release-0-3.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ presubmits:
4343
- name: pull-cluster-api-operator-apidiff-release-0-3
4444
decorate: true
4545
path_alias: sigs.k8s.io/cluster-api-operator
46-
always_run: true
4746
optional: true
4847
labels:
4948
preset-service-account: "true"
5049
branches:
5150
# The script this job runs is not in all branches.
5251
- ^release-0.3$
52+
run_if_changed: '^((api|cmd|config|controllers|hack|internal|scripts|test|util|webhook)/|go\.mod|go\.sum|Dockerfile|Makefile)'
5353
spec:
5454
containers:
5555
- command:
@@ -80,12 +80,12 @@ presubmits:
8080
- name: pull-cluster-api-operator-test-release-0-3
8181
decorate: true
8282
path_alias: sigs.k8s.io/cluster-api-operator
83-
always_run: true
8483
labels:
8584
preset-service-account: "true"
8685
branches:
8786
# The script this job runs is not in all branches.
8887
- ^release-0.3$
88+
run_if_changed: '^((api|cmd|config|controllers|hack|internal|scripts|test|util|webhook)/|go\.mod|go\.sum|Dockerfile|Makefile)'
8989
spec:
9090
containers:
9191
- image: gcr.io/k8s-staging-test-infra/kubekins-e2e:v20230513-7e1db2f1bb-1.25
@@ -99,8 +99,7 @@ presubmits:
9999
path_alias: "sigs.k8s.io/cluster-api-operator"
100100
optional: false
101101
decorate: true
102-
# please see: https://play.golang.org/p/JJSVylVPd53 for more insights
103-
run_if_changed: (^[^d].*$)|(^d$)|(^.[^o].*$)|(^do$)|(^..[^c].*$)|(^doc$)|(^...[^s].*$)|(^docs$)|(^....[^/].*$)|(^[^d][^o][^c][^s]/.*$)
102+
run_if_changed: '^((api|cmd|config|controllers|hack|internal|scripts|test|util|webhook)/|go\.mod|go\.sum|Dockerfile|Makefile)'
104103
max_concurrency: 5
105104
labels:
106105
preset-dind-enabled: "true"

0 commit comments

Comments
 (0)