Skip to content

Instantly share code, notes, and snippets.

@ssgtcookie
Created October 25, 2017 16:39
Show Gist options
  • Save ssgtcookie/2dcfad4712010f476b6199c651f23fe2 to your computer and use it in GitHub Desktop.
Save ssgtcookie/2dcfad4712010f476b6199c651f23fe2 to your computer and use it in GitHub Desktop.
Google App Engine - Gitlab CI deployment
image: google/cloud-sdk:latest
stages:
- deploy
deploy:
stage: deploy
environment: Production
only:
- master
script:
- echo $GOOGLE_APP_ENGINE_KEY > /tmp/$CI_PIPELINE_ID.json
- gcloud auth activate-service-account --key-file /tmp/$CI_PIPELINE_ID.json
- gcloud config set project $GOOGLE_PROJECT_ID
- gcloud info
- gcloud --quiet app deploy
after_script:
- rm /tmp/$CI_PIPELINE_ID.json
@ssgtcookie
Copy link
Author

Thanks to Dennis. Don't forget to set the secret gitlab vars as explained by Dennis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment