-
Notifications
You must be signed in to change notification settings - Fork 23
Automate Kolla version updates #1532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
0ce0123
Automated Kolla dependencies updates
assumptionsandg 8960c27
Test syntax fix
assumptionsandg a5abccf
Revert workflow
assumptionsandg 2d85e64
Reinstate workflow
assumptionsandg 90c6000
Reno
assumptionsandg b20f754
Merge branch 'stackhpc/2024.1' into automate-version-pin
assumptionsandg c4c3456
Bump kayobe to stackhpc/16.5.0.1
assumptionsandg 0ba32c6
Bump kolla to stackhpc/18.5.0.1
assumptionsandg ee7f634
Bump kolla-ansible to stackhpc/18.5.0.1
assumptionsandg c6671b4
Merge branch 'automate-version-pin' of github.com:stackhpc/stackhpc-k…
assumptionsandg c154a63
Reduce permissions
assumptionsandg 5a77f93
Update regex
assumptionsandg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }}. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
releasenotes/notes/kolla-dependency-workflow-6ff5520ee0ab8e15.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
kayobe@git+https://github.com/stackhpc/kayobe@stackhpc/2024.1 | ||
kayobe@git+https://github.com/stackhpc/kayobe@stackhpc/16.5.0.1 | ||
ansible-modules-hashivault>=5.2.1 | ||
jmespath |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.