Skip to content

Conversation

@deitch
Copy link
Collaborator

@deitch deitch commented Aug 12, 2025

- What I did
Following on from #4155 which added support to calculated build args using:

MYARG=@lkt:pkg:/path/to/pkg

This adds multiple dynamic packages with @lkt:pkgs:/path/to/* via:

MYARG_%=@lkt:pkgs:/path/to/*

It is explained in more detail in the docs, also included in this PR. In short, everything in the glob path will be treated as a package dir, have its show-tag resolved. It then will create multiple build-args, where each one has:

  • value: the value of lkt pkg show-tag <dir>
  • key: the key as provided (in the example above), with the single % replaced with the name of the image in the directory, upper-cased, with characters /, -, : converted to _

- How I did it
Changed the TransformBuildArgValue() func from what already existed, added docs, added tests.

- How to verify it
CI

- Description for the changelog

Dynamic calculated build args

@deitch
Copy link
Collaborator Author

deitch commented Aug 12, 2025

Note that I have yet to add the actual tests for this change. They are coming shortly. I wanted CI to make sure I didn't break anything while I did it.

@deitch deitch force-pushed the dynamic-calculated-build-args branch 8 times, most recently from 2ba5b01 to 07d7c7b Compare August 13, 2025 08:11
@deitch deitch force-pushed the dynamic-calculated-build-args branch from 07d7c7b to 5fcdad7 Compare August 13, 2025 08:52
@deitch deitch merged commit 999110c into linuxkit:master Aug 13, 2025
22 checks passed
@deitch deitch deleted the dynamic-calculated-build-args branch August 13, 2025 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant