Skip to content

Commit

Permalink
Merge pull request #11 from GeorgianaElena/gha
Browse files Browse the repository at this point in the history
Add workflows to deploy the staging and prod app
  • Loading branch information
GeorgianaElena authored Sep 3, 2024
2 parents 1a0efbc + bbe6ccd commit f2c7181
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 8 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/deploy-production.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy the app in production

on:
push:
branches:
- main
paths:
- helm-charts/app/Chart.yaml
- helm-charts/apps/prod.values.yaml
workflow_dispatch:

jobs:
upgrade-support-chart:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup deploy
uses: ./.github/actions/setup-deploy
with:
GCP_KMS_DECRYPTOR_KEY: ${{ secrets.GCP_KMS_DECRYPTOR_KEY }}

- name: Update helm dependencies
run: |
helm dependency update helm-charts/app
- name: Deploy prod app
run: |
python3 deployer.py app --namespace=prod --values_file prod.values.yaml
29 changes: 29 additions & 0 deletions .github/workflows/deploy-staging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy the staging app

on:
push:
branches:
- main
paths:
- helm-charts/app/Chart.yaml
- helm-charts/apps/staging.values.yaml
workflow_dispatch:

jobs:
upgrade-support-chart:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup deploy
uses: ./.github/actions/setup-deploy
with:
GCP_KMS_DECRYPTOR_KEY: ${{ secrets.GCP_KMS_DECRYPTOR_KEY }}

- name: Update helm dependencies
run: |
helm dependency update helm-charts/app
- name: Deploy staging app
run: |
python3 deployer.py app --namespace=staging --values_file staging.values.yaml
10 changes: 2 additions & 8 deletions .github/workflows/deploy-support.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ on:
- helm-charts/support/**
workflow_dispatch:

env:
TERM: xterm
# This may not be required any more, and it may depend on the kubectl version
# we use etc as well. For now, we have it added to avoid issues.
USE_GKE_GCLOUD_AUTH_PLUGIN: "True"

jobs:
upgrade-support-chart:
runs-on: ubuntu-latest
Expand All @@ -25,10 +19,10 @@ jobs:
with:
GCP_KMS_DECRYPTOR_KEY: ${{ secrets.GCP_KMS_DECRYPTOR_KEY }}

- name: Build helm dep
- name: Update helm dependencies
run: |
helm dependency update helm-charts/support
- name: Upgrade support chart
- name: Deploy the support chart
run: |
python3 deployer.py support --namespace=support

0 comments on commit f2c7181

Please sign in to comment.