feat: add generic BuildArgs for BuildpackArtifact#9745
Conversation
b505750 to
e2be8b7
Compare
e2be8b7 to
27840b2
Compare
27840b2 to
1b289df
Compare
|
@Darien-Lin @katiexzhang @menahyouyeah I generate a new schema version and added by schema changes for the buildpack build |
|
Would it be possible to split this into 2 commits - one with all the schema related changes and another with the logic changes to make it easier to review? |
| // Volumes support mounting host volumes into the container. | ||
| Volumes []*BuildpackVolume `yaml:"volumes,omitempty"` | ||
|
|
||
| // Network is the network to use for the build. |
There was a problem hiding this comment.
Instead of adding just the Network arg can you do something similar to #9696. Basically a BuildArgs []string or something along those lines so that in the future if people wanted to pass additional args there wouldn't need to be any additional logic or schema change.
There was a problem hiding this comment.
@menahyouyeah I implemented your suggestion with general BuildArgs property. Please re-review when you get a second
295ee9c to
c26c781
Compare
8f11f57 to
8040e64
Compare
|
@Darien-Lin @katiexzhang @menahyouyeah could you please re-review when you get a chance? Thank you |
|
Generally the maintainers of this Github is responsible for bumping up schema changes as there is a process to follow. Can you revert the schema changes and just have the new flags? |
8040e64 to
fc3e326
Compare
|
@Darien-Lin I removed schema changes. Thank you |
@Darien-Lin just fyi, the DEVELOPMENT.md instructs to generate a new schema version and commit. I'm unable to build the binary if I don't generate the schema. ➜ make
GOOS=darwin GOARCH=arm64 CGO_ENABLED=1 \
go build -mod="vendor" -gcflags="all=-N -l" -tags "timetzdata release " -ldflags "-X github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/version.version=v2.14.0-56-gfc3e3263e -X github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/version.buildDate=2026-04-22T11:18:36Z -X github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/version.gitCommit=fc3e3263e34a617bf5336915b1550355e5c19e2d -s -w " -o out/skaffold github.com/GoogleContainerTools/skaffold/v2/cmd/skaffold
# github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/build/gcb
pkg/skaffold/build/gcb/buildpacks.go:51:31: artifact.BuildArgs undefined (type *"github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/schema/latest".BuildpackArtifact has no field or method BuildArgs)
make: *** [out/skaffold] Error 1Are those docs intended for Maintainers? Should I update with a note that it's for maintainer only? |
I am attempting to make the cut here: #10059 |
|
I have made the cut, so feel free to rebase and add the new fields |
Darien-Lin
left a comment
There was a problem hiding this comment.
The config struct needs to be updated to have these new fields
Added generic BuildArgs []string field on BuildpackArtifact. This allows users to pass any additional args to `pack build` (e.g. --network, --cache-image) without requiring future schema changes. Signed-off-by: Bogdan Nazarenko <bogdan.nazarenko@outlook.com>
dcd07a3 to
1df724c
Compare
yep, thank you @Darien-Lin. I rebased and updated the structure. |
|
@Darien-Lin looks like the same failed integrations tests as from the other PRs. |
|
@Darien-Lin thanks for your help |
…ls#9745) feat: add generic BuildArgs on BuildpackArtifact Added generic BuildArgs []string field on BuildpackArtifact. This allows users to pass any additional args to `pack build` (e.g. --network, --cache-image) without requiring future schema changes. Signed-off-by: Bogdan Nazarenko <bogdan.nazarenko@outlook.com>
Fixes: #9744
Related: N/A
Merge before/after: N/A
Description
Adding generic BuildArgs []string field on BuildpackArtifact. This allows users to pass any additional args to
pack build(e.g. --network, --cache-image) without requiring future schema changes.Example problem: GCP CloudBuild application default credentials are only available on docker network "cloudbuild," hence we need to specify that network for build pack to access that network for proper workload identity authentication for access to things such as Artifact Registries.
User facing changes (remove if N/A)
Addition property available to set on buildpack image build configurations.