Documentation
¶
Index ¶
- Variables
- func WithHostNetworking(trc *TestRunnerConfig)
- func WithProxyNetwork(trc *TestRunnerConfig)
- type BuildxEnv
- func (b *BuildxEnv) Buildkit(ctx context.Context) (*client.Client, error)
- func (b *BuildxEnv) Close() error
- func (b *BuildxEnv) Load(ctx context.Context, id string, f gwclient.BuildFunc) error
- func (b *BuildxEnv) RunTest(ctx context.Context, t *testing.T, f TestFunc, opts ...TestRunnerOpt)
- func (b *BuildxEnv) WithBuilder(builder string) *BuildxEnv
- type FrontendSpec
- type SolveOpt
- type SolveStatus
- type TestFunc
- type TestRunnerConfig
- type TestRunnerOpt
- func WithOCIStore(id string, store content.Store) TestRunnerOpt
- func WithSSHSocket(id, addr string) TestRunnerOpt
- func WithSecrets(k, v string) TestRunnerOpt
- func WithSocketProxies(proxies ...socketprovider.ProxyConfig) TestRunnerOpt
- func WithSolveStatusFn(f func(*SolveStatus)) TestRunnerOpt
- func WithSourcePolicy(pol *spb.Policy) TestRunnerOpt
Constants ¶
This section is empty.
Variables ¶
var InlineBuildOutput bool
Functions ¶
func WithHostNetworking ¶
func WithHostNetworking(trc *TestRunnerConfig)
func WithProxyNetwork ¶ added in v0.22.0
func WithProxyNetwork(trc *TestRunnerConfig)
Types ¶
type BuildxEnv ¶
type BuildxEnv struct {
// contains filtered or unexported fields
}
func (*BuildxEnv) Close ¶ added in v0.21.0
Close closes the underlying buildkit client connection, which triggers cleanup of the dial-stdio process.
func (*BuildxEnv) Load ¶
Load loads the output of the specified gwclient.BuildFunc into the buildkit instance.
func (*BuildxEnv) WithBuilder ¶
type FrontendSpec ¶
type SolveStatus ¶
type SolveStatus = client.SolveStatus
SolveStatus is convenience wrapper for client.SolveStatus to help disambiguate imports of the client package.
type TestRunnerConfig ¶
type TestRunnerConfig struct {
// SolveStatusFn replaces the builtin status logger with a custom implementation.
// This is useful particularly if you need to inspect the solve statuses.
SolveStatusFn func(*client.SolveStatus)
SolveOptFns []func(*client.SolveOpt)
// SocketProxies is the list of sockets that need to be forwarded into the build.
SocketProxies []socketprovider.ProxyConfig
}
type TestRunnerOpt ¶
type TestRunnerOpt func(*TestRunnerConfig)
func WithOCIStore ¶ added in v0.22.0
func WithOCIStore(id string, store content.Store) TestRunnerOpt
WithOCIStore registers an OCI layout content store with the build session under the provided id. The store can then be referenced from a build context using an "oci-layout:<id>@<digest>" value, allowing platform-specific manifest selection from a multi-platform index without needing a registry.
func WithSSHSocket ¶
func WithSSHSocket(id, addr string) TestRunnerOpt
func WithSecrets ¶
func WithSecrets(k, v string) TestRunnerOpt
func WithSocketProxies ¶
func WithSocketProxies(proxies ...socketprovider.ProxyConfig) TestRunnerOpt
func WithSolveStatusFn ¶
func WithSolveStatusFn(f func(*SolveStatus)) TestRunnerOpt
func WithSourcePolicy ¶ added in v0.22.0
func WithSourcePolicy(pol *spb.Policy) TestRunnerOpt
WithSourcePolicy merges the given source policy rules into the build's source policy. Rules are appended to any policy already configured (e.g. via the EXPERIMENTAL_BUILDKIT_SOURCE_POLICY environment variable).