Skip to content

Commit 82210a9

Browse files
authored
Merge pull request #739 from stackhpc/xena-wallaby-merge
xena: wallaby merge
2 parents 2044783 + 6650794 commit 82210a9

File tree

4 files changed

+85
-6
lines changed

4 files changed

+85
-6
lines changed

.github/path-filters.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This file is a list of path filters for the PR workflow in .github/workflows/stackhpc-pull-request.yml.
2+
aio:
3+
- '.automation'
4+
- '.automation.conf/config.sh'
5+
- '.automation.conf/tempest/load-lists/default'
6+
- '.automation.conf/tempest/load-lists/platform.2022.11-test-list.txt'
7+
- '.automation.conf/tempest/load-lists/refstack-2019.11-test-list.txt'
8+
- '.automation.conf/tempest/tempest-ci-aio.overrides.conf'
9+
- '.github/workflows/stackhpc-all-in-one.yml'
10+
- '.github/workflows/stackhpc-build-kayobe-image.yml'
11+
- '.github/workflows/stackhpc-pull-request.yml'
12+
- 'etc/kayobe/*.yml'
13+
- 'etc/kayobe/ansible/configure-aio-resources.yml'
14+
- 'etc/kayobe/ansible/growroot.yml'
15+
- 'etc/kayobe/ansible/requirements.yml'
16+
- 'etc/kayobe/ansible/scripts/aio-init.sh'
17+
- 'etc/kayobe/environments/ci-aio/**'
18+
- 'etc/kayobe/inventory/**'
19+
- 'etc/kayobe/kolla/**'
20+
- 'kayobe-env'
21+
- 'requirements.txt'
22+
- 'terraform/aio/**'

.github/workflows/stackhpc-all-in-one.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ on:
4343
description: Name of cloud in clouds.yaml
4444
type: string
4545
required: true
46+
if:
47+
description: Whether to run the workflow (workaround for required status checks issue)
48+
type: boolean
49+
default: true
4650
secrets:
4751
KAYOBE_VAULT_PASSWORD:
4852
required: true
@@ -57,6 +61,7 @@ jobs:
5761
# NOTE: Runner needs unzip and nodejs packages.
5862
all-in-one:
5963
name: All in one
64+
if: inputs.if
6065
runs-on: [self-hosted, stackhpc-kayobe-config-aio]
6166
permissions: {}
6267
env:

.github/workflows/stackhpc-build-kayobe-image.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ on:
1616
no_proxy:
1717
type: string
1818
required: false
19+
if:
20+
description: Whether to run the workflow (workaround for required status checks issue)
21+
type: boolean
22+
default: true
1923
outputs:
2024
kayobe_image:
2125
description: Reference of Kayobe image that was built
@@ -28,6 +32,7 @@ env:
2832
jobs:
2933
build-kayobe-image:
3034
name: Build kayobe image
35+
if: inputs.if
3136
runs-on: ubuntu-20.04
3237
permissions:
3338
contents: read

.github/workflows/stackhpc-pull-request.yml

Lines changed: 53 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,29 @@ name: Pull request
88
'on':
99
pull_request:
1010
jobs:
11+
# Detect which files have changed and use this to run jobs conditionally.
12+
# Note that we can't use the workflow-level paths attribute since this
13+
# would skip the workflow entirely, and would prevent us from making the
14+
# aio jobs required to pass (a skip counts as a pass).
15+
check-changes:
16+
runs-on: ubuntu-20.04
17+
permissions:
18+
pull-requests: read
19+
name: Check changed files
20+
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
21+
outputs:
22+
aio: ${{ steps.changes.outputs.aio }}
23+
steps:
24+
- name: GitHub Checkout
25+
uses: actions/checkout@v3
26+
27+
- name: Check changed files
28+
uses: dorny/paths-filter@v2
29+
id: changes
30+
with:
31+
# Filters are defined in this file.
32+
filters: .github/path-filters.yml
33+
1134
tox:
1235
runs-on: ubuntu-20.04
1336
permissions: {}
@@ -36,38 +59,55 @@ jobs:
3659
- name: Run Tox ${{ matrix.environment }} 🧪
3760
run: tox -e ${{ matrix.environment }}
3861

