Skip to content

Commit c56666c

Browse files
committed
Prevent skip of build image job.
1 parent 00ef41c commit c56666c

File tree

2 files changed

+3
-25
lines changed

2 files changed

+3
-25
lines changed

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

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,11 @@ jobs:
8989
- name: Make sure dockerd is running and test Docker.
9090
run: |
9191
docker run --rm hello-world
92-
9392
9493
- name: Output image tag
9594
id: image_tag
9695
run: |
9796
echo image_tag=$(grep stackhpc_${{ inputs.os_distribution }}_$(sed s/-/_/ <(echo "${{ inputs.os_release }}"))_overcloud_host_image_version: etc/kayobe/pulp-host-image-versions.yml | awk '{print $2}') >> $GITHUB_OUTPUT
98-
9997
10098
# Use the image override if set, otherwise use overcloud-os_distribution-os_release-tag
10199
- name: Output image name
@@ -106,29 +104,24 @@ jobs:
106104
else
107105
echo image_name=${{ inputs.vm_image_override }} >> $GITHUB_OUTPUT
108106
fi
109-
110107
111108
- name: Install terraform
112109
uses: hashicorp/setup-terraform@v2
113-
114110

115111
- name: Initialise terraform
116112
run: terraform init
117113
working-directory: ${{ github.workspace }}/terraform/aio
118-
119114

120115
- name: Generate SSH keypair
121116
run: ssh-keygen -f id_rsa -N ''
122117
working-directory: ${{ github.workspace }}/terraform/aio
123-
124118

125119
- name: Generate clouds.yaml
126120
run: |
127121
cat << EOF > clouds.yaml
128122
${{ secrets.CLOUDS_YAML }}
129123
EOF
130124
working-directory: ${{ github.workspace }}/terraform/aio
131-
132125

133126
- name: Generate terraform.tfvars
134127
run: |
@@ -151,7 +144,6 @@ jobs:
151144
VM_NETWORK: ${{ inputs.vm_network }}
152145
VM_SUBNET: ${{ inputs.vm_subnet }}
153146
VM_INTERFACE: ${{ inputs.vm_interface }}
154-
155147

156148
- name: Terraform Plan
157149
run: terraform plan
@@ -160,7 +152,6 @@ jobs:
160152
OS_CLOUD: ${{ inputs.OS_CLOUD }}
161153
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
162154
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
163-
164155

165156
- name: Terraform Apply
166157
run: terraform apply -auto-approve
@@ -169,21 +160,18 @@ jobs:
169160
OS_CLOUD: ${{ inputs.OS_CLOUD }}
170161
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
171162
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
172-
173163

174164
- name: Get Terraform outputs
175165
id: tf_outputs
176166
run: |
177167
terraform output -json
178168
working-directory: ${{ github.workspace }}/terraform/aio
179-
180169

181170
- name: Write Terraform outputs
182171
run: |
183172
cat << EOF > etc/kayobe/environments/$KAYOBE_ENVIRONMENT/tf-outputs.yml
184173
${{ steps.tf_outputs.outputs.stdout }}
185174
EOF
186-
187175
188176
- name: Write Terraform network config
189177
run: |
@@ -198,14 +186,12 @@ jobs:
198186
admin_ips:
199187
controller0: "{{ access_ip_v4.value }}"
200188
EOF
201-
202189
203190
- name: Write Terraform network interface config
204191
run: |
205192
cat << EOF > etc/kayobe/environments/$KAYOBE_ENVIRONMENT/inventory/group_vars/controllers/tf-network-interfaces
206193
admin_interface: "{{ access_interface.value }}"
207194
EOF
208-
209195
210196
- name: Write all-in-one scenario config
211197
run: |
@@ -219,7 +205,6 @@ jobs:
219205
ENABLE_OVN: ${{ inputs.neutron_plugin == 'ovn' }}
220206
OS_DISTRIBUTION: ${{ inputs.os_distribution }}
221207
OS_RELEASE: ${{ inputs.os_release }}
222-
223208

224209
# Use a heredoc to define a multiline string output
225210
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
@@ -229,13 +214,11 @@ jobs:
229214
echo "ssh_key<<EOF" >> $GITHUB_OUTPUT
230215
cat terraform/aio/id_rsa >> $GITHUB_OUTPUT
231216
echo "EOF" >> $GITHUB_OUTPUT
232-
233217
234218
# The same tag may be reused (e.g. pr-123), so ensure we have the latest image.
235219
- name: Pull latest Kayobe image
236220
run: |
237221
docker image pull $KAYOBE_IMAGE
238-
239222
240223
- name: Run growroot
241224
run: |
@@ -246,7 +229,6 @@ jobs:
246229
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/growroot.yml'
247230
env:
248231
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
249-
250232

251233
- name: Host configure
252234
run: |
@@ -257,7 +239,6 @@ jobs:
257239
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/overcloud-host-configure.sh
258240
env:
259241
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
260-
261242

262243
- name: Service deploy
263244
run: |
@@ -268,7 +249,6 @@ jobs:
268249
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/overcloud-service-deploy.sh
269250
env:
270251
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
271-
272252

273253
- name: Configure aio resources
274254
run: |
@@ -279,8 +259,6 @@ jobs:
279259
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh etc/kayobe/ansible/configure-aio-resources.yml
280260
env:
281261
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
282-
283-
284262

285263
- name: Tempest tests
286264
run: |
@@ -293,7 +271,6 @@ jobs:
293271
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/tempest.sh -e ansible_user=stack
294272
env:
295273
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
296-
297274

298275
- name: Upload test result artifacts
299276
uses: actions/upload-artifact@v4
@@ -317,4 +294,4 @@ jobs:
317294
- name: Prune Docker images over 1 week old
318295
# May fail if another prune is running
319296
run: docker image prune --all --force --filter until=168h || true
320-
if: always()
297+
if: always()

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,13 @@ jobs:
7474
uses: ./.github/workflows/stackhpc-build-kayobe-image.yml
7575
with:
7676
if: ${{ needs.check-changes.outputs.aio == 'true' }}
77-
if: false && github.repository == 'stackhpc/stackhpc-kayobe-config'
77+
if: ${{ github.repository == 'stackhpc/stackhpc-kayobe-config' && !cancelled() }}
7878

7979
all-in-one-rocky-9-ovn:
8080
name: aio (Rocky 9 OVN)
8181
needs:
8282
- check-changes
83+
- build-kayobe-image
8384
uses: ./.github/workflows/stackhpc-all-in-one.yml
8485
with:
8586
kayobe_image: ghcr.io/stackhpc/stackhpc-kayobe-config:pr-917

0 commit comments

Comments
 (0)