-
Notifications
You must be signed in to change notification settings - Fork 16
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
Support apko configs that consist of multiple files. #64
Conversation
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.
Refresh of examples/wolfi-base/apko.lock.json
makes this PR look huge... but it's actually not that big.
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.
cc @thesayyn as well, since he might be able to spot issues with this better than @jonjohnsonjr or myself.
Overall this seems to make sense to me, but I'm only ~30% sure I'm reading it right 😄
@sfc-gh-mhazy now the docs require regeneration after the spelling fixes. |
Signed-off-by: Mateusz Hazy <[email protected]>
Signed-off-by: Mateusz Hazy <[email protected]>
Signed-off-by: Mateusz Hazy <[email protected]>
Signed-off-by: Mateusz Hazy <[email protected]>
Signed-off-by: Mateusz Hazy <[email protected]>
Signed-off-by: Mateusz Hazy <[email protected]>
Signed-off-by: Mateusz Hazy <[email protected]>
Signed-off-by: Mateusz Hazy <[email protected]>
Signed-off-by: Mateusz Hazy <[email protected]>
Signed-off-by: Mateusz Hazy <[email protected]>
Signed-off-by: Mateusz Hazy <[email protected]>
Signed-off-by: Mateusz Hazy <[email protected]>
Co-authored-by: Piotr Tabor (ptab) <[email protected]> Signed-off-by: Mateusz Hazy <[email protected]> Signed-off-by: Mateusz Hazy <[email protected]>
Signed-off-by: Mateusz Hazy <[email protected]>
Signed-off-by: Mateusz Hazy <[email protected]>
Signed-off-by: Mateusz Hazy <[email protected]>
Signed-off-by: Mateusz Hazy <[email protected]>
Signed-off-by: Mateusz Hazy <[email protected]>
Signed-off-by: Mateusz Hazy <[email protected]>
Signed-off-by: Mateusz Hazy <[email protected]>
Signed-off-by: Mateusz Hazy <[email protected]>
Signed-off-by: Mateusz Hazy <[email protected]>
Signed-off-by: Mateusz Hazy <[email protected]>
Signed-off-by: Mateusz Hazy <[email protected]>
Co-authored-by: Jon Johnson <[email protected]> Signed-off-by: Piotr Tabor (ptab) <[email protected]> Signed-off-by: Mateusz Hazy <[email protected]>
Co-authored-by: Jon Johnson <[email protected]> Signed-off-by: Piotr Tabor (ptab) <[email protected]> Signed-off-by: Mateusz Hazy <[email protected]>
Co-authored-by: Jon Johnson <[email protected]> Signed-off-by: Piotr Tabor (ptab) <[email protected]> Signed-off-by: Mateusz Hazy <[email protected]>
Co-authored-by: Jon Johnson <[email protected]> Signed-off-by: Piotr Tabor (ptab) <[email protected]> Signed-off-by: Mateusz Hazy <[email protected]>
Signed-off-by: Mateusz Hazy <[email protected]>
Overview
This PR is paving the way for image configurations that consist of multiple files. Currently an example of such configuration is any
include
usage, but in the future there will be more, for instancebase image
that is part of chainguard-dev/apko#806.Example
a.apko.yaml
b.apko.yaml
c.apko.yaml
and finally
Details
RIght now the only file added to the build action in
apko_image
is the direct config. Therefore, the multi file config will fail to be evaluated by apko.This PR introduces the
apko_config
rule that allows settingdeps
andApkoConfigInfo
provider to support transitive dependencies. We want to support including both source files and generated targets with the path referencing convention that both source and generated files are referenced as paths relative to workspace root.Additionally I added dedicated
apko_lock
rule to decouple it from the one generated byapko_image
. With the complex configs the restrictions in the latter were becoming problematic.For the example above it would work as
BUILD
c.apko.yaml
The change is supposed to be fully backwards compatible - single file configs without
ApkoConfigInfo
providers are still supported.Alternative considered
Move to the Bazel based apko configs
apko_config
, which may accept the parameters for every corresponding element of apko config.How it works for example above
a.apko.yaml - remains as is
b.apko.yaml
and in
BUILD
c.apko.yaml
and in
BUILD