Skip to content

Instantly share code, notes, and snippets.

@Timtech4u
Created June 22, 2020 07:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Timtech4u/e341bee59cdada9de3c219e5acd81198 to your computer and use it in GitHub Desktop.
Save Timtech4u/e341bee59cdada9de3c219e5acd81198 to your computer and use it in GitHub Desktop.
# File: .gitlab-ci.yml
image: docker:latest
stages:
- deploy
deploy:
stage: deploy
image: google/cloud-sdk
services:
- docker:dind
script:
- echo $GCP_SERVICE_KEY > gcloud-service-key.json # Google Cloud service accounts
- gcloud auth activate-service-account --key-file gcloud-service-key.json
- gcloud config set project $GCP_PROJECT_ID
- gcloud builds submit . --config=cloudbuild.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment