Skip to content
Open
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
84 changes: 42 additions & 42 deletions .github/workflows/ipa-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: Build IPA images
on:
workflow_dispatch:
inputs:
rocky9:
description: Build Rocky Linux 9
rocky10:
description: Build Rocky Linux 10
type: boolean
default: false
rocky9-aarch64:
description: Build Rocky Linux 9 aarch64
default: true
rocky10-aarch64:
description: Build Rocky Linux 10 aarch64
type: boolean
default: false
default: true
ubuntu-noble:
description: Build Ubuntu 24.04 Noble
type: boolean
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:

ipa-image-build:
name: Build IPA images (x86_64)
if: github.repository == 'stackhpc/stackhpc-kayobe-config' && (inputs.rocky9 || inputs.ubuntu-noble)
if: github.repository == 'stackhpc/stackhpc-kayobe-config' && (inputs.rocky10 || inputs.ubuntu-noble)
environment: ${{ inputs.runner_env }}
runs-on: ${{ needs.runner-selection.outputs.runner_name_image_build }}
needs:
Expand Down Expand Up @@ -295,18 +295,18 @@ jobs:
scp -r ubuntu@$(jq -r .access_ip_v4.value src/kayobe-config/etc/kayobe/environments/ci-builder/tf-outputs.yml):/opt/kayobe/images/*/*.std* ./logs/ubuntu-noble/
if: inputs.ubuntu-noble

- name: Build a Rocky 9 IPA image
id: build_rocky_9_ipa
- name: Build a Rocky 10 IPA image
id: build_rocky_10_ipa
continue-on-error: true
run: |
source venvs/kayobe/bin/activate &&
source src/kayobe-config/kayobe-env --environment ci-builder &&
kayobe overcloud deployment image build --force-rebuild \
-e ipa_build_distro="centos" \
-e ipa_build_release="9-stream"
-e ipa_build_release="10-stream"
env:
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD_CI_BUILDER }}
if: inputs.rocky9
if: inputs.rocky10

- name: Show last error logs
continue-on-error: true
Expand All @@ -316,9 +316,9 @@ jobs:
kayobe seed host command run --command "tail -200 /opt/kayobe/images/ipa/ipa.stdout" --show-output
env:
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD_CI_BUILDER }}
if: steps.build_rocky_9_ipa.outcome == 'failure'
if: steps.build_rocky_10_ipa.outcome == 'failure'

- name: Upload Rocky 9 IPA kernel image to Ark
- name: Upload Rocky 10 IPA kernel image to Ark
run: |
source venvs/kayobe/bin/activate &&
source src/kayobe-config/kayobe-env --environment ci-builder &&
Expand All @@ -328,13 +328,13 @@ jobs:
-e artifact_type=ipa-images \
-e artifact_tag=${{ needs.create-tag.outputs.ipa_image_tag }} \
-e os_distribution="rocky" \
-e os_release="9" \
-e os_release="10" \
-e file_regex='*.kernel'
env:
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD_CI_BUILDER }}
if: inputs.rocky9 && steps.build_rocky_9_ipa.outcome == 'success'
if: inputs.rocky10 && steps.build_rocky_10_ipa.outcome == 'success'

- name: Upload Rocky 9 IPA ramdisk image to Ark
- name: Upload Rocky 10 IPA ramdisk image to Ark
run: |
source venvs/kayobe/bin/activate &&
source src/kayobe-config/kayobe-env --environment ci-builder &&
Expand All @@ -344,18 +344,18 @@ jobs:
-e artifact_type=ipa-images \
-e artifact_tag=${{ needs.create-tag.outputs.ipa_image_tag }} \
-e os_distribution="rocky" \
-e os_release="9" \
-e os_release="10" \
-e file_regex='*.initramfs'
env:
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD_CI_BUILDER }}
if: inputs.rocky9 && steps.build_rocky_9_ipa.outcome == 'success'
if: inputs.rocky10 && steps.build_rocky_10_ipa.outcome == 'success'

- name: Copy logs back
continue-on-error: true
run: |
mkdir -p logs/rocky-9
scp -r ubuntu@$(jq -r .access_ip_v4.value src/kayobe-config/etc/kayobe/environments/ci-builder/tf-outputs.yml):/opt/kayobe/images/*/*.std* ./logs/rocky-9/
if: inputs.rocky9
mkdir -p logs/rocky-10
scp -r ubuntu@$(jq -r .access_ip_v4.value src/kayobe-config/etc/kayobe/environments/ci-builder/tf-outputs.yml):/opt/kayobe/images/*/*.std* ./logs/rocky-10/
if: inputs.rocky10

- name: Upload logs artifact
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
Expand All @@ -367,7 +367,7 @@ jobs:
run: |
echo "Builds failed. See workflow artifacts for details." &&
exit 1
if: steps.build_rocky_9_ipa.outcome == 'failure' ||
if: steps.build_rocky_10_ipa.outcome == 'failure' ||
steps.build_ubuntu_noble_ipa.outcome == 'failure'

- name: Destroy
Expand All @@ -381,7 +381,7 @@ jobs:

ipa-image-build-aarch64:
name: Build IPA images (aarch64)
if: github.repository == 'stackhpc/stackhpc-kayobe-config' && inputs.rocky9-aarch64 && inputs.runner_env == 'SMS Lab'
if: github.repository == 'stackhpc/stackhpc-kayobe-config' && inputs.rocky10-aarch64 && inputs.runner_env == 'SMS Lab'
environment: ${{ inputs.runner_env }}
runs-on: ${{ needs.runner-selection.outputs.runner_name_image_build }}
needs:
Expand Down Expand Up @@ -542,19 +542,19 @@ jobs:
env:
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD_CI_BUILDER }}

- name: Build a Rocky 9 aarch64 IPA image
id: build_rocky_9_ipa_aarch64
- name: Build a Rocky 10 aarch64 IPA image
id: build_rocky_10_ipa_aarch64
continue-on-error: true
run: |
source venvs/kayobe/bin/activate &&
source src/kayobe-config/kayobe-env --environment ci-builder &&
kayobe overcloud deployment image build --force-rebuild \
-e ipa_build_distro="centos" \
-e ipa_build_release="9-stream" \
-e ipa_build_release="10-stream" \
-e ipa_build_arch="aarch64"
env:
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD_CI_BUILDER }}
if: inputs.rocky9-aarch64
if: inputs.rocky10-aarch64

- name: Show last error logs
continue-on-error: true
Expand All @@ -564,9 +564,9 @@ jobs:
kayobe seed host command run --command "tail -200 /opt/kayobe/images/ipa/ipa.stdout" --show-output
env:
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD_CI_BUILDER }}
if: steps.build_rocky_9_ipa_aarch64.outcome == 'failure'
if: steps.build_rocky_10_ipa_aarch64.outcome == 'failure'

- name: Upload Rocky 9 aarch64 IPA kernel image to Ark
- name: Upload Rocky 10 aarch64 IPA kernel image to Ark
run: |
source venvs/kayobe/bin/activate &&
source src/kayobe-config/kayobe-env --environment ci-builder &&
Expand All @@ -575,16 +575,16 @@ jobs:
-e artifact_path=/opt/kayobe/images/ipa \
-e artifact_type=ipa-images \
-e artifact_tag=${{ needs.create-tag.outputs.ipa_image_tag }} \
-e repository_name="ipa-images-${{ needs.create-tag.outputs.openstack_release }}-rocky-9-aarch64" \
-e pulp_base_path="ipa-images/${{ needs.create-tag.outputs.openstack_release }}/rocky/9/aarch64" \
-e repository_name="ipa-images-${{ needs.create-tag.outputs.openstack_release }}-rocky-10-aarch64" \
-e pulp_base_path="ipa-images/${{ needs.create-tag.outputs.openstack_release }}/rocky/10/aarch64" \
-e os_distribution="rocky" \
-e os_release="9" \
-e os_release="10" \
-e file_regex='ipa.kernel'
env:
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD_CI_BUILDER }}
if: steps.build_rocky_9_ipa_aarch64.outcome == 'success'
if: steps.build_rocky_10_ipa_aarch64.outcome == 'success'

- name: Upload Rocky 9 aarch64 IPA ramdisk image to Ark
- name: Upload Rocky 10 aarch64 IPA ramdisk image to Ark
run: |
source venvs/kayobe/bin/activate &&
source src/kayobe-config/kayobe-env --environment ci-builder &&
Expand All @@ -593,21 +593,21 @@ jobs:
-e artifact_path=/opt/kayobe/images/ipa \
-e artifact_type=ipa-images \
-e artifact_tag=${{ needs.create-tag.outputs.ipa_image_tag }} \
-e repository_name="ipa-images-${{ needs.create-tag.outputs.openstack_release }}-rocky-9-aarch64" \
-e pulp_base_path="ipa-images/${{ needs.create-tag.outputs.openstack_release }}/rocky/9/aarch64" \
-e repository_name="ipa-images-${{ needs.create-tag.outputs.openstack_release }}-rocky-10-aarch64" \
-e pulp_base_path="ipa-images/${{ needs.create-tag.outputs.openstack_release }}/rocky/10/aarch64" \
-e os_distribution="rocky" \
-e os_release="9" \
-e os_release="10" \
-e file_regex='ipa.initramfs'
env:
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD_CI_BUILDER }}
if: steps.build_rocky_9_ipa_aarch64.outcome == 'success'
if: steps.build_rocky_10_ipa_aarch64.outcome == 'success'

- name: Copy logs back
continue-on-error: true
run: |
mkdir -p logs/rocky-9
scp -r ubuntu@$(jq -r .access_ip_v4.value src/kayobe-config/etc/kayobe/environments/ci-builder/tf-outputs.yml):/opt/kayobe/images/*/*.std* ./logs/rocky-9/
if: inputs.rocky9-aarch64
mkdir -p logs/rocky-10
scp -r ubuntu@$(jq -r .access_ip_v4.value src/kayobe-config/etc/kayobe/environments/ci-builder/tf-outputs.yml):/opt/kayobe/images/*/*.std* ./logs/rocky-10/
if: inputs.rocky10-aarch64

- name: Upload logs artifact
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
Expand All @@ -619,7 +619,7 @@ jobs:
run: |
echo "Build failed. See workflow artifacts for details." &&
exit 1
if: steps.build_rocky_9_ipa_aarch64.outcome == 'failure'
if: steps.build_rocky_10_ipa_aarch64.outcome == 'failure'

- name: Destroy
run: terraform destroy -auto-approve
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/ipa-image-promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name: Promote IPA image
on:
workflow_dispatch:
inputs:
rocky9:
description: Promote Rocky Linux 9
rocky10:
description: Promote Rocky Linux 10
type: boolean
default: true
rocky9-aarch64:
description: Promote Rocky Linux 9 aarch64
rocky10-aarch64:
description: Promote Rocky Linux 10 aarch64
type: boolean
default: true
ubuntu-noble:
Expand All @@ -29,7 +29,7 @@ jobs:
steps:
- name: Validate inputs
run: |
if [[ ${{ inputs.rocky9 }} == 'false' && ${{ inputs.rocky9-aarch64 }} == 'false' && ${{ inputs.ubuntu-noble }} == 'false' ]]; then
if [[ ${{ inputs.rocky10 }} == 'false' && ${{ inputs.rocky10-aarch64 }} == 'false' && ${{ inputs.ubuntu-noble }} == 'false' ]]; then
echo "At least one distribution must be selected"
exit 1
fi
Expand Down Expand Up @@ -75,32 +75,32 @@ jobs:
source src/kayobe-config/kayobe-env --environment ci-builder &&
kayobe control host bootstrap

- name: Promote Rocky Linux 9 IPA image artifact
- name: Promote Rocky Linux 10 IPA image artifact
run: |
source venvs/kayobe/bin/activate &&
source src/kayobe-config/kayobe-env --environment ci-builder &&
kayobe playbook run \
src/kayobe-config/etc/kayobe/ansible/pulp/pulp-artifact-promote.yml \
-e artifact_type="ipa-images" \
-e os_distribution='rocky' \
-e os_release='9'
-e os_release='10'
env:
ARTIFACT_TAG: ${{ inputs.image_tag }}
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD_CI_BUILDER }}
if: inputs.rocky9
if: inputs.rocky10

- name: Promote Rocky Linux 9 aarch64 IPA image artifact
- name: Promote Rocky Linux 10 aarch64 IPA image artifact
run: |
source venvs/kayobe/bin/activate &&
source src/kayobe-config/kayobe-env --environment ci-builder &&
kayobe playbook run \
src/kayobe-config/etc/kayobe/ansible/pulp/pulp-artifact-promote.yml \
-e repository_name="ipa-images-${{ steps.openstack_release.outputs.openstack_release }}-rocky-9-aarch64" \
-e pulp_base_path="ipa-images/${{ steps.openstack_release.outputs.openstack_release }}/rocky/9/aarch64"
-e repository_name="ipa-images-${{ steps.openstack_release.outputs.openstack_release }}-rocky-10-aarch64" \
-e pulp_base_path="ipa-images/${{ steps.openstack_release.outputs.openstack_release }}/rocky/10/aarch64"
env:
ARTIFACT_TAG: ${{ inputs.image_tag }}
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD_CI_BUILDER }}
if: inputs.rocky9-aarch64
if: inputs.rocky10-aarch64

- name: Promote Ubuntu Noble 24.04 IPA image artifact
run: |
Expand Down
Loading
Loading