Skip to content

Instantly share code, notes, and snippets.

@rohgoyal
Created February 21, 2018 21:39
Show Gist options
  • Save rohgoyal/d3c2650d870c912acca1df9a87fe5521 to your computer and use it in GitHub Desktop.
Save rohgoyal/d3c2650d870c912acca1df9a87fe5521 to your computer and use it in GitHub Desktop.
bitbucket-pipelines.yml
image: maven:3.5.2-jdk-8
pipelines:
default:
- step:
script:
# Install Google Cloud SDK
- export CLOUDSDK_CORE_DISABLE_PROMPTS=1
# Modify the commands below to build your repository.
# Downloading the Google Cloud SDK
- curl -o /tmp/google-cloud-sdk.tar.gz https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-188.0.1-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
# Authenticating with the service account key file
- echo ${GOOGLE_CLIENT_SECRET} > client-secret.json
- gcloud auth activate-service-account --key-file client-secret.json
# Linking to the Google Cloud project
# gcloud config set project $CLOUDSDK_CORE_PROJECT
# Deploying the application
- gcloud components install app-engine-java
- mvn install appengine:update -Dappengine.additionalParams="--service_account_json_key_file=client-secret.json"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment