New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't use env variables defined in Cloud build #209
Comments
If you're using basic plain-text environment variables (no secrets), you don't need to use |
If you're looking to use secrets with this cloud builder, you'll need to use the entrypoint parameter. This is required to refer to the environment variable for the secret. You'll need to call the You'll end up with something like this:
|
Great! Thanks for the answer. It would be great to have it documented, maybe in the README.md? |
@rgalite I'm not sure I understand where |
Trying to run a Cloud Build file like the next:
Is throwing an error, as it is assigning the env variable in app engine as the string "$DJANGO_SETTINGS_MODULE" instead of the real value that was coming from the env variable.
Step #0 - "apply migrations": ModuleNotFoundError: No module named '$DJANGO_SETTINGS_MODULE' Finished Step #0 - "apply migrations"
Not sure if the problem is in
ruby-docker/app-engine-exec-wrapper/execute.sh
Line 32 in 05dc673
ENV_PARAMS+=(-e "$OPTARG")
. Maybe removing the quotes would fix the issueENV_PARAMS+=(-e $OPTARG)
or the problem can also be in
ruby-docker/app-engine-exec-wrapper/execute.sh
Line 32 in 05dc673
docker run --rm ${ENTRYPOINT} --volumes-from=${CONTAINER} --network=${CONTAINER_NETWORK} ${ENV_PARAMS[@]} ${IMAGE} "$@"
It is a silly example, as I can use a substituion instead of an env variable there, but what I'm really trying to do is something like https://cloud.google.com/build/docs/securing-builds/use-secrets
The text was updated successfully, but these errors were encountered: