diff --git a/.github/workflows/service-pipeline.yml b/.github/workflows/service-pipeline.yml index abf7c29f..aa5ebcb9 100644 --- a/.github/workflows/service-pipeline.yml +++ b/.github/workflows/service-pipeline.yml @@ -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 diff --git a/service-deploy.sh b/service-deploy.sh index 82518b9a..af9771b0 100644 --- a/service-deploy.sh +++ b/service-deploy.sh @@ -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 : @@ -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