-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Migrate GHA deployment workflows to ArgoCD triggering" (#1227)
Signed-off-by: Ivan Polchenko <[email protected]>
- Loading branch information
Showing
4 changed files
with
8 additions
and
131 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 |
---|---|---|
|
@@ -48,58 +48,3 @@ jobs: | |
config: .github/cr.yaml | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
gitops_update: | ||
runs-on: ubuntu-latest | ||
name: Update GitOps Repo | ||
needs: | ||
- chart-release | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Git | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
- name: Add SSH key | ||
env: | ||
DITP_GITOPS_REPO_SECRET: ${{ secrets.DITP_GITOPS_REPO_SECRET }} | ||
run: | | ||
mkdir -p ~/.ssh | ||
echo "$DITP_GITOPS_REPO_SECRET" > ~/.ssh/id_rsa | ||
chmod 600 ~/.ssh/id_rsa | ||
ssh-keyscan github.com >> ~/.ssh/known_hosts | ||
- name: Clone gitops-repo | ||
run: | | ||
git clone [email protected]:bcgov-c/ministry-gitops-ditp.git | ||
cd ministry-gitops-ditp | ||
git config user.name "github-actions[bot]" | ||
git config user.email "github-actions[bot]@users.noreply.github.com" | ||
- name: Lookup latest chart | ||
id: chart_version | ||
run: | | ||
helm repo add traction https://bcgov.github.io/traction | ||
helm repo update | ||
echo "::set output name=APP_VERSION::$(helm search repo vc-authn-oidc -ojson | jq '.[0].app_version')" | ||
echo "::set output name=CHART_VERSION::$(helm search repo traction -ojson | jq '.[0].version')" | ||
- name: Update test | ||
env: | ||
APP_VERSION: ${{ steps.chart_version.outputs.APP_VERSION }} | ||
CHART_VERSION: ${{ steps.chart_version.outputs.CHART_VERSION }} | ||
run: | | ||
cd ministry-gitops-ditp | ||
yq e -i '.appVersion = $APP_VERSION' services/vc-authn-oidc/charts/test/Chart.yaml | ||
yq e -i '.version = $CHART_VERSION' services/traction/charts/test/Chart.yaml | ||
- name: Update prod | ||
env: | ||
APP_VERSION: ${{ steps.chart_version.outputs.APP_VERSION }} | ||
CHART_VERSION: ${{ steps.chart_version.outputs.CHART_VERSION }} | ||
run: | | ||
cd ministry-gitops-ditp | ||
yq e -i '.appVersion = $APP_VERSION' services/vc-authn-oidc/charts/prod/Chart.yaml | ||
yq e -i '.version = $CHART_VERSION' services/traction/charts/prod/Chart.yaml | ||
- name: Commit and push changes | ||
run: | | ||
cd ministry-gitops-ditp | ||
git add services/traction/charts/test/Chart.yaml services/traction/charts/prod/Chart.yaml | ||
git commit -m "Update chart version" | ||
git push origin main |
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 |
---|---|---|
|
@@ -69,74 +69,6 @@ jobs: | |
image_tag: ${{ steps.builder.outputs.image_tag }} | ||
image_version: ${{ steps.builder.outputs.image_version }} | ||
|
||
changed_files: | ||
runs-on: ubuntu-latest | ||
name: Test changed files | ||
outputs: | ||
any_changed: ${{ steps.chart-changes.outputs.any_changed }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Check for changes in the charts folder | ||
id: chart-changes | ||
uses: tj-actions/changed-files@v44 | ||
with: | ||
files: charts/traction/*.* | ||
|
||
argo_sync: | ||
runs-on: ubuntu-latest | ||
name: Update GitOps Repo to trigger ArgoCD Sync | ||
needs: | ||
- build_ui | ||
- build_acapy | ||
- build_proxy | ||
- changed_files | ||
if: needs.changed_files.outputs.any_changed != 'true' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Git | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
- name: Add SSH key | ||
env: | ||
DITP_GITOPS_REPO_SECRET: ${{ secrets.DITP_GITOPS_REPO_SECRET }} | ||
run: | | ||
mkdir -p ~/.ssh | ||
echo "$DITP_GITOPS_REPO_SECRET" > ~/.ssh/id_rsa | ||
chmod 600 ~/.ssh/id_rsa | ||
ssh-keyscan github.com >> ~/.ssh/known_hosts | ||
- name: Clone gitops-repo | ||
run: | | ||
git clone [email protected]:bcgov-c/ministry-gitops-ditp.git | ||
cd ministry-gitops-ditp | ||
git config user.name "github-actions[bot]" | ||
git config user.email "github-actions[bot]@users.noreply.github.com" | ||
- name: Lookup latest chart | ||
id: chart_version | ||
run: | | ||
helm repo add traction https://bcgov.github.io/traction | ||
helm repo update | ||
echo "::set output name=APP_VERSION::$(helm search repo vc-authn-oidc -ojson | jq '.[0].app_version')" | ||
echo "::set output name=CHART_VERSION::$(helm search repo traction -ojson | jq '.[0].version')" | ||
- name: Update values | ||
env: | ||
APP_VERSION: ${{ steps.chart_version.outputs.APP_VERSION }} | ||
CHART_VERSION: ${{ steps.chart_version.outputs.CHART_VERSION }} | ||
IMAGE_TAG: ${{ needs.build_acapy.outputs.image_version }} | ||
run: | | ||
cd ministry-gitops-ditp | ||
yq e -i '.appVersion = $APP_VERSION' services/vc-authn-oidc/charts/dev/Chart.yaml | ||
yq e -i '.version = $CHART_VERSION' services/traction/charts/dev/Chart.yaml | ||
yq e -i '.traction.acapy.image.tag = $IMAGE_TAG' services/traction/charts/dev/values.yaml | ||
yq e -i '.traction.tenant_proxy.image.tag = $IMAGE_TAG' services/traction/charts/dev/values.yaml | ||
yq e -i '.traction.ui.image.tag = $IMAGE_TAG' services/traction/charts/dev/values.yaml | ||
- name: Commit and push changes | ||
run: | | ||
cd ministry-gitops-ditp | ||
git add services/traction/charts/dev/values.yaml services/traction/charts/dev/Chart.yaml | ||
git commit -m "Update chart version and image tags" | ||
git push origin main | ||
deploy: | ||
name: Deploy Dev | ||
environment: development | ||
|
@@ -145,8 +77,8 @@ jobs: | |
- build_ui | ||
- build_acapy | ||
- build_proxy | ||
- changed_files | ||
if: ${{ needs.changed_files.outputs.any_changed == 'true' && contains(needs.*.result, 'success') && !(contains(needs.*.result, 'failure')) && (github.repository_owner == 'bcgov') }} | ||
if: ${{ always() && contains(needs.*.result, 'success') && !(contains(needs.*.result, 'failure')) && (github.repository_owner == 'bcgov') }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
|