Trying to run a Cloud Build file like the next:
steps:
- name: 'gcr.io/google-appengine/exec-wrapper'
id: TEST
args:
[
'-i',
'gcr.io/$PROJECT_ID/${_BUILD_TARGET}',
'-s',
'${_CLOUD_SQL_DEV}',
'-e',
'DJANGO_SETTINGS_MODULE=$$DJANGO_SETTINGS_MODULE',
'-e',
'CLOUD_SQL=/cloudsql/${_CLOUD_SQL_DEV}',
'--',
'python',
'manage.py',
'migrate',
'--no-input',
]
env:
- 'DJANGO_SETTINGS_MODULE=test.production'
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
|
ENV_PARAMS+=(-e "$OPTARG") |
as it is adding the environment variables in quotes
ENV_PARAMS+=(-e "$OPTARG"). Maybe removing the quotes would fix the issue
ENV_PARAMS+=(-e $OPTARG)
or the problem can also be in
|
ENV_PARAMS+=(-e "$OPTARG") |
as it is adding the ENV_PARAMS using quotes. Maybe removing the quotes would fix the issue
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
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