Skip to content

Commit 62e190d

Browse files
committed
Propose PR when overcloud host images are built
1 parent 8b3cf22 commit 62e190d

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

.github/workflows/overcloud-host-image-build.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,22 @@ jobs:
391391
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
392392
if: always()
393393

394+
- name: Trigger update overcloud host image tags
395+
run: |
396+
gh workflow run \
397+
update-overcloud-host-image-tags.yml \
398+
--repo stackhpc/stackhpc-kayobe-config \
399+
--ref $BRANCH_NAME \
400+
-f rocky9_tag=${{ steps.host_image_tag.outputs.host_image_tag }} \
401+
-f ubuntu_noble_tag=${{ steps.host_image_tag.outputs.host_image_tag }}
402+
env:
403+
GITHUB_TOKEN: ${{ secrets.STACKHPC_RELEASE_TRAIN_TOKEN }}
404+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
405+
406+
- name: Display link to update overcloud host image tags workflows
407+
run: |
408+
echo "::notice Overcloud host image promote workflow: https://github.com/stackhpc/stackhpc-kayobe-config/actions/workflows/update-overcloud-host-image-tags.yml"
409+
394410
- name: Send message to Slack via Workflow Builder
395411
uses: slackapi/[email protected]
396412
with:
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Update overcloud host image tags
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
rocky9_tag:
7+
description: Overcloud host image tag for Rocky 9
8+
type: string
9+
required: true
10+
ubuntu_noble_tag:
11+
description: Overcloud host image tag for Ubuntu
12+
type: string
13+
required: true
14+
15+
jobs:
16+
propose_overcloud_host_image_tag_updates:
17+
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
18+
runs-on: ubuntu-22.04
19+
permissions:
20+
contents: write
21+
pull-requests: write
22+
name: Update overcloud host image tags
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
with:
27+
ref: stackhpc/2025.1
28+
path: ${{ github.workspace }}/src/kayobe-config
29+
30+
- name: Update overcloud host image tags
31+
run: |
32+
sed -i "/stackhpc_rocky_9_overcloud_host_image_version/s/.*/stackhpc_rocky_9_overcloud_host_image_version: ${{ inputs.rocky9_tag }}/" etc/kayobe/pulp-host-image-versions.yml
33+
sed -i "/stackhpc_ubuntu_noble_overcloud_host_image_version/s/.*/stackhpc_ubuntu_noble_overcloud_host_image_version: ${{ inputs.ubuntu_noble_tag }}/" etc/kayobe/pulp-host-image-versions.yml
34+
35+
- name: Propose changes via PR if required
36+
uses: peter-evans/create-pull-request@v7
37+
with:
38+
path: ${{ github.workspace }}/src/kayobe-config
39+
commit-message: >-
40+
Bump overcloud host image tags
41+
author: stackhpc-ci <[email protected]>
42+
branch: bump-overcloud-host-images/${{ inputs.rocky9_tag }}
43+
delete-branch: true
44+
title: >-
45+
DNM test PR: Bump overcloud host image tags
46+
body: >
47+
This PR was created automatically to update the overcloud host image
48+
tags to:
49+
Rocky 9: ${{ inputs.rocky9_tag }}
50+
Ubuntu Noble: ${{ inputs.ubuntu_noble_tag }}
51+
labels: |
52+
automated

0 commit comments

Comments
 (0)