diff --git a/config/jobs/kubernetes-sigs/cluster-api-operator/cluster-api-operator-presubmits-main.yaml b/config/jobs/kubernetes-sigs/cluster-api-operator/cluster-api-operator-presubmits-main.yaml index 441142c5f520..c24151b6bcaa 100644 --- a/config/jobs/kubernetes-sigs/cluster-api-operator/cluster-api-operator-presubmits-main.yaml +++ b/config/jobs/kubernetes-sigs/cluster-api-operator/cluster-api-operator-presubmits-main.yaml @@ -43,13 +43,13 @@ presubmits: - name: pull-cluster-api-operator-apidiff-main decorate: true path_alias: sigs.k8s.io/cluster-api-operator - always_run: true optional: true labels: preset-service-account: "true" branches: # The script this job runs is not in all branches. - ^main$ + run_if_changed: '^((api|cmd|config|controllers|hack|internal|scripts|test|util|webhook)/|go\.mod|go\.sum|Dockerfile|Makefile)' spec: containers: - command: @@ -80,12 +80,12 @@ presubmits: - name: pull-cluster-api-operator-test-main decorate: true path_alias: sigs.k8s.io/cluster-api-operator - always_run: true labels: preset-service-account: "true" branches: # The script this job runs is not in all branches. - ^main$ + run_if_changed: '^((api|cmd|config|controllers|hack|internal|scripts|test|util|webhook)/|go\.mod|go\.sum|Dockerfile|Makefile)' spec: containers: - image: gcr.io/k8s-staging-test-infra/kubekins-e2e:v20230513-7e1db2f1bb-1.25 @@ -99,8 +99,7 @@ presubmits: path_alias: "sigs.k8s.io/cluster-api-operator" optional: false decorate: true - # please see: https://play.golang.org/p/JJSVylVPd53 for more insights - run_if_changed: (^[^d].*$)|(^d$)|(^.[^o].*$)|(^do$)|(^..[^c].*$)|(^doc$)|(^...[^s].*$)|(^docs$)|(^....[^/].*$)|(^[^d][^o][^c][^s]/.*$) + run_if_changed: '^((api|cmd|config|controllers|hack|internal|scripts|test|util|webhook)/|go\.mod|go\.sum|Dockerfile|Makefile)' max_concurrency: 5 labels: preset-dind-enabled: "true" diff --git a/config/jobs/kubernetes-sigs/cluster-api-operator/cluster-api-operator-presubmits-release-0-3.yaml b/config/jobs/kubernetes-sigs/cluster-api-operator/cluster-api-operator-presubmits-release-0-3.yaml index bd49d8a1b523..839f375ea795 100644 --- a/config/jobs/kubernetes-sigs/cluster-api-operator/cluster-api-operator-presubmits-release-0-3.yaml +++ b/config/jobs/kubernetes-sigs/cluster-api-operator/cluster-api-operator-presubmits-release-0-3.yaml @@ -43,13 +43,13 @@ presubmits: - name: pull-cluster-api-operator-apidiff-release-0-3 decorate: true path_alias: sigs.k8s.io/cluster-api-operator - always_run: true optional: true labels: preset-service-account: "true" branches: # The script this job runs is not in all branches. - ^release-0.3$ + run_if_changed: '^((api|cmd|config|controllers|hack|internal|scripts|test|util|webhook)/|go\.mod|go\.sum|Dockerfile|Makefile)' spec: containers: - command: @@ -80,12 +80,12 @@ presubmits: - name: pull-cluster-api-operator-test-release-0-3 decorate: true path_alias: sigs.k8s.io/cluster-api-operator - always_run: true labels: preset-service-account: "true" branches: # The script this job runs is not in all branches. - ^release-0.3$ + run_if_changed: '^((api|cmd|config|controllers|hack|internal|scripts|test|util|webhook)/|go\.mod|go\.sum|Dockerfile|Makefile)' spec: containers: - image: gcr.io/k8s-staging-test-infra/kubekins-e2e:v20230513-7e1db2f1bb-1.25 @@ -99,8 +99,7 @@ presubmits: path_alias: "sigs.k8s.io/cluster-api-operator" optional: false decorate: true - # please see: https://play.golang.org/p/JJSVylVPd53 for more insights - run_if_changed: (^[^d].*$)|(^d$)|(^.[^o].*$)|(^do$)|(^..[^c].*$)|(^doc$)|(^...[^s].*$)|(^docs$)|(^....[^/].*$)|(^[^d][^o][^c][^s]/.*$) + run_if_changed: '^((api|cmd|config|controllers|hack|internal|scripts|test|util|webhook)/|go\.mod|go\.sum|Dockerfile|Makefile)' max_concurrency: 5 labels: preset-dind-enabled: "true"