From 28e334ae9e44316af72d2286381db28ad5886b4a Mon Sep 17 00:00:00 2001 From: Jake Hutchinson Date: Mon, 3 Mar 2025 12:14:23 +0000 Subject: [PATCH 1/4] Allow kolla tag updates on non-default branches --- .github/workflows/stackhpc-update-kolla.yml | 24 +++++++++++++++++++++ .github/workflows/update-dependencies.yml | 23 ++++++++------------ 2 files changed, 33 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/stackhpc-update-kolla.yml diff --git a/.github/workflows/stackhpc-update-kolla.yml b/.github/workflows/stackhpc-update-kolla.yml new file mode 100644 index 000000000..d2158638f --- /dev/null +++ b/.github/workflows/stackhpc-update-kolla.yml @@ -0,0 +1,24 @@ +name: Update Kolla versions + +on: + # Allow manual executions + workflow_dispatch: + # Run nightly + schedule: + - cron: '0 0 * * *' + +jobs: + update_from_branch: + runs-on: ubuntu-22.04 + strategy: + matrix: + include: + - version: stackhpc/2023.1 + - version: stackhpc/2024.1 + name: ${{ matrix.version }} + steps: + - name: Update dependencies + uses: ./.github/workflows/update-dependencies.yml + with: + openstack_version: ${{ matrix.version }} + secrets: inherit diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 2b9c8bda7..83646bf1c 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -1,11 +1,12 @@ name: Update dependencies on: - # Allow manual executions - workflow_dispatch: - # Run nightly - schedule: - - cron: '0 0 * * *' + workflow_call: + inputs: + openstack_version: + description: OpenStack version + type: string + required: true jobs: propose_github_release_updates: @@ -38,20 +39,14 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: + ref: ${{ inputs.openstack_version }} path: ${{ github.workspace }}/src/kayobe-config - - name: Determine OpenStack release - id: openstack_release - run: | - BRANCH=$(awk -F'=' '/defaultbranch/ {print $2}' .gitreview) - echo "openstack_release=${BRANCH}" | sed -E "s,(stable|unmaintained)/,," >> $GITHUB_OUTPUT - working-directory: ${{ github.workspace }}/src/kayobe-config - - name: Checkout the dependency repo uses: actions/checkout@v4 with: repository: ${{ matrix.repository }} - ref: stackhpc/${{ steps.openstack_release.outputs.openstack_release }} + ref: stackhpc/${{ inputs.openstack_version }} fetch-tags: true path: ${{ github.workspace }}/src/${{ matrix.key }} @@ -78,7 +73,7 @@ jobs: path: ${{ github.workspace }}/src/kayobe-config commit-message: >- Bump ${{ matrix.key }} to ${{ steps.latest_tag.outputs.latest_tag }} - branch: update-dependency/${{ matrix.key }} + branch: update-dependency/${{ matrix.key }}/${{ inputs.openstack_version }} delete-branch: true title: >- Bump ${{ matrix.key }} to ${{ steps.latest_tag.outputs.latest_tag }} From a57eda90f15bcc08ef9f7198b2676a94a358d285 Mon Sep 17 00:00:00 2001 From: Jake Hutchinson Date: Mon, 3 Mar 2025 15:05:52 +0000 Subject: [PATCH 2/4] Fixup matrices --- .github/workflows/stackhpc-update-kolla.yml | 17 ++++++++--------- .github/workflows/update-dependencies.yml | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/stackhpc-update-kolla.yml b/.github/workflows/stackhpc-update-kolla.yml index d2158638f..016cbe7a5 100644 --- a/.github/workflows/stackhpc-update-kolla.yml +++ b/.github/workflows/stackhpc-update-kolla.yml @@ -8,17 +8,16 @@ on: - cron: '0 0 * * *' jobs: - update_from_branch: - runs-on: ubuntu-22.04 + update-from-branch: + name: Update dependencies strategy: matrix: include: - version: stackhpc/2023.1 - version: stackhpc/2024.1 - name: ${{ matrix.version }} - steps: - - name: Update dependencies - uses: ./.github/workflows/update-dependencies.yml - with: - openstack_version: ${{ matrix.version }} - secrets: inherit + uses: ./.github/workflows/update-dependencies.yml + with: + openstack_version: ${{ matrix.version }} + permissions: + contents: write + pull-requests: write diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 83646bf1c..cb0699d13 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -46,7 +46,7 @@ jobs: uses: actions/checkout@v4 with: repository: ${{ matrix.repository }} - ref: stackhpc/${{ inputs.openstack_version }} + ref: ${{ inputs.openstack_version }} fetch-tags: true path: ${{ github.workspace }}/src/${{ matrix.key }} From 6503664033c7eaa8ca61bc39e9a3d286c3c6f177 Mon Sep 17 00:00:00 2001 From: Jake Hutchinson Date: Mon, 3 Mar 2025 15:08:57 +0000 Subject: [PATCH 3/4] Reno --- releasenotes/notes/kolla-update-fixes-5ff55225ce85441f.yaml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 releasenotes/notes/kolla-update-fixes-5ff55225ce85441f.yaml diff --git a/releasenotes/notes/kolla-update-fixes-5ff55225ce85441f.yaml b/releasenotes/notes/kolla-update-fixes-5ff55225ce85441f.yaml new file mode 100644 index 000000000..1d0b34d4b --- /dev/null +++ b/releasenotes/notes/kolla-update-fixes-5ff55225ce85441f.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Allow Kolla dependency updates on non-default branches. From 5b30887a71a1a455ab47737d9282506064b27e29 Mon Sep 17 00:00:00 2001 From: Jake Hutchinson Date: Mon, 3 Mar 2025 15:20:32 +0000 Subject: [PATCH 4/4] Include version in title --- .github/workflows/update-dependencies.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index cb0699d13..0bff4fcc9 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -76,7 +76,7 @@ jobs: branch: update-dependency/${{ matrix.key }}/${{ inputs.openstack_version }} delete-branch: true title: >- - Bump ${{ matrix.key }} to ${{ steps.latest_tag.outputs.latest_tag }} + Bump ${{ inputs.openstack_version }} ${{ matrix.key }} to ${{ steps.latest_tag.outputs.latest_tag }} body: > - This PR was created automatically to update + This PR was created automatically to update ${{ inputs.openstack_version }} ${{ matrix.key }} to ${{ steps.latest_tag.outputs.latest_tag }}.