From 4d01483f762ee12a51ece6c9bd510ef5a3fd931a Mon Sep 17 00:00:00 2001 From: Jake Hutchinson <39007539+assumptionsandg@users.noreply.github.com> Date: Thu, 27 Feb 2025 13:37:58 +0000 Subject: [PATCH 1/4] Automate Kolla version updates (#1532) Automated Kolla dependencies updates --- .github/workflows/update-dependencies.yml | 87 +++++++++++++++++++ ...-dependency-workflow-6ff5520ee0ab8e15.yaml | 5 ++ 2 files changed, 92 insertions(+) create mode 100644 .github/workflows/update-dependencies.yml create mode 100644 releasenotes/notes/kolla-dependency-workflow-6ff5520ee0ab8e15.yaml diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml new file mode 100644 index 0000000000..2b9c8bda74 --- /dev/null +++ b/.github/workflows/update-dependencies.yml @@ -0,0 +1,87 @@ +name: Update dependencies + +on: + # Allow manual executions + workflow_dispatch: + # Run nightly + schedule: + - cron: '0 0 * * *' + +jobs: + propose_github_release_updates: + runs-on: ubuntu-22.04 + strategy: + matrix: + include: + - key: kolla + path: src/kayobe-config/etc/kayobe/stackhpc.yml + repository: stackhpc/kolla + search_regex: 'stackhpc_kolla_source_version\:.*$' + prefix: 'stackhpc_kolla_source_version\: ' + + - key: kolla-ansible + path: src/kayobe-config/etc/kayobe/stackhpc.yml + repository: stackhpc/kolla-ansible + search_regex: 'stackhpc_kolla_ansible_source_version\:.*$' + prefix: 'stackhpc_kolla_ansible_source_version\: ' + + - key: kayobe + path: src/kayobe-config/requirements.txt + repository: stackhpc/kayobe + search_regex: 'kayobe@stackhpc\/.*$' + prefix: 'kayobe@' + permissions: + contents: write + pull-requests: write + name: ${{ matrix.key }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + 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 }} + fetch-tags: true + path: ${{ github.workspace }}/src/${{ matrix.key }} + + - name: Get latest tag + id: latest_tag + run: | + TAG=$(git describe --tags --abbrev=0 --match stackhpc/\*) + echo latest_tag=${TAG} >> $GITHUB_OUTPUT + working-directory: ${{ github.workspace }}/src/${{ matrix.key }} + + - name: Update dependency key + run: | + TAG_OVERRIDE=$(echo $TAG | sed 's/\//\\\//g') + sed -i "s/$SEARCH/$PREFIX$TAG_OVERRIDE/g" $REQUIREMENTS + env: + PREFIX: ${{ matrix.prefix }} + TAG: ${{ steps.latest_tag.outputs.latest_tag }} + REQUIREMENTS: ${{ github.workspace }}/${{ matrix.path }} + SEARCH: ${{ matrix.search_regex }} + + - name: Propose changes via PR if required + uses: peter-evans/create-pull-request@v7 + with: + path: ${{ github.workspace }}/src/kayobe-config + commit-message: >- + Bump ${{ matrix.key }} to ${{ steps.latest_tag.outputs.latest_tag }} + branch: update-dependency/${{ matrix.key }} + delete-branch: true + title: >- + Bump ${{ matrix.key }} to ${{ steps.latest_tag.outputs.latest_tag }} + body: > + This PR was created automatically to update + ${{ matrix.key }} to ${{ steps.latest_tag.outputs.latest_tag }}. diff --git a/releasenotes/notes/kolla-dependency-workflow-6ff5520ee0ab8e15.yaml b/releasenotes/notes/kolla-dependency-workflow-6ff5520ee0ab8e15.yaml new file mode 100644 index 0000000000..acbe45077f --- /dev/null +++ b/releasenotes/notes/kolla-dependency-workflow-6ff5520ee0ab8e15.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Workflow to update Kolla dependencies (Kayobe, Kolla and Kolla-Ansible) + to the latest tag available in the StackHPC branch via CI. From dc71582b03c18bbd8005ba783a4b2971eab1ff46 Mon Sep 17 00:00:00 2001 From: assumptionsandg <39007539+assumptionsandg@users.noreply.github.com> Date: Fri, 28 Feb 2025 17:43:57 +0000 Subject: [PATCH 2/4] Bump kolla to stackhpc/16.6.0.8 --- etc/kayobe/stackhpc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/kayobe/stackhpc.yml b/etc/kayobe/stackhpc.yml index db9e3bda5b..1f9f6c5b04 100644 --- a/etc/kayobe/stackhpc.yml +++ b/etc/kayobe/stackhpc.yml @@ -141,7 +141,7 @@ stackhpc_repo_elrepo_9_version: "{{ stackhpc_repo_distribution }}" # Kolla source repository. stackhpc_kolla_source_url: "https://github.com/stackhpc/kolla" -stackhpc_kolla_source_version: "stackhpc/{{ openstack_release }}" +stackhpc_kolla_source_version: stackhpc/16.6.0.8 # Kolla Ansible source repository. stackhpc_kolla_ansible_source_url: "https://github.com/stackhpc/kolla-ansible" From c357b85ed62f9794b0cb00134caa2838780964a8 Mon Sep 17 00:00:00 2001 From: assumptionsandg <39007539+assumptionsandg@users.noreply.github.com> Date: Fri, 28 Feb 2025 17:43:57 +0000 Subject: [PATCH 3/4] Bump kolla-ansible to stackhpc/16.7.0.13 --- etc/kayobe/stackhpc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/kayobe/stackhpc.yml b/etc/kayobe/stackhpc.yml index 1f9f6c5b04..3adc216da7 100644 --- a/etc/kayobe/stackhpc.yml +++ b/etc/kayobe/stackhpc.yml @@ -145,7 +145,7 @@ stackhpc_kolla_source_version: stackhpc/16.6.0.8 # Kolla Ansible source repository. stackhpc_kolla_ansible_source_url: "https://github.com/stackhpc/kolla-ansible" -stackhpc_kolla_ansible_source_version: "stackhpc/{{ openstack_release }}" +stackhpc_kolla_ansible_source_version: stackhpc/16.7.0.13 ############################################################################### # Container image registry From 217f058d9470b7716505f72ef3363c979837ee6a Mon Sep 17 00:00:00 2001 From: assumptionsandg <39007539+assumptionsandg@users.noreply.github.com> Date: Fri, 28 Feb 2025 17:43:55 +0000 Subject: [PATCH 4/4] Bump kayobe to stackhpc/14.7.0.18 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c2792b36b4..2148d970ed 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -kayobe@git+https://github.com/stackhpc/kayobe@stackhpc/2023.1 +kayobe@git+https://github.com/stackhpc/kayobe@stackhpc/14.7.0.18 ansible-modules-hashivault>=5.2.1 jmespath