Skip to content

Commit 50e36ff

Browse files
committed
will it be this simple?
1 parent c0f1330 commit 50e36ff

1 file changed

Lines changed: 69 additions & 0 deletions

File tree

.github/workflows/ipa-image-build.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
description: Build Rocky Linux 9
88
type: boolean
99
default: true
10+
rocky10:
11+
description: Build Rocky Linux 10
12+
type: boolean
13+
default: true
1014
ubuntu-noble:
1115
description: Build Ubuntu 24.04 Noble
1216
type: boolean
@@ -47,6 +51,13 @@ jobs:
4751
- runner-selection
4852
permissions: {}
4953
steps:
54+
- name: Validate inputs
55+
run: |
56+
if [[ ${{ inputs.rocky9 }} == 'false' && ${{ inputs.rocky10 }} == 'false' && ${{ inputs.ubuntu-noble }} == 'false' ]]; then
57+
echo "At least one distribution must be selected"
58+
exit 1
59+
fi
60+
5061
- name: Install Package
5162
uses: ConorMacBride/install-package@main
5263
with:
@@ -321,6 +332,63 @@ jobs:
321332
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD_CI_BUILDER }}
322333
if: inputs.rocky9 && steps.build_rocky_9_ipa.outcome == 'success'
323334

335+
- name: Build a Rocky 10 IPA image
336+
id: build_rocky_10_ipa
337+
continue-on-error: true
338+
run: |
339+
source venvs/kayobe/bin/activate &&
340+
source src/kayobe-config/kayobe-env --environment ci-builder &&
341+
kayobe overcloud deployment image build --force-rebuild \
342+
-e os_distribution="rocky" \
343+
-e os_release="10" \
344+
-e ipa_ci_builder_distribution="rocky" \
345+
-e ipa_ci_builder_release="10"
346+
env:
347+
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD_CI_BUILDER }}
348+
if: inputs.rocky10
349+
350+
- name: Show last error logs
351+
continue-on-error: true
352+
run: |
353+
source venvs/kayobe/bin/activate &&
354+
source src/kayobe-config/kayobe-env --environment ci-builder &&
355+
kayobe seed host command run --command "tail -200 /opt/kayobe/images/ipa/ipa.stdout" --show-output
356+
env:
357+
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD_CI_BUILDER }}
358+
if: steps.build_rocky_10_ipa.outcome == 'failure'
359+
360+
- name: Upload Rocky 10 IPA kernel image to Ark
361+
run: |
362+
source venvs/kayobe/bin/activate &&
363+
source src/kayobe-config/kayobe-env --environment ci-builder &&
364+
kayobe playbook run \
365+
src/kayobe-config/etc/kayobe/ansible/pulp/pulp-artifact-upload.yml \
366+
-e artifact_path=/opt/kayobe/images/ipa \
367+
-e artifact_type=ipa-images \
368+
-e artifact_tag=${{ steps.ipa_image_tag.outputs.ipa_image_tag }} \
369+
-e os_distribution="rocky" \
370+
-e os_release="10" \
371+
-e file_regex='*.kernel'
372+
env:
373+
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD_CI_BUILDER }}
374+
if: inputs.rocky10 && steps.build_rocky_10_ipa.outcome == 'success'
375+
376+
- name: Upload Rocky 10 IPA ramdisk image to Ark
377+
run: |
378+
source venvs/kayobe/bin/activate &&
379+
source src/kayobe-config/kayobe-env --environment ci-builder &&
380+
kayobe playbook run \
381+
src/kayobe-config/etc/kayobe/ansible/pulp/pulp-artifact-upload.yml \
382+
-e artifact_path=/opt/kayobe/images/ipa \
383+
-e artifact_type=ipa-images \
384+
-e artifact_tag=${{ steps.ipa_image_tag.outputs.ipa_image_tag }} \
385+
-e os_distribution="rocky" \
386+
-e os_release="10" \
387+
-e file_regex='*.initramfs'
388+
env:
389+
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD_CI_BUILDER }}
390+
if: inputs.rocky10 && steps.build_rocky_10_ipa.outcome == 'success'
391+
324392
- name: Copy logs back
325393
continue-on-error: true
326394
run: |
@@ -339,6 +407,7 @@ jobs:
339407
echo "Builds failed. See workflow artifacts for details." &&
340408
exit 1
341409
if: steps.build_rocky_9_ipa.outcome == 'failure' ||
410+
steps.build_rocky_10_ipa.outcome == 'failure' ||
342411
steps.build_ubuntu_noble_ipa.outcome == 'failure'
343412

344413
- name: Destroy

0 commit comments

Comments
 (0)