Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prow: Define jobs per release branch #893

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions prow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@

Metal3 Prow dashboard: <https://prow.apps.test.metal3.io>

## Prow config and jobs

The configuration files for prow are in the `config` directory. The prow jobs
have been split out into multiple files to make managing them easier. They can
be found under `config/jobs`. They are all collected into a ConfigMap
`job-config` that prow can access.

The jobs are sorted based on github organization and repository. For
repositories with release branches, we keep one file per branch. This way it is
easy to add tests for a new branch by copying an existing file, and removing
tests for a branch by just deleting the corresponding file.

## Access Controls

- To merge, patches must have `/approve` and `/lgtm`, which apply the `approved`
Expand Down
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