-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5193 from opsmill/bab-merge-stable-into-1.1
Merge stable into branch release-1.1
- Loading branch information
Showing
177 changed files
with
6,221 additions
and
4,199 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
|
@@ -40,9 +40,6 @@ jobs: | |
- name: Install Helm | ||
uses: azure/[email protected] | ||
|
||
- name: Install Helm Push Plugin | ||
run: helm plugin install https://github.com/chartmuseum/helm-push | ||
|
||
- name: Determine Chart Version | ||
id: version | ||
run: | | ||
|
@@ -61,9 +58,6 @@ jobs: | |
--username '${{ secrets.HARBOR_USERNAME }}' | ||
--password '${{ secrets.HARBOR_PASSWORD }}' | ||
- name: Add Helm repository | ||
run: helm repo add opsmill https://${{ vars.HARBOR_HOST }}/chartrepo/opsmill | ||
|
||
- name: Package Helm Chart | ||
run: | | ||
helm package --dependency-update ./helm --version ${{ steps.version.outputs.version }} | ||
|
@@ -73,12 +67,5 @@ jobs: | |
run: | | ||
helm push infrahub-${{ steps.version.outputs.version }}.tgz oci://${{ vars.HARBOR_HOST }}/opsmill/chart | ||
- name: Push Helm Chart to traditional repository | ||
if: ${{ inputs.publish }} | ||
run: > | ||
helm cm-push -f infrahub-${{ steps.version.outputs.version }}.tgz opsmill | ||
--username '${{ secrets.HARBOR_USERNAME }}' | ||
--password '${{ secrets.HARBOR_PASSWORD }}' | ||
- name: Cleanup | ||
run: rm -f infrahub-${{ steps.version.outputs.version }}.tgz |
This file contains 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
This file contains 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
This file contains 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,71 @@ | ||
--- | ||
# yamllint disable rule:truthy rule:line-length | ||
name: Handle Submodule Trigger | ||
|
||
on: | ||
repository_dispatch: | ||
types: | ||
- trigger-submodule-update | ||
|
||
jobs: | ||
update-dependencies: | ||
strategy: | ||
matrix: | ||
branch-name: | ||
- stable | ||
- develop | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: "${{ matrix.branch-name }}" | ||
submodules: recursive | ||
|
||
- name: Set branch name | ||
id: set-branch-name | ||
run: | | ||
SUBMODULE_PATH="python_sdk" | ||
SDK_VERSION="${{ github.event.client_payload.version }}" | ||
BRANCH_NAME="${{ matrix.branch-name}}-${SUBMODULE_PATH}-${SDK_VERSION}" | ||
echo "SUBMODULE_PATH=$SUBMODULE_PATH" >> $GITHUB_ENV | ||
echo "SDK_VERSION=$SDK_VERSION" >> $GITHUB_ENV | ||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV | ||
- name: Use the version from the client payload to update the submodule | ||
run: | | ||
echo "Updating submodule to version: ${{ env.SDK_VERSION }}" | ||
echo "Branch name: ${{ env.BRANCH_NAME }}" | ||
# Navigate to the submodule and update it to the specified version | ||
cd ${{ env.SUBMODULE_PATH }} | ||
git fetch --tags | ||
git checkout ${{ env.SDK_VERSION }} | ||
cd - | ||
- name: Prepare the branch for the update | ||
id: prepare-branch | ||
run: | | ||
echo "Checking if branch ${{ env.BRANCH_NAME }} exists..." | ||
BRANCH_EXISTS=$(git ls-remote --heads origin ${{ env.BRANCH_NAME }} | wc -l) | ||
echo "BRANCH_EXISTS=$BRANCH_EXISTS" >> $GITHUB_ENV | ||
- name: Commit and push changes with github-actions-x/commit | ||
uses: github-actions-x/[email protected] | ||
with: | ||
github-token: ${{ secrets.GH_UPDATE_PACKAGE_OTTO }} | ||
push-branch: ${{ env.BRANCH_NAME }} | ||
commit-message: "chore: update submodule ${{ env.SUBMODULE_PATH }} to version ${{ env.SDK_VERSION }}" | ||
files: ${{ env.SUBMODULE_PATH }}/ | ||
name: opsmill-bot | ||
email: [email protected] | ||
rebase: ${{ env.BRANCH_EXISTS == 1 }} | ||
|
||
- name: Create a pull request | ||
run: | | ||
echo ${{ secrets.GH_UPDATE_PACKAGE_OTTO }} | gh auth login --with-token | ||
gh pr create \ | ||
--title "Update ${{ env.SUBMODULE_PATH }} to version ${{ env.SDK_VERSION }} against ${{ matrix.branch-name}}" \ | ||
--body "This PR updates the submodule ${{ env.SUBMODULE_PATH }} to version ${{ env.SDK_VERSION }}." \ | ||
--base ${{ matrix.branch-name}} \ | ||
--head ${{ env.BRANCH_NAME }} |
This file contains 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 |
---|---|---|
|
@@ -44,11 +44,11 @@ jobs: | |
run: "poetry install --all-extras" | ||
|
||
- name: "Update Docker Env variable in docker-compose.yml file" | ||
run: "poetry run invoke dev.gen-config-env -u" | ||
run: "poetry run invoke release.gen-config-env -u" | ||
- name: "Update Infrahub Image Version in docker-compose.yml file" | ||
run: "poetry run invoke dev.update-docker-compose" | ||
run: "poetry run invoke release.update-docker-compose" | ||
- name: "Update AppVersion in helm/chart.yaml file" | ||
run: "poetry run invoke dev.update-helm-chart" | ||
run: "poetry run invoke release.update-helm-chart" | ||
- name: Commit docker-compose.yml and helm | ||
uses: github-actions-x/[email protected] | ||
with: | ||
|
This file contains 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,44 @@ | ||
--- | ||
# yamllint disable rule:truthy rule:line-length | ||
name: Trigger Submodule update | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
runs-on: | ||
description: "The OS to run the job on" | ||
required: false | ||
default: "ubuntu-22.04" | ||
type: string | ||
version: | ||
type: string | ||
required: false | ||
description: The string to extract semver from. | ||
default: '' | ||
workflow_call: | ||
inputs: | ||
runs-on: | ||
description: "The OS to run the job on" | ||
required: false | ||
default: "ubuntu-22.04" | ||
type: string | ||
version: | ||
type: string | ||
required: false | ||
description: The string to extract semver from. | ||
default: '' | ||
|
||
jobs: | ||
trigger-submodule: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Trigger submodule update | ||
run: | | ||
curl -X POST \ | ||
-H 'Authorization: token ${{ secrets.GH_UPDATE_PACKAGE_OTTO }}' \ | ||
-H 'Accept: application/vnd.github.v3+json' \ | ||
'https://api.github.com/repos/${{ secrets.INFRAHUB_ENTERPRISE_REPOSITORY }}/dispatches' \ | ||
-d '{"event_type":"trigger-submodule-update","client_payload":{"version":"${{ inputs.version }}"}}' |
This file contains 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
This file contains 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
Oops, something went wrong.