Skip to content

Commit

Permalink
update deploy script8
Browse files Browse the repository at this point in the history
  • Loading branch information
kundan59 committed Sep 10, 2023
1 parent 815790c commit 144c38c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/service-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ jobs:
java-version: '19'
distribution: 'temurin'
cache: maven
- uses: google-github-actions/setup-gcloud@1bee7de035d65ec5da40a31f8589e240eba8fde5
- uses: google-github-actions/setup-gcloud@v0.2.0
with:
service_account_key: ${{ secrets.GKE_SA_KEY }}
project_id: ${{ secrets.GKE_PROJECT }}
project_id: ${{ env.GKE_PROJECT }}
service_account_key: ${{ secrets.GKE_KEY }}
export_default_credentials: true

# Configure Docker to use the gcloud command-line tool as a credential
# helper for authentication
Expand Down
18 changes: 9 additions & 9 deletions service-deploy.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

PROJECT_ID="$(gcloud config get-value project)"
echo $PROJECT_ID
echo "$1"
for project in $(cat projects-deploy.txt)
do
:
Expand All @@ -15,14 +15,14 @@ do

# case 2 build and deploy order-service
"order-service")
cd order-service || continue
mvn clean install || continue
gcloud auth configure-docker
echo "---------packaging done, start docker build-----------"
sudo docker build --tag gcr.io/$PROJECT_ID/orderservice:1.0.0 . || continue
echo "--------docker build done, docker push---------------"
sudo docker push gcr.io/$PROJECT_ID/orderservice:1.0.0
echo "--------pushed docker image--------------------------"
# cd order-service || continue
# mvn clean install || continue
# gcloud auth configure-docker
# echo "---------packaging done, start docker build-----------"
# sudo docker build --tag gcr.io/$PROJECT_ID/orderservice:1.0.0 . || continue
# echo "--------docker build done, docker push---------------"
# sudo docker push gcr.io/$PROJECT_ID/orderservice:1.0.0
# echo "--------pushed docker image--------------------------"

esac

Expand Down

0 comments on commit 144c38c

Please sign in to comment.