always use a fresh docker config for each step#756
Merged
Conversation
This avoids potential race condition that: - Allow steps to use credential from other steps - Causes steps to use incorrect credentials, if they are over-written by another step
This improves job isolation, preventing jobs from relying on authentication configured in other jobs. This is based on PR #678, but we've removed the stack parameter because the v5.0.0 release is pending and we're comfortable making a small breaking change.
chloeruka
approved these changes
Oct 26, 2020
chloeruka
left a comment
Contributor
There was a problem hiding this comment.
Straightforward change to improve step isolation. We've discussed this and decided it's better to make this (possibly) breaking change now as part of v5 release, and to bugfix it later if necessary. Original PR (#678) says this has been working well for them for quite some time.
Contributor
|
Couldn't we do this in the |
Contributor
Author
|
@lox are you suggesting this doesn't need to be baked in for everyone? |
Setting it directly in the agent environment hook means we don't need to escape the eval. It also means we won't cat it out into build output with the rest of cfn-env. While I was there I also made the same change to windows.
This also fixes a shellcheck error SC2155 Instead of setting DOCKER_CONFIG directly, set BUILDKITE_DOCKER_CONFIG_TEMP_DIRECTORY and hydrate DOCKER_CONFIG for plugin steps. if this gets overriden by the user, they can manage their own DOCKER_CONFIG cleanup activities and we will always remove the temporary directory from the agent instance filesystem.
yob
commented
Oct 26, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This improves job isolation, preventing jobs from relying on authentication configured in other jobs.
This is based on PR #678, but we've removed the stack parameter because the v5.0.0 release is pending and we're comfortable making a small breaking change.