Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Setting app engine app.yaml env variables

Ricardo Fritsche
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 10, 2019

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

0 votes
Ricardo Fritsche
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 11, 2019

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
AUG Leaders

Atlassian Community Events