buildah: support passing build args as Tekton parameter list #1028
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.
Description
For building ACS containers, we need to pass the same parameter to multiple tasks, one of them is
buildah
.While there is
BUILD_ARGS_FILE
parameter (added in #935), it requires us writing a file in a workspace which, well, requires creating a custom task which will be a pain to get rid of in order to conform with EC.Here I introduce an additional parameter of Tekton's type
list
-BUILD_ARGS_LIST
.Notes on testing
I developed it in a toy task and also verified how it runs in a pipeline: stackrox/scanner#1512. (Example runs, if you have access to the ACS tenant.)
A thing I'm concerned about is that now
--build-arg-file
option will point to a file that's outside ofbuildah
Context directory (/build-args/build-args-unified
). I think it should be fine but I was not able to test whetherbuildah
will object (the latest version I get on my machine is 1.28 and it does not have that command-line option).More broadly, I don't know how to test this change on real pipelines before it's merged so I'll appreciate some guidance. Also, leaving the template text 馃憞 as a reminder.
Before you complete this pull request ...
Look for any open pull requests in the repository with the title "e2e-tests update" and
see if there are recent e2e-tests updates that will be applicable to your change.