forked from GoogleContainerTools/kaniko
-
Notifications
You must be signed in to change notification settings - Fork 2
feat(pkg/commands): add support for build secrets #30
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
Merged
Merged
Changes from 20 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
245c70c
feat(pkg/commands): add support for build secrets
SasSwart 81f924f
feat(pkg/commands): pass secrets into the run command
SasSwart b509184
feat(pkg/commands): pass secrets into the run marker
SasSwart 4a667d0
chore(pkg): pass a nil linter to tests that now require is
SasSwart 83c8a18
chore(commands): improve variable naming and add documentation
SasSwart d37707e
chore(commands): improve variable naming and add documentation
SasSwart 7d27c5a
chore(pkg/executor): set a default working directory if one hasn't be…
SasSwart 80e0bdb
deps: bump github.com/moby/buildkit and github.com/docker/docker (#3242)
aaron-prindle 75c841a
chore(deps): slim down to a failing test for reproducibility
SasSwart c0d174f
chore(deps): bump github.com/moby/buildkit from v0.14.1 to v0.16.0
SasSwart d1daf05
chore(deps): test against the latest version of docker
SasSwart bf140c2
chore(deps): test against the latest version of docker
SasSwart 6e3f198
chore(pkg/executor): remove defunct code
SasSwart 2b0d796
chore(integration): add integration tests for build secrets
SasSwart 2999f79
Merge remote-tracking branch 'origin/main' into jjs/build-secrets
SasSwart df94a9d
fix(pkg/commands): improve code documentation and style
SasSwart 0f29fa1
fix(pkg/integration): test relative targets for docker build secrets
SasSwart 97120de
fix(pkg/integration): test relative targets for docker build secrets
SasSwart 8f144a6
fix(pkg/integration): fix TestLayers
SasSwart 8783c3e
fix(pkg/commands): guarantee secret cleanup after run commands
SasSwart 0bd5bf7
fix(pkg/commands): add tests for fileCreatorCleaner
SasSwart 91a95ae
fix(pkg/commands): use the filesystem package where appropriate
SasSwart 7224b96
fix(pkg/filesystem): remove defunct package level functions
SasSwart a8c3296
fix(pkg/filesystem): fix an edge case in the fileCreatorCleaner
SasSwart File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # Copyright 2020 Google, Inc. All rights reserved. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| FROM debian:10.13 | ||
| # Make sure we set secrets to env the same way docker does | ||
| RUN --mount=type=secret,id=FOO,env=FOO,required=true echo "$FOO" > /etc/foo | ||
| # Make sure we set secrets to default disk location the same way docker does | ||
| RUN --mount=type=secret,id=BAR cat /run/secrets/BAR > /etc/bar | ||
| # Make sure we set secrets to custom disk location the same way docker does | ||
| RUN --mount=type=secret,id=BAZ,target=/baz.secret cat /baz.secret > /etc/baz | ||
| # Make sure relative targets for secret mounts work: | ||
| WORKDIR /etc | ||
| RUN --mount=type=secret,id=QUX,target=qux.secret cat qux.secret > /etc/qux | ||
|
|
||
| # Test with ARG so that we know our implementation of secrets don't override args | ||
| ARG file | ||
| RUN echo "run" > $file | ||
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.