62+
# A skipped job is treated as success when used as a required status check.
63+
# The registered required status checks refer to the name of the job in the
64+
# called reusable workflow rather than the jobs in this file. The following
65+
# jobs need to run unconditionally to allow GitHub required status checks to
66+
# pass even when there are changed files. The `! failure()` condition runs
67+
# when the parent jobs completed successfully or were skipped. We pass an
68+
# 'if' argument to the called workflow to allow running it conditionally.
69+
3970
build-kayobe-image:
4071
name: Build Kayobe Image
72+
needs:
73+
- check-changes
4174
uses: ./.github/workflows/stackhpc-build-kayobe-image.yml
75+
with:
76+
if: ${{ needs.check-changes.outputs.aio == 'true' }}
4277
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
4378

4479
all-in-one-centos-ovs:
4580
name: aio (CentOS OVS)
4681
needs:
82+
- check-changes
4783
- build-kayobe-image
4884
uses: ./.github/workflows/stackhpc-all-in-one.yml
4985
with:
5086
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
5187
neutron_plugin: ovs
5288
OS_CLOUD: sms-lab-release
89+
if: ${{ needs.check-changes.outputs.aio == 'true' }}
5390
secrets: inherit
54-
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
91+
if: ${{ ! failure() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
5592

5693
all-in-one-centos-ovn:
5794
name: aio (CentOS OVN)
5895
needs:
96+
- check-changes
5997
- build-kayobe-image
6098
uses: ./.github/workflows/stackhpc-all-in-one.yml
6199
with:
62100
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
63101
neutron_plugin: ovn
64102
OS_CLOUD: sms-lab-release
103+
if: ${{ needs.check-changes.outputs.aio == 'true' }}
65104
secrets: inherit
66-
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
105+
if: ${{ ! failure() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
67106

68107
all-in-one-rocky-ovs:
69108
name: aio (Rocky OVS)
70109
needs:
110+
- check-changes
71111
- build-kayobe-image
72112
uses: ./.github/workflows/stackhpc-all-in-one.yml
73113
with:
@@ -79,12 +119,14 @@ jobs:
79119
vm_image: Rocky8-2022-11-08
80120
vm_interface: ens3
81121
OS_CLOUD: sms-lab-release
122+
if: ${{ needs.check-changes.outputs.aio == 'true' }}
82123
secrets: inherit
83-
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
124+
if: ${{ ! failure() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
84125

85126
all-in-one-rocky-ovn:
86127
name: aio (Rocky OVN)
87128
needs:
129+
- check-changes
88130
- build-kayobe-image
89131
uses: ./.github/workflows/stackhpc-all-in-one.yml
90132
with:
@@ -96,12 +138,14 @@ jobs:
96138
vm_image: Rocky8-2022-11-08
97139
vm_interface: ens3
98140
OS_CLOUD: sms-lab-release
141+
if: ${{ needs.check-changes.outputs.aio == 'true' }}
99142
secrets: inherit
100-
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
143+
if: ${{ ! failure() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
101144

102145
all-in-one-ubuntu-ovs:
103146
name: aio (Ubuntu OVS)
104147
needs:
148+
- check-changes
105149
- build-kayobe-image
106150
uses: ./.github/workflows/stackhpc-all-in-one.yml
107151
with:
@@ -110,12 +154,14 @@ jobs:
110154
neutron_plugin: ovs
111155
vm_image: Ubuntu-20.04
112156
OS_CLOUD: sms-lab-release
157+
if: ${{ needs.check-changes.outputs.aio == 'true' }}
113158
secrets: inherit
114-
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
159+
if: ${{ ! failure() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}
115160

116161
all-in-one-ubuntu-ovn:
117162
name: aio (Ubuntu OVN)
118163
needs:
164+
- check-changes
119165
- build-kayobe-image
120166
uses: ./.github/workflows/stackhpc-all-in-one.yml
121167
with:
@@ -124,5 +170,6 @@ jobs:
124170
neutron_plugin: ovn
125171
vm_image: Ubuntu-20.04
126172
OS_CLOUD: sms-lab-release
173+
if: ${{ needs.check-changes.outputs.aio == 'true' }}
127174
secrets: inherit
128-
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
175+
if: ${{ ! failure() && github.repository == 'stackhpc/stackhpc-kayobe-config' }}

0 commit comments

Comments
 (0)