It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Setting app engine app.yaml env variables

How can i set env_variables (of the google app engine app.yaml) using the variables set in the repository settings? For exemple, i set the variable: AUTH_JWT_SECRET

Reference for app.yaml: https://cloud.google.com/appengine/docs/standard/python/config/appref

 

My pipe:

image: node:10.15.3

pipelines:
branches:
master:
- step:
name: "Build"
caches:
- node
script:
- yarn
- yarn build
- step:
name: "Deploy to App Engine"
deployment: production
script:
- pipe: atlassian/google-app-engine-deploy:0.5.0
variables:
VERSION: "production"
PROMOTE: 'true'
STOP_PREVIOUS_VERSION: 'true'
KEY_FILE: $GPC_KEY_FILE
PROJECT: $GCP_PROJECT

 

1 answer

I resolved by doing this on the script section just before -pipe. But i think there should be a better way, because i will have to do this for every branch of deployment...

echo "beta_settings:
cloud_sql_instances: ${CLOUD_SQL_INSTANCES}

env_variables:
ENVIRONMENT: ${ENV}
EXPRESS_IP: 0.0.0.0
DB_HOST: ${DB_HOST}
DB_PORT: ''
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
DB_NAME: ${DB_NAME}
" > secrets.yaml

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket Pipelines

What We Learned When We Researched Open Source Vulnerabilities in 7 Popular Coding Languages

...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...

1,032 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you