-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Propagating MAKEFLAGS to support tagless builds #46606
Conversation
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
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 think the PR description should be more precise in the problem being solved here. Make normally passes MAKEFLAGS
to a submake by always putting it in the environment and the submake accepts that from the environment. When we are layering through docker, the environment is not passed so this breaks. But it can work if we pass the right args to docker run
.
So I think this should be changed to run docker run -e MAKEFLAGS ...
to propagate $MAKEFLAGS
into the container and leave it at that. This also has the advantage that whatever is in $MAKEFLAGS
may not be safe for the command line as there is no quoting of special characters, but the environment does not go via the command line so that should be safer.
I ran a local test and this does seem to work and be sufficient to propagate MAKEFLAGS
.
@doggydogworld See the table below for backport results.
|
* Propagating makeflags for nightly release * Trying recusrive submake in container * Propagating makeflags another way * More propagation * Trying MAKEFLAGS as an env var * Have specify MAKEFLAGS * Typod a paranthesis * Moving makeflags env flag for docker to the targets * Typo * Previous try had a typo didn't catch but should work now
* Propagating makeflags for nightly release * Trying recusrive submake in container * Propagating makeflags another way * More propagation * Trying MAKEFLAGS as an env var * Have specify MAKEFLAGS * Typod a paranthesis * Moving makeflags env flag for docker to the targets * Typo * Previous try had a typo didn't catch but should work now
* Propagating makeflags for nightly release * Trying recusrive submake in container * Propagating makeflags another way * More propagation * Trying MAKEFLAGS as an env var * Have specify MAKEFLAGS * Typod a paranthesis * Moving makeflags env flag for docker to the targets * Typo * Previous try had a typo didn't catch but should work now
* Propagating makeflags for nightly release * Trying recusrive submake in container * Propagating makeflags another way * More propagation * Trying MAKEFLAGS as an env var * Have specify MAKEFLAGS * Typod a paranthesis * Moving makeflags env flag for docker to the targets * Typo * Previous try had a typo didn't catch but should work now
Passing MAKEFLAGS as an environment variable to
docker run
commands to support propagation of MAKEFLAGS to "submake" run in a container.As an example of what this aims to fix, when calling a "submake" through our buildbox containers
The flags passed in to the parent make aren't being propagated. To fix this the
MAKEFLAGS
variable will be passed in as an environment variable to the container. This matches the behavior of how make handles submakes.