-
Notifications
You must be signed in to change notification settings - Fork 288
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
pack buildpack new
should accept --targets
#1918
Comments
/assign |
Lines 55 to 59 in 3a994bd
ArchVariant & Distros &Distribution having similar type as Distro but where a distro has type with single version with name & where Distribution has a single name with array of versionsif this is the type i need to work with should i make changes to the existing Target type ? & what about ArchVarient
|
@natalieparellano need help |
Hi @WYGIN Thank you for working on this! As Natalie mentioned, we have a similar structure in the lifecycle.
is expected from pack side, if you checked this RFC what pack is doing is to create the structure for the |
I started thinking on this for the multi-arch support, but I called the flag I would like to suggest the following format For example: Example 1Basic case for two different architectures pack buildpack new [.. some flags ..]
--targets "linux/amd64" --targets "linux/arm64" Output: [[targets]]
os = "linux"
arch = "amd64"
[[targets]]
os = "linux"
arch = "arm64" Example 2Case for a distribution version, see how you could passthrough the pack buildpack new [.. some flags ..] --targets "windows/amd64:windows-nano@10.0.19041.1415" Output: [[targets]]
os = "windows"
arch = "amd64"
[[targets.distributions]]
name = "windows-nano"
versions = ["10.0.19041.1415"] Example 3Case for all the fields, and two different versions. not sure if we could provide a better UX. pack buildpack new [.. some flags ..] --targets "linux/arm/v6:ubuntu@14.04" --targets "linux/arm/v6:ubuntu@16.04" Output: [[targets]]
os = "linux"
arch = "arm"
variant = "v6"
[[targets.distributions]]
name = "ubuntu"
versions = ["14.04", "16.04"] This proposal is not final, I am just thinking on different use cases and we can define a good UX for it. |
@jjbustamante i am trying to implement it but i have few doubts regarding the format
i am thinking to distros have format |
Hi @WYGIN. Remember the I like your idea of using Assuming the format is defined as Are your doubts about how to allow different combinations of the values in the flag, right?
The [os] and [arch] are defined in the flag or in an existent
I think so, at the end, we need to fill the .toml file with: [[targets]]
os = "<operating system>"
arch = "<system architecture>"
variant = "<architecture variant>"
[[targets.distributions]]
name = "<distribution ID>"
versions = ["<distribution version>"] I do not see how we can fill |
Description
pack buildpack new
accepts--stacks
but stacks are deprecated. It should accept--targets
and print a warning when--stacks
are used.Proposed solution
From
github.com/buildpacks/lifecycle/buildpack
package - the structure of targets is a list ofFor each target, all fields are optional (but at least one should be specified).
Additional context
pack buildpack new
in the docs to include targetsThe text was updated successfully, but these errors were encountered: