Skip to content

Instantly share code, notes, and snippets.

@jcyh0120
Created September 1, 2018 02:17
Show Gist options
  • Save jcyh0120/eaca0dffacc3ea03b086c2920b955a63 to your computer and use it in GitHub Desktop.
Save jcyh0120/eaca0dffacc3ea03b086c2920b955a63 to your computer and use it in GitHub Desktop.
nodejs app engine bitbucket-pipelines
# This is a sample build configuration for JavaScript.
# Check our guides at https://confluence.atlassian.com/x/14UWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: node:8.9.4
pipelines:
default:
- step:
caches:
- node
script: # Modify the commands below to build your repository.
# Install Google Cloud SDK
- curl -o /tmp/google-cloud-sdk.tar.gz https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-214.0.0-linux-x86_64.tar.gz
- tar -xvf /tmp/google-cloud-sdk.tar.gz -C /tmp/
- /tmp/google-cloud-sdk/install.sh -q
- source /tmp/google-cloud-sdk/path.bash.inc
- gcloud -v
- python --version
- npm install
# set GCLOUD_PROJECT environment variable to your project ID
# set GCLOUD_API_KEYFILE environment variable to base64-encoded keyfile as described here: https://confluence.atlassian.com/x/dm2xNQ
- echo ${GOOGLE_CLIENT_SECRET} > client-secret.json
- gcloud auth activate-service-account --key-file client-secret.json
- gcloud --verbosity=error app deploy app.yaml --project $CLOUDSDK_CORE_PROJECT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment