Skip to content

Commit

Permalink
Prow: Define jobs per release branch
Browse files Browse the repository at this point in the history
In the previous PR I kept "common" tests in the main file. This PR
splits them up so that each release branch has all its own tests clearly
defined in a separate file. Easier to keep track of at the cost of some
duplication.

Signed-off-by: Lennart Jern <[email protected]>
  • Loading branch information
lentzi90 committed Nov 7, 2024
1 parent faa14ab commit e33a8f9
Show file tree
Hide file tree
Showing 17 changed files with 1,149 additions and 6 deletions.
88 changes: 88 additions & 0 deletions prow/config/jobs/metal3-io/baremetal-operator-release-0.5.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,93 @@
presubmits:
metal3-io/baremetal-operator:
- name: gomod
branches:
- release-0.5
skip_if_only_changed: '(((^|/)OWNERS)|((^|/)OWNERS_ALIASES)|(\.md))$'
decorate: true
spec:
containers:
- args:
- ./hack/gomod.sh
command:
- sh
env:
- name: IS_CONTAINER
value: "TRUE"
image: quay.io/metal3-io/basic-checks:golang-1.22
imagePullPolicy: Always
- name: shellcheck
branches:
- release-0.5
run_if_changed: '((\.sh)|^Makefile)$'
decorate: true
spec:
containers:
- args:
- ./hack/shellcheck.sh
command:
- sh
env:
- name: IS_CONTAINER
value: "TRUE"
image: docker.io/koalaman/shellcheck-alpine:v0.10.0@sha256:5921d946dac740cbeec2fb1c898747b6105e585130cc7f0602eec9a10f7ddb63
imagePullPolicy: Always
- name: generate
branches:
- release-0.5
skip_if_only_changed: '(((^|/)OWNERS)|((^|/)OWNERS_ALIASES)|(\.md))$'
decorate: true
spec:
containers:
- args:
- ./hack/generate.sh
command:
- sh
env:
- name: IS_CONTAINER
value: "TRUE"
- name: DEPLOY_KERNEL_URL
value: "http://172.22.0.1/images/ironic-python-agent.kernel"
- name: DEPLOY_RAMDISK_URL
value: "http://172.22.0.1/images/ironic-python-agent.initramfs"
- name: IRONIC_ENDPOINT
value: "http://localhost:6385/v1/"
- name: IRONIC_INSPECTOR_ENDPOINT
value: "http://localhost:5050/v1/"
image: quay.io/metal3-io/basic-checks:golang-1.22
imagePullPolicy: Always
# NOTE: The test jobs are for verifying Makefile and hack/* script changes only
- name: test
branches:
- release-0.5
run_if_changed: "^(Makefile|hack/.*)$"
decorate: true
spec:
containers:
- args:
- test
command:
- make
image: quay.io/metal3-io/basic-checks:golang-1.22
imagePullPolicy: Always
- name: manifestlint
branches:
- release-0.5
skip_if_only_changed: '(((^|/)OWNERS)|((^|/)OWNERS_ALIASES)|(\.md))$'
decorate: true
spec:
containers:
- args:
- ./hack/manifestlint.sh
command:
- sh
env:
- name: IS_CONTAINER
value: "TRUE"
- name: KUBECONFORM_PATH
value: "/"
image: ghcr.io/yannh/kubeconform:v0.6.2-alpine@sha256:49b5f6b320d30c1b8b72a7abdf02740ac9dc36a3ba23b934d1c02f7b37e6e740
imagePullPolicy: Always
- name: markdownlint
branches:
- release-0.5
Expand Down
104 changes: 104 additions & 0 deletions prow/config/jobs/metal3-io/baremetal-operator-release-0.6.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,109 @@
presubmits:
metal3-io/baremetal-operator:
- name: gomod
branches:
- release-0.6
skip_if_only_changed: '(((^|/)OWNERS)|((^|/)OWNERS_ALIASES)|(\.md))$'
decorate: true
spec:
containers:
- args:
- ./hack/gomod.sh
command:
- sh
env:
- name: IS_CONTAINER
value: "TRUE"
image: quay.io/metal3-io/basic-checks:golang-1.22
imagePullPolicy: Always
- name: markdownlint
branches:
- release-0.6
run_if_changed: '(\.md|markdownlint\.sh)$'
decorate: true
spec:
containers:
- args:
- ./hack/markdownlint.sh
command:
- sh
env:
- name: IS_CONTAINER
value: "TRUE"
image: docker.io/pipelinecomponents/markdownlint-cli2:0.12.0@sha256:a3977fba9814f10d33a1d69ae607dc808e7a6470b2ba03e84c17193c0791aac0
imagePullPolicy: Always
- name: shellcheck
branches:
- release-0.6
run_if_changed: '((\.sh)|^Makefile)$'
decorate: true
spec:
containers:
- args:
- ./hack/shellcheck.sh
command:
- sh
env:
- name: IS_CONTAINER
value: "TRUE"
image: docker.io/koalaman/shellcheck-alpine:v0.10.0@sha256:5921d946dac740cbeec2fb1c898747b6105e585130cc7f0602eec9a10f7ddb63
imagePullPolicy: Always
- name: generate
branches:
- release-0.6
skip_if_only_changed: '(((^|/)OWNERS)|((^|/)OWNERS_ALIASES)|(\.md))$'
decorate: true
spec:
containers:
- args:
- ./hack/generate.sh
command:
- sh
env:
- name: IS_CONTAINER
value: "TRUE"
- name: DEPLOY_KERNEL_URL
value: "http://172.22.0.1/images/ironic-python-agent.kernel"
- name: DEPLOY_RAMDISK_URL
value: "http://172.22.0.1/images/ironic-python-agent.initramfs"
- name: IRONIC_ENDPOINT
value: "http://localhost:6385/v1/"
- name: IRONIC_INSPECTOR_ENDPOINT
value: "http://localhost:5050/v1/"
image: quay.io/metal3-io/basic-checks:golang-1.22
imagePullPolicy: Always
# NOTE: The test jobs are for verifying Makefile and hack/* script changes only
- name: test
branches:
- release-0.6
run_if_changed: "^(Makefile|hack/.*)$"
decorate: true
spec:
containers:
- args:
- test
command:
- make
image: quay.io/metal3-io/basic-checks:golang-1.22
imagePullPolicy: Always
- name: manifestlint
branches:
- release-0.6
skip_if_only_changed: '(((^|/)OWNERS)|((^|/)OWNERS_ALIASES)|(\.md))$'
decorate: true
spec:
containers:
- args:
- ./hack/manifestlint.sh
command:
- sh
env:
- name: IS_CONTAINER
value: "TRUE"
- name: KUBECONFORM_PATH
value: "/"
image: ghcr.io/yannh/kubeconform:v0.6.2-alpine@sha256:49b5f6b320d30c1b8b72a7abdf02740ac9dc36a3ba23b934d1c02f7b37e6e740
imagePullPolicy: Always
- name: metal3-centos-e2e-basic-test-release-1-7
branches:
- release-0.6
Expand Down
104 changes: 104 additions & 0 deletions prow/config/jobs/metal3-io/baremetal-operator-release-0.8.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,109 @@
presubmits:
metal3-io/baremetal-operator:
- name: gomod
branches:
- release-0.8
skip_if_only_changed: '(((^|/)OWNERS)|((^|/)OWNERS_ALIASES)|(\.md))$'
decorate: true
spec:
containers:
- args:
- ./hack/gomod.sh
command:
- sh
env:
- name: IS_CONTAINER
value: "TRUE"
image: quay.io/metal3-io/basic-checks:golang-1.22
imagePullPolicy: Always
- name: markdownlint
branches:
- release-0.8
run_if_changed: '(\.md|markdownlint\.sh)$'
decorate: true
spec:
containers:
- args:
- ./hack/markdownlint.sh
command:
- sh
env:
- name: IS_CONTAINER
value: "TRUE"
image: docker.io/pipelinecomponents/markdownlint-cli2:0.12.0@sha256:a3977fba9814f10d33a1d69ae607dc808e7a6470b2ba03e84c17193c0791aac0
imagePullPolicy: Always
- name: shellcheck
branches:
- release-0.8
run_if_changed: '((\.sh)|^Makefile)$'
decorate: true
spec:
containers:
- args:
- ./hack/shellcheck.sh
command:
- sh
env:
- name: IS_CONTAINER
value: "TRUE"
image: docker.io/koalaman/shellcheck-alpine:v0.10.0@sha256:5921d946dac740cbeec2fb1c898747b6105e585130cc7f0602eec9a10f7ddb63
imagePullPolicy: Always
- name: generate
branches:
- release-0.8
skip_if_only_changed: '(((^|/)OWNERS)|((^|/)OWNERS_ALIASES)|(\.md))$'
decorate: true
spec:
containers:
- args:
- ./hack/generate.sh
command:
- sh
env:
- name: IS_CONTAINER
value: "TRUE"
- name: DEPLOY_KERNEL_URL
value: "http://172.22.0.1/images/ironic-python-agent.kernel"
- name: DEPLOY_RAMDISK_URL
value: "http://172.22.0.1/images/ironic-python-agent.initramfs"
- name: IRONIC_ENDPOINT
value: "http://localhost:6385/v1/"
- name: IRONIC_INSPECTOR_ENDPOINT
value: "http://localhost:5050/v1/"
image: quay.io/metal3-io/basic-checks:golang-1.22
imagePullPolicy: Always
# NOTE: The test jobs are for verifying Makefile and hack/* script changes only
- name: test
branches:
- release-0.8
run_if_changed: "^(Makefile|hack/.*)$"
decorate: true
spec:
containers:
- args:
- test
command:
- make
image: quay.io/metal3-io/basic-checks:golang-1.22
imagePullPolicy: Always
- name: manifestlint
branches:
- release-0.8
skip_if_only_changed: '(((^|/)OWNERS)|((^|/)OWNERS_ALIASES)|(\.md))$'
decorate: true
spec:
containers:
- args:
- ./hack/manifestlint.sh
command:
- sh
env:
- name: IS_CONTAINER
value: "TRUE"
- name: KUBECONFORM_PATH
value: "/"
image: ghcr.io/yannh/kubeconform:v0.6.2-alpine@sha256:49b5f6b320d30c1b8b72a7abdf02740ac9dc36a3ba23b934d1c02f7b37e6e740
imagePullPolicy: Always
- name: metal3-centos-e2e-basic-test-release-1-8
branches:
- release-0.8
Expand Down
12 changes: 10 additions & 2 deletions prow/config/jobs/metal3-io/baremetal-operator.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
presubmits:
metal3-io/baremetal-operator:
- name: gomod
branches:
- main
skip_if_only_changed: '(((^|/)OWNERS)|((^|/)OWNERS_ALIASES)|(\.md))$'
decorate: true
spec:
Expand All @@ -17,8 +19,6 @@ presubmits:
- name: markdownlint
branches:
- main
- release-0.8
- release-0.6
run_if_changed: '(\.md|markdownlint\.sh)$'
decorate: true
spec:
Expand All @@ -33,6 +33,8 @@ presubmits:
image: docker.io/pipelinecomponents/markdownlint-cli2:0.12.0@sha256:a3977fba9814f10d33a1d69ae607dc808e7a6470b2ba03e84c17193c0791aac0
imagePullPolicy: Always
- name: shellcheck
branches:
- main
run_if_changed: '((\.sh)|^Makefile)$'
decorate: true
spec:
Expand All @@ -47,6 +49,8 @@ presubmits:
image: docker.io/koalaman/shellcheck-alpine:v0.10.0@sha256:5921d946dac740cbeec2fb1c898747b6105e585130cc7f0602eec9a10f7ddb63
imagePullPolicy: Always
- name: generate
branches:
- main
skip_if_only_changed: '(((^|/)OWNERS)|((^|/)OWNERS_ALIASES)|(\.md))$'
decorate: true
spec:
Expand All @@ -70,6 +74,8 @@ presubmits:
imagePullPolicy: Always
# NOTE: The test jobs are for verifying Makefile and hack/* script changes only
- name: test
branches:
- main
run_if_changed: "^(Makefile|hack/.*)$"
decorate: true
spec:
Expand All @@ -81,6 +87,8 @@ presubmits:
image: quay.io/metal3-io/basic-checks:golang-1.22
imagePullPolicy: Always
- name: manifestlint
branches:
- main
skip_if_only_changed: '(((^|/)OWNERS)|((^|/)OWNERS_ALIASES)|(\.md))$'
decorate: true
spec:
Expand Down
Loading

0 comments on commit e33a8f9

Please sign in to comment.