Skip to content
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

Add --network and --add-host to Image #867

Merged
merged 5 commits into from
Jan 29, 2024
Merged

Add --network and --add-host to Image #867

merged 5 commits into from
Jan 29, 2024

Conversation

blampe
Copy link
Contributor

@blampe blampe commented Nov 29, 2023

This adds --network and --add-host options since those are supported by both builders.

(Other requests like #761 will require more thought, since that functionality isn't supported in the v1 API we're using right now.)

Two integration tests are included to ensure the behavior with v1 and v2 builders.

While I was in here I also added platform as an output.

Fixes #837.
Fixes #862.

Copy link

Does the PR have any schema changes?

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Maintainer note: consult the runbook for dealing with any breaking changes.

.gitattributes Outdated Show resolved Hide resolved
Comment on lines 46 to 49
const (
defaultDockerfile = "Dockerfile"
defaultBuilder = "2"
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of the formatting noise here is due to gofumpt (the formatter we use in pu/pu) cleaning things up. I can break this out into a separate change if it's too noisy.

Comment on lines -104 to -115
cache, err := marshalCachedImages(inputs["build"])
if err != nil {
return "", nil, err
}

build.CachedImages = cache
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

marshalBuildAndApplyDefaults now handles marshaling and setting CachedImages.

@blampe blampe merged commit d006c5a into master Jan 29, 2024
17 checks passed
@blampe blampe deleted the 862-837 branch January 29, 2024 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants