-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
50f2d29
commit 6869d02
Showing
5 changed files
with
91 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Push docker image to GCR reusable workflow | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
app_name: | ||
required: true | ||
type: string | ||
namespace_name: | ||
required: true | ||
type: string | ||
values_file: | ||
required: true | ||
type: string | ||
env_file: | ||
required: true | ||
type: string | ||
secrets: | ||
gcp_token: | ||
required: true | ||
AWS_ACCESS_KEY_ID: | ||
required: true | ||
AWS_SECRET_ACCESS_KEY: | ||
required: true | ||
jobs: | ||
deploy: | ||
name: Upgrade helm chart | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Setup GKE cluster | ||
uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e | ||
with: | ||
cluster_name: web-devs | ||
location: us-central1 | ||
credentials: ${{ secrets.gcp_token }} | ||
- name: Helm tool installer | ||
uses: Azure/setup-helm@v2.0 | ||
- name: Download starkware-third-party repo from S3. | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_DEFAULT_REGION: us-east-2 | ||
run: | | ||
helm plugin install https://starkware-third-party.s3.us-east-2.amazonaws.com/k8s/helm-s3/helm-s3-v0.9.2.tar.gz | ||
helm repo add starkware s3://starkware-third-party/helm-repo/charts | ||
helm repo update | ||
- name: Upgrade using helm upgrade command. | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_DEFAULT_REGION: us-east-2 | ||
run: | | ||
helm upgrade ${{ inputs.app_name }} starkware/webapp-general-helm \ | ||
--namespace=${{ inputs.namespace_name }} \ | ||
--values ${{ inputs.values_file}} \ | ||
--set-file configMap.frontend.envs=${{ inputs.env_file }} \ | ||
--set frontend.image.tag=${{ github.ref_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
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