Authenticate before pushing to GCP
This commit is contained in:
		@@ -48,6 +48,12 @@ jobs:
 | 
				
			|||||||
      - attach_workspace:
 | 
					      - attach_workspace:
 | 
				
			||||||
          at: ./
 | 
					          at: ./
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - run:
 | 
				
			||||||
 | 
					          name: Authenticate GCP
 | 
				
			||||||
 | 
					          command: |
 | 
				
			||||||
 | 
					            echo $GCLOUD_SERVICE_KEY > key.json
 | 
				
			||||||
 | 
					            gcloud auth activate-service-account --key-file key.json
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - run:
 | 
					      - run:
 | 
				
			||||||
          name: Deploy
 | 
					          name: Deploy
 | 
				
			||||||
          command: gsutil cp -r dist/ZaksCode/* gs://staging.zaks-code.appspot.com
 | 
					          command: gsutil cp -r dist/ZaksCode/* gs://staging.zaks-code.appspot.com
 | 
				
			||||||
@@ -64,6 +70,12 @@ jobs:
 | 
				
			|||||||
      - attach_workspace:
 | 
					      - attach_workspace:
 | 
				
			||||||
          at: ./
 | 
					          at: ./
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - run:
 | 
				
			||||||
 | 
					          name: Authenticate GCP
 | 
				
			||||||
 | 
					          command: |
 | 
				
			||||||
 | 
					            echo $GCLOUD_SERVICE_KEY > key.json
 | 
				
			||||||
 | 
					            gcloud auth activate-service-account --key-file key.json
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - run:
 | 
					      - run:
 | 
				
			||||||
          name: Depoly
 | 
					          name: Depoly
 | 
				
			||||||
          command: gsutil cp -r dist/ZaksCode/* gs://zaks-code.appspot.com
 | 
					          command: gsutil cp -r dist/ZaksCode/* gs://zaks-code.appspot.com
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user