Skip to content

Conversation

MoteHue
Copy link
Contributor

@MoteHue MoteHue commented Sep 17, 2025

When updates to pulp-repo-versions.yml are pushed, new overcloud host images are automatically built.
Once the images build successfully, a new PR is proposed to SKC to bump the host image tags.
If this fails, we're now alerted in #release-train-alerts
The auto-promotion workflow is extended to automatically promote host images too.

@MoteHue MoteHue force-pushed the automatically-build-overcloud-host-images branch from 33704d6 to 6b58727 Compare September 17, 2025 14:00
@MoteHue
Copy link
Contributor Author

MoteHue commented Sep 17, 2025

Here's examples of the trigger:

  1. when pulp-repo-versions is not changed: https://github.com/stackhpc/stackhpc-kayobe-config/actions/runs/17800119094
  2. When pulp-repo-versions is changed: https://github.com/stackhpc/stackhpc-kayobe-config/actions/runs/17799778857

@MoteHue MoteHue changed the title Automatically build overcloud host images Automatically build and promote overcloud host images Sep 17, 2025
@MoteHue MoteHue force-pushed the automatically-build-overcloud-host-images branch 4 times, most recently from 151c185 to e1f756a Compare September 18, 2025 16:02
Trigger building new overcloud host images when a change to
pulp-repo-versions.yml is pushed to stackhpc/2025.1.
Given these builds are now automatic, we need to be
alerted whne they fail.
@MoteHue MoteHue force-pushed the automatically-build-overcloud-host-images branch from e1f756a to eb57551 Compare September 18, 2025 16:03
@MoteHue MoteHue marked this pull request as ready for review September 18, 2025 16:03
@MoteHue MoteHue requested a review from a team as a code owner September 18, 2025 16:03
@MoteHue
Copy link
Contributor Author

MoteHue commented Sep 18, 2025

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces automation to build overcloud host images when pulp-repo-versions.yml is updated. The changes are well-structured, adding a new path filter for GitHub Actions and a corresponding release note. The renaming of .github/path-filters.yml to a more specific name is also a good improvement for clarity. I have one minor suggestion for the release note to improve its readability for a wider audience.

branch: bump-overcloud-host-images-${{ inputs.rocky9_tag }}-${{ inputs.ubuntu_noble_tag }}
delete-branch: true
title: >-
DNM test PR: Bump overcloud host image tags
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a real PR right?

Suggested change
DNM test PR: Bump overcloud host image tags
Bump overcloud host image tags

OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
if: always()

- name: Trigger update overcloud host image tags
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want this to trigger every time?

We can keep it on by default, but it'd be nice to have an option to skip the tag update since sometimes we just want to test that images do in fact build with a new configuration

-e os_release='9'
env:
ARTIFACT_TAG: ${{ inputs.image_tag }}
ARTIFACT_TAG: "{{ stackhpc_rocky_9_overcloud_host_image_version }}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just trying to understand what's going on here

So, are you setting this env var to a jinja template of the stackhpc_rocky_9_overcloud_host_image_version variable, which then gets resolved within the playbook?

Comment on lines +400 to +401
$(if [[ "${{ inputs.rocky9 }}" == "true" ]]; then echo "-f rocky9_tag=${{ steps.host_image_tag.outputs.host_image_tag }}"; fi) \
$(if [[ "${{ inputs.ubuntu-noble }}" == "true" ]]; then echo "-f ubuntu_noble_tag=${{ steps.host_image_tag.outputs.host_image_tag }}"; fi)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See review at .github/workflows/update-overcloud-host-image-tags.yml:46

commit-message: >-
Bump overcloud host image tags
author: stackhpc-ci <[email protected]>
branch: bump-overcloud-host-images-${{ inputs.rocky9_tag }}-${{ inputs.ubuntu_noble_tag }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get why both tags are templated here but if both rocky and ubuntu are built, same tag will repeat twice.
I think what we can do instead is

  1. replace inputs with update_rocky9_tag (bool), update_ubuntu_noble_tag (bool) and host_image_tag (string)
  2. Pass inputs.rocky9, inputs.ubuntu-noble steps.host_image_tag.outputs.host_image_tag from .github/workflows/overcloud-host-image-build.yml

needs:
- runner-selection
permissions: {}
permissions: write-all
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need all writes for this workflow?

are built successfully, a PR will be automatically proposed back to SKC to
bump the image tags. These images will then be automatically promoted when
new host image tags are merged. If the overcloud host image build fails, an
alert will be sent to #release-train-alerts on Slack.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this is too specific to us and can be removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants