Documentation ¶
Index ¶
- Variables
- func AddTag(src, target string) error
- func CreateDockerTarContext(ctx context.Context, w io.Writer, workspace string, a *latest.DockerArtifact) error
- func GetBuildArgs(a *latest.DockerArtifact) []string
- func GetDependencies(ctx context.Context, workspace string, dockerfilePath string, ...) ([]string, error)
- func NormalizeDockerfilePath(context, dockerfile string) (string, error)
- func RemoteDigest(identifier string) (string, error)
- func RetrieveRemoteConfig(identifier string) (*v1.ConfigFile, error)
- func ValidateDockerfile(path string) bool
- type AuthConfigHelper
- type BuildResult
- type ImageReference
- type LocalDaemon
- type PushResult
Constants ¶
This section is empty.
Variables ¶
var RetrieveImage = retrieveImage
RetrieveImage is overridden for unit testing
Functions ¶
func CreateDockerTarContext ¶
func GetBuildArgs ¶ added in v0.11.0
func GetBuildArgs(a *latest.DockerArtifact) []string
GetBuildArgs gives the build args flags for docker build.
func GetDependencies ¶ added in v0.7.0
func GetDependencies(ctx context.Context, workspace string, dockerfilePath string, buildArgs map[string]*string) ([]string, error)
GetDependencies finds the sources dependencies for the given docker artifact. All paths are relative to the workspace.
func NormalizeDockerfilePath ¶ added in v0.11.0
NormalizeDockerfilePath returns the absolute path to the dockerfile.
func RemoteDigest ¶ added in v0.5.0
func RetrieveRemoteConfig ¶ added in v0.24.0
func RetrieveRemoteConfig(identifier string) (*v1.ConfigFile, error)
RetrieveRemoteConfig retrieves the remote config file for an image
func ValidateDockerfile ¶ added in v0.14.0
Types ¶
type AuthConfigHelper ¶
type AuthConfigHelper interface { GetAuthConfig(registry string) (types.AuthConfig, error) GetAllAuthConfigs() (map[string]types.AuthConfig, error) }
AuthConfigHelper exists for testing purposes since GetAuthConfig shells out to native store helpers. Ideally this shouldn't be public, but the LocalBuilder needs to use it.
var ( // DefaultAuthHelper is exposed so that other packages can override it for testing DefaultAuthHelper AuthConfigHelper )
type BuildResult ¶ added in v0.21.0
type BuildResult struct {
ID string
}
BuildResult gives the information on an image that has been built.
type ImageReference ¶ added in v0.7.0
ImageReference is a parsed image name.
func ParseReference ¶ added in v0.7.0
func ParseReference(image string) (*ImageReference, error)
ParseReference parses an image name to a reference.
type LocalDaemon ¶ added in v0.21.0
type LocalDaemon interface { Close() error ExtraEnv() []string ServerVersion(ctx context.Context) (types.Version, error) ConfigFile(ctx context.Context, image string) (*v1.ConfigFile, error) Build(ctx context.Context, out io.Writer, workspace string, a *latest.DockerArtifact, ref string) (string, error) Push(ctx context.Context, out io.Writer, ref string) (string, error) Pull(ctx context.Context, out io.Writer, ref string) error Load(ctx context.Context, out io.Writer, input io.Reader, ref string) (string, error) Tag(ctx context.Context, image, ref string) error ImageID(ctx context.Context, ref string) (string, error) RepoDigest(ctx context.Context, ref string) (string, error) ImageList(ctx context.Context, options types.ImageListOptions) ([]types.ImageSummary, error) ImageExists(ctx context.Context, ref string) bool }
LocalDaemon talks to a local Docker API.
func NewAPIClient ¶ added in v0.8.0
func NewAPIClient() (LocalDaemon, error)
NewAPIClient guesses the docker client to use based on current kubernetes context.
func NewLocalDaemon ¶ added in v0.21.0
func NewLocalDaemon(apiClient client.CommonAPIClient, extraEnv []string) LocalDaemon
NewLocalDaemon creates a new LocalDaemon.
type PushResult ¶ added in v0.21.0
type PushResult struct {
Digest string
}
PushResult gives the information on an image that has been pushed.