Skip to content

Instantly share code, notes, and snippets.

@abits
Forked from DennisAlund/.gitlab-ci.yml
Created February 18, 2017 23:45
Show Gist options
  • Save abits/c6bbdf394fcffec81db3f3ef868ac48f to your computer and use it in GitHub Desktop.
Save abits/c6bbdf394fcffec81db3f3ef868ac48f to your computer and use it in GitHub Desktop.
Automatic deployment of Google App Engine project with Gitlab Continuous Integration - https://medium.com/evenbit/an-easy-guide-to-automatically-deploy-your-google-app-engine-project-with-gitlab-ci-48cb84757125
image: python:2.7
before_script:
- echo "deb http://packages.cloud.google.com/apt cloud-sdk-jessie main" | tee /etc/apt/sources.list.d/google-cloud-sdk.list
- curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
- apt-get update && apt-get install google-cloud-sdk
after_script:
- rm /tmp/$CI_PIPELINE_ID.json
deploy_production:
stage: deploy
environment: Production
only:
- master
script:
- echo $DEPLOY_KEY_FILE_PRODUCTION > /tmp/$CI_PIPELINE_ID.json
- gcloud auth activate-service-account --key-file /tmp/$CI_PIPELINE_ID.json
- gcloud --quiet --project $PROJECT_ID_PRODUCTION app deploy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment