-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add deploy workflow for all services
- Loading branch information
1 parent
8a4ad1a
commit b6e97bb
Showing
5 changed files
with
181 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: deploy-client | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'client/**' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: cd client && docker build -t vishnumohanan/client . | ||
- run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD | ||
env: | ||
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} | ||
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} | ||
- run: docker push vishnumohanan/client | ||
|
||
- name: Authenticate with Google Cloud | ||
uses: 'google-github-actions/auth@v2' | ||
with: | ||
credentials_json: ${{ secrets.GKE_SA_KEY }} | ||
- name: Set up Google Cloud SDK | ||
uses: google-github-actions/setup-gcloud@v2 | ||
with: | ||
version: "latest" | ||
project_id: ${{ secrets.GKE_PROJECT_ID }} | ||
- name: Install gke-gcloud-auth-plugin | ||
run: gcloud components install gke-gcloud-auth-plugin | ||
|
||
- name: Configure kubectl | ||
run: gcloud container clusters get-credentials ${{secrets.GKE_CLUSTER_NAME}} --region=${{secrets.GKE_REGION}} --project=${{ secrets.GKE_PROJECT_ID }} | ||
- run: kubectl rollout restart deployment client-depl | ||
|
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,36 @@ | ||
name: deploy-expiration | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'expiration/**' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: cd expiration && docker build -t vishnumohanan/expiration . | ||
- run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD | ||
env: | ||
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} | ||
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} | ||
- run: docker push vishnumohanan/expiration | ||
|
||
- name: Authenticate with Google Cloud | ||
uses: 'google-github-actions/auth@v2' | ||
with: | ||
credentials_json: ${{ secrets.GKE_SA_KEY }} | ||
- name: Set up Google Cloud SDK | ||
uses: google-github-actions/setup-gcloud@v2 | ||
with: | ||
version: "latest" | ||
project_id: ${{ secrets.GKE_PROJECT_ID }} | ||
- name: Install gke-gcloud-auth-plugin | ||
run: gcloud components install gke-gcloud-auth-plugin | ||
|
||
- name: Configure kubectl | ||
run: gcloud container clusters get-credentials ${{secrets.GKE_CLUSTER_NAME}} --region=${{secrets.GKE_REGION}} --project=${{ secrets.GKE_PROJECT_ID }} | ||
- run: kubectl rollout restart deployment expiration-depl | ||
|
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,36 @@ | ||
name: deploy-orders | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'orders/**' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: cd orders && docker build -t vishnumohanan/orders . | ||
- run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD | ||
env: | ||
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} | ||
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} | ||
- run: docker push vishnumohanan/orders | ||
|
||
- name: Authenticate with Google Cloud | ||
uses: 'google-github-actions/auth@v2' | ||
with: | ||
credentials_json: ${{ secrets.GKE_SA_KEY }} | ||
- name: Set up Google Cloud SDK | ||
uses: google-github-actions/setup-gcloud@v2 | ||
with: | ||
version: "latest" | ||
project_id: ${{ secrets.GKE_PROJECT_ID }} | ||
- name: Install gke-gcloud-auth-plugin | ||
run: gcloud components install gke-gcloud-auth-plugin | ||
|
||
- name: Configure kubectl | ||
run: gcloud container clusters get-credentials ${{secrets.GKE_CLUSTER_NAME}} --region=${{secrets.GKE_REGION}} --project=${{ secrets.GKE_PROJECT_ID }} | ||
- run: kubectl rollout restart deployment orders-depl | ||
|
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,36 @@ | ||
name: deploy-payments | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'payments/**' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: cd payments && docker build -t vishnumohanan/payments . | ||
- run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD | ||
env: | ||
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} | ||
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} | ||
- run: docker push vishnumohanan/payments | ||
|
||
- name: Authenticate with Google Cloud | ||
uses: 'google-github-actions/auth@v2' | ||
with: | ||
credentials_json: ${{ secrets.GKE_SA_KEY }} | ||
- name: Set up Google Cloud SDK | ||
uses: google-github-actions/setup-gcloud@v2 | ||
with: | ||
version: "latest" | ||
project_id: ${{ secrets.GKE_PROJECT_ID }} | ||
- name: Install gke-gcloud-auth-plugin | ||
run: gcloud components install gke-gcloud-auth-plugin | ||
|
||
- name: Configure kubectl | ||
run: gcloud container clusters get-credentials ${{secrets.GKE_CLUSTER_NAME}} --region=${{secrets.GKE_REGION}} --project=${{ secrets.GKE_PROJECT_ID }} | ||
- run: kubectl rollout restart deployment payments-depl | ||
|
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,37 @@ | ||
|
||
name: deploy-tickets | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'tickets/**' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: cd tickets && docker build -t vishnumohanan/tickets . | ||
- run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD | ||
env: | ||
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} | ||
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} | ||
- run: docker push vishnumohanan/tickets | ||
|
||
- name: Authenticate with Google Cloud | ||
uses: 'google-github-actions/auth@v2' | ||
with: | ||
credentials_json: ${{ secrets.GKE_SA_KEY }} | ||
- name: Set up Google Cloud SDK | ||
uses: google-github-actions/setup-gcloud@v2 | ||
with: | ||
version: "latest" | ||
project_id: ${{ secrets.GKE_PROJECT_ID }} | ||
- name: Install gke-gcloud-auth-plugin | ||
run: gcloud components install gke-gcloud-auth-plugin | ||
|
||
- name: Configure kubectl | ||
run: gcloud container clusters get-credentials ${{secrets.GKE_CLUSTER_NAME}} --region=${{secrets.GKE_REGION}} --project=${{ secrets.GKE_PROJECT_ID }} | ||
- run: kubectl rollout restart deployment tickets-depl | ||
|