-
Notifications
You must be signed in to change notification settings - Fork 25
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 support for allowing network access during build #420
Conversation
spec.go
Outdated
@@ -401,6 +401,11 @@ type ArtifactBuild struct { | |||
Steps []BuildStep `yaml:"steps" json:"steps" jsonschema:"required"` | |||
// Env is the list of environment variables to set for all commands in this step group. | |||
Env map[string]string `yaml:"env,omitempty" json:"env,omitempty"` | |||
|
|||
// NetworkMode sets the network mode to use during the build phase. | |||
// Accepted values: none, sandboxed |
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.
// Accepted values: none, sandboxed | |
// Accepted values: none, sandbox |
func testBuildNetworkMode(ctx context.Context, t *testing.T, cfg targetConfig) { | ||
type testCase struct { | ||
mode string | ||
canHazInternetz bool // :) |
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.
😹
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.
minor comment, otherwise LGTM
8f516fd
to
2a81986
Compare
2a81986
to
8f5af16
Compare
Adds a field `network_mode`. The value of this field can be any of: - Unset - "none" - Disable networking (default) - "sandbox" - Networking enabled with its own network namespace Buildkit supports `host` mode as well, but I have opted to not support that here for now. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
8f5af16
to
af5bc8a
Compare
Adds a field
network_mode
. The value of this field can be any of:Buildkit supports
host
mode as well, but I have opted to not support that here for now.