Skip to content

Commit 6f00dee

Browse files
authored
Merge pull request #29770 from furkatgofurov7/use-run-if-changed-consistently-capioperator
CAPI Operator: use 'run_if_changed' consistently in presubmit jobs
2 parents fbc8a6c + debc001 commit 6f00dee

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
@@ -60,13 +60,13 @@ presubmits:
6060
cluster: eks-prow-build-cluster
6161
decorate: true
6262
path_alias: sigs.k8s.io/cluster-api-operator
63-
always_run: true
6463
optional: true
6564
labels:
6665
preset-service-account: "true"
6766
branches:
6867
# The script this job runs is not in all branches.
6968
- ^main$
69+
run_if_changed: '^((api|cmd|config|controllers|hack|internal|scripts|test|util|webhook)/|go\.mod|go\.sum|Dockerfile|Makefile)'
7070
spec:
7171
containers:
7272
- image: gcr.io/k8s-staging-test-infra/kubekins-e2e:v20230613-63d85f5ed2-1.25
@@ -113,12 +113,12 @@ presubmits:
113113
cluster: eks-prow-build-cluster
114114
decorate: true
115115
path_alias: sigs.k8s.io/cluster-api-operator
116-
always_run: true
117116
labels:
118117
preset-service-account: "true"
119118
branches:
120119
# The script this job runs is not in all branches.
121120
- ^main$
121+
run_if_changed: '^((api|cmd|config|controllers|hack|internal|scripts|test|util|webhook)/|go\.mod|go\.sum|Dockerfile|Makefile)'
122122
spec:
123123
containers:
124124
- image: gcr.io/k8s-staging-test-infra/kubekins-e2e:v20230613-63d85f5ed2-1.25
@@ -139,8 +139,7 @@ presubmits:
139139
path_alias: "sigs.k8s.io/cluster-api-operator"
140140
optional: false
141141
decorate: true
142-
# please see: https://play.golang.org/p/JJSVylVPd53 for more insights
143-
run_if_changed: (^[^d].*$)|(^d$)|(^.[^o].*$)|(^do$)|(^..[^c].*$)|(^doc$)|(^...[^s].*$)|(^docs$)|(^....[^/].*$)|(^[^d][^o][^c][^s]/.*$)
142+
run_if_changed: '^((api|cmd|config|controllers|hack|internal|scripts|test|util|webhook)/|go\.mod|go\.sum|Dockerfile|Makefile)'
144143
max_concurrency: 5
145144
labels:
146145
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
@@ -60,13 +60,13 @@ presubmits:
6060
cluster: eks-prow-build-cluster
6161
decorate: true
6262
path_alias: sigs.k8s.io/cluster-api-operator
63-
always_run: true
6463
optional: true
6564
labels:
6665
preset-service-account: "true"
6766
branches:
6867
# The script this job runs is not in all branches.
6968
- ^release-0.3$
69+
run_if_changed: '^((api|cmd|config|controllers|hack|internal|scripts|test|util|webhook)/|go\.mod|go\.sum|Dockerfile|Makefile)'
7070
spec:
7171
containers:
7272
- image: gcr.io/k8s-staging-test-infra/kubekins-e2e:v20230613-63d85f5ed2-1.25
@@ -113,12 +113,12 @@ presubmits:
113113
cluster: eks-prow-build-cluster
114114
decorate: true
115115
path_alias: sigs.k8s.io/cluster-api-operator
116-
always_run: true
117116
labels:
118117
preset-service-account: "true"
119118
branches:
120119
# The script this job runs is not in all branches.
121120
- ^release-0.3$
121+
run_if_changed: '^((api|cmd|config|controllers|hack|internal|scripts|test|util|webhook)/|go\.mod|go\.sum|Dockerfile|Makefile)'
122122
spec:
123123
containers:
124124
- image: gcr.io/k8s-staging-test-infra/kubekins-e2e:v20230613-63d85f5ed2-1.25
@@ -139,8 +139,7 @@ presubmits:
139139
path_alias: "sigs.k8s.io/cluster-api-operator"
140140
optional: false
141141
decorate: true
142-
# please see: https://play.golang.org/p/JJSVylVPd53 for more insights
143-
run_if_changed: (^[^d].*$)|(^d$)|(^.[^o].*$)|(^do$)|(^..[^c].*$)|(^doc$)|(^...[^s].*$)|(^docs$)|(^....[^/].*$)|(^[^d][^o][^c][^s]/.*$)
142+
run_if_changed: '^((api|cmd|config|controllers|hack|internal|scripts|test|util|webhook)/|go\.mod|go\.sum|Dockerfile|Makefile)'
144143
max_concurrency: 5
145144
labels:
146145
preset-dind-enabled: "true"

0 commit comments

Comments
 (0)