Documentation
¶
Index ¶
- Variables
- func CleanupProject(ctx context.Context, projectName string, opts CleanupProjectOptions) error
- func SkipIfUnavailable(mode string)
- type BaseContainerBackend
- type BuildahContainer
- type BuildahInspect
- type BuildahStorageSnapshot
- type CleanupProjectOptions
- type ContainerBackend
- type DockerBackend
- func (r *DockerBackend) Exec(ctx context.Context, containerName string, cmds ...string)
- func (r *DockerBackend) ExpectCmdsToSucceed(ctx context.Context, image string, cmds ...string)
- func (r *DockerBackend) GetImageInspect(ctx context.Context, image string) DockerImageInspect
- func (r *DockerBackend) Pull(ctx context.Context, image string)
- func (r *DockerBackend) Rm(ctx context.Context, containerName string)
- func (r *DockerBackend) RunSleepingContainer(ctx context.Context, containerName, image string)
- type DockerImageInspect
- type DockerInspect
- type NativeBuildahBackend
- func (r *NativeBuildahBackend) Exec(ctx context.Context, containerName string, cmds ...string)
- func (r *NativeBuildahBackend) ExpectCmdsToSucceed(ctx context.Context, image string, cmds ...string)
- func (r *NativeBuildahBackend) GetImageInspect(ctx context.Context, image string) DockerImageInspect
- func (r *NativeBuildahBackend) Pull(ctx context.Context, image string)
- func (r *NativeBuildahBackend) Rm(ctx context.Context, containerName string)
- func (r *NativeBuildahBackend) RmiByRepoRef(ctx context.Context, repoRef string)
- func (r *NativeBuildahBackend) RunSleepingContainer(ctx context.Context, containerName, image string)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CleanupProject ¶ added in v3.7.2
func CleanupProject(ctx context.Context, projectName string, opts CleanupProjectOptions) error
func SkipIfUnavailable ¶
func SkipIfUnavailable(mode string)
SkipIfUnavailable skips the current spec when the backend it needs is not available on this host, for specs that never touch the backend directly.
Types ¶
type BaseContainerBackend ¶
type BaseContainerBackend struct {
CommonCliArgs []string
Isolation thirdparty.Isolation
}
type BuildahContainer ¶ added in v3.13.0
type BuildahInspect ¶
type BuildahStorageSnapshot ¶ added in v3.13.0
type BuildahStorageSnapshot struct {
ProjectImageIDs []string
Containers []BuildahContainer
}
BuildahStorageSnapshot is what the Buildah storage werf builds into holds for a test project: the images labeled with the project and every container in the storage, whichever build created it.
func SnapshotBuildahStorage ¶ added in v3.13.0
func SnapshotBuildahStorage(ctx context.Context, projectName string) (BuildahStorageSnapshot, error)
SnapshotBuildahStorage reads the storage in-process, so it sees the containers werf created regardless of the buildah CLI version installed on the host.
type CleanupProjectOptions ¶ added in v3.7.2
type ContainerBackend ¶
type ContainerBackend interface {
Pull(ctx context.Context, image string)
Exec(ctx context.Context, containerName string, cmds ...string)
Rm(ctx context.Context, containerName string)
RunSleepingContainer(ctx context.Context, containerName, image string)
GetImageInspect(ctx context.Context, image string) DockerImageInspect
ExpectCmdsToSucceed(ctx context.Context, image string, cmds ...string)
}
func NewContainerBackend ¶
func NewContainerBackend(mode string) ContainerBackend
NewContainerBackend skips the current spec when the requested backend is not available on this host.
func NewDockerBackend ¶
func NewDockerBackend() ContainerBackend
func NewNativeBuildahBackend ¶
func NewNativeBuildahBackend(isolation thirdparty.Isolation, storageDriver buildah.StorageDriver) ContainerBackend
type DockerBackend ¶
type DockerBackend struct {
BaseContainerBackend
}
func (*DockerBackend) Exec ¶
func (r *DockerBackend) Exec(ctx context.Context, containerName string, cmds ...string)
func (*DockerBackend) ExpectCmdsToSucceed ¶
func (r *DockerBackend) ExpectCmdsToSucceed(ctx context.Context, image string, cmds ...string)
func (*DockerBackend) GetImageInspect ¶
func (r *DockerBackend) GetImageInspect(ctx context.Context, image string) DockerImageInspect
func (*DockerBackend) RunSleepingContainer ¶
func (r *DockerBackend) RunSleepingContainer(ctx context.Context, containerName, image string)
type DockerImageInspect ¶
type DockerInspect ¶
type DockerInspect []DockerImageInspect
type NativeBuildahBackend ¶
type NativeBuildahBackend struct {
BaseContainerBackend
}
func (*NativeBuildahBackend) Exec ¶
func (r *NativeBuildahBackend) Exec(ctx context.Context, containerName string, cmds ...string)
func (*NativeBuildahBackend) ExpectCmdsToSucceed ¶
func (r *NativeBuildahBackend) ExpectCmdsToSucceed(ctx context.Context, image string, cmds ...string)
func (*NativeBuildahBackend) GetImageInspect ¶
func (r *NativeBuildahBackend) GetImageInspect(ctx context.Context, image string) DockerImageInspect
func (*NativeBuildahBackend) Pull ¶
func (r *NativeBuildahBackend) Pull(ctx context.Context, image string)
func (*NativeBuildahBackend) Rm ¶
func (r *NativeBuildahBackend) Rm(ctx context.Context, containerName string)
func (*NativeBuildahBackend) RmiByRepoRef ¶
func (r *NativeBuildahBackend) RmiByRepoRef(ctx context.Context, repoRef string)
RmiByRepoRef removes every local image tagged under repoRef from the containers storage.
func (*NativeBuildahBackend) RunSleepingContainer ¶
func (r *NativeBuildahBackend) RunSleepingContainer(ctx context.Context, containerName, image string)