Skip to content

Commit

Permalink
Add regex to skip certain jobs based on changed files
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcao13 committed Sep 5, 2024
1 parent 611ebc3 commit 5a48c7d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,22 @@ tests:
commands: make test
container:
from: src
skip_if_only_changed: \.md$|^(?:\.gitignore|OWNERS|PROJECT|LICENSE)$
- as: manifest-diff
commands: make manifest-diff
container:
from: src
skip_if_only_changed: \.md$|^(?:\.gitignore|OWNERS|PROJECT|LICENSE)$
- as: gofmt
commands: make fmt
container:
from: src
skip_if_only_changed: \.md$|^(?:\.gitignore|OWNERS|PROJECT|LICENSE)$
- as: govet
commands: make vet
container:
from: src
skip_if_only_changed: \.md$|^(?:\.gitignore|OWNERS|PROJECT|LICENSE)$
- as: lint
commands: |
export GOCACHE=/tmp/
Expand All @@ -104,6 +108,7 @@ tests:
container:
clone: true
from: golangci-lint
skip_if_only_changed: \.md$|^(?:\.gitignore|OWNERS|PROJECT|LICENSE)$
- as: security
optional: true
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ presubmits:
secretName: result-aggregator
trigger: (?m)^/test( | .* )e2e-aws-upgrade,?($|\s.*)
- agent: kubernetes
always_run: true
always_run: false
branches:
- ^master$
- ^master-
Expand All @@ -300,6 +300,7 @@ presubmits:
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: pull-ci-openshift-vertical-pod-autoscaler-operator-master-gofmt
rerun_command: /test gofmt
skip_if_only_changed: \.md$|^(?:\.gitignore|OWNERS|PROJECT|LICENSE)$
spec:
containers:
- args:
Expand Down Expand Up @@ -341,7 +342,7 @@ presubmits:
secretName: result-aggregator
trigger: (?m)^/test( | .* )gofmt,?($|\s.*)
- agent: kubernetes
always_run: true
always_run: false
branches:
- ^master$
- ^master-
Expand All @@ -353,6 +354,7 @@ presubmits:
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: pull-ci-openshift-vertical-pod-autoscaler-operator-master-govet
rerun_command: /test govet
skip_if_only_changed: \.md$|^(?:\.gitignore|OWNERS|PROJECT|LICENSE)$
spec:
containers:
- args:
Expand Down Expand Up @@ -449,7 +451,7 @@ presubmits:
secretName: result-aggregator
trigger: (?m)^/test( | .* )images,?($|\s.*)
- agent: kubernetes
always_run: true
always_run: false
branches:
- ^master$
- ^master-
Expand All @@ -461,6 +463,7 @@ presubmits:
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: pull-ci-openshift-vertical-pod-autoscaler-operator-master-lint
rerun_command: /test lint
skip_if_only_changed: \.md$|^(?:\.gitignore|OWNERS|PROJECT|LICENSE)$
spec:
containers:
- args:
Expand Down Expand Up @@ -502,7 +505,7 @@ presubmits:
secretName: result-aggregator
trigger: (?m)^/test( | .* )lint,?($|\s.*)
- agent: kubernetes
always_run: true
always_run: false
branches:
- ^master$
- ^master-
Expand All @@ -514,6 +517,7 @@ presubmits:
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: pull-ci-openshift-vertical-pod-autoscaler-operator-master-manifest-diff
rerun_command: /test manifest-diff
skip_if_only_changed: \.md$|^(?:\.gitignore|OWNERS|PROJECT|LICENSE)$
spec:
containers:
- args:
Expand Down Expand Up @@ -694,7 +698,7 @@ presubmits:
secretName: result-aggregator
trigger: (?m)^/test( | .* )security,?($|\s.*)
- agent: kubernetes
always_run: true
always_run: false
branches:
- ^master$
- ^master-
Expand All @@ -706,6 +710,7 @@ presubmits:
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: pull-ci-openshift-vertical-pod-autoscaler-operator-master-unit
rerun_command: /test unit
skip_if_only_changed: \.md$|^(?:\.gitignore|OWNERS|PROJECT|LICENSE)$
spec:
containers:
- args:
Expand Down

0 comments on commit 5a48c7d

Please sign in to comment.