-
Notifications
You must be signed in to change notification settings - Fork 548
Define the ENV setting for all environments (including test/build/local) #23073
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
Conversation
d28a310
to
4e4b6a1
Compare
4e4b6a1
to
d045ed4
Compare
d045ed4
to
a3a85b0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't verify the build
testing steps - I'd already done make up
by the time I read the instructions so I guess everything was cached(?) because I didn't see any print
output.
If you add a line in the docker file it will invalidate the cache. Should be pretty trivial to reproduce. |
I added the |
Did you run with DOCKER_TARGET=production? If not, then it would've just skipped that stage. You could add it to the base stage and it will always run. |
I ran exactly what was specified in the testing steps above: |
Fixes: mozilla/addons#15358
Description
Defines a gloabl ENV setting and documents its purpose and meaning.
Testing
You can inspect for build,test,local.
Build
Anywhere in the dockerfile add
RUN echo "env: ${ENV}"
Run the build
Expect to see "env: build"
Test
In any test add
Expect both to print "test"
Local
run
make down && make up
(to ensure new compose settings are appliedCheck in the terminal
make shell
printenv
Expect ENV=local in there
Check in settings
make djshell
settings.ENV
Expect "local" to be returned
Screenshots
Checklist
#ISSUENUM
at the top of your PR to an existing open issue in the mozilla/addons repository.