Hi
What's the suggested way to set environment variables when using bitbucket pipelines? I.e. how can I set the bitbucket deployment variables as my applications environment variables when building? I am using the google cloud app engine pipe.
The app.yaml supports the usage of env variables per default, however, it seems like the bitbucket variables are not accessible at this point.
My app.yaml looks like this:
runtime: nodejs10
instance_class: F4_1G
env_variables
TEST: '${TEST}'
TEST_SECURED: '${TEST_SECURED}'
another approach was to use the script section in the bitbucket-pipelines.yaml, for example:
script:
- echo "Deploying to GCP APP Engine"
- echo "Setting necessary environment variables.."
- export TEST="${TEST}"
- export TEST_SECURED="${TEST_SECURED}"
Both result in either *undefined values or not setting the env variables at all*.
Thanks for your response.
/y
PS: I am expecting the secret variables to be set correctly using this approach, or do I need to manually decode them using base64? Can you please provide me a working example for both cases. Preferrably using the app.yaml.