Documentation ¶
Index ¶
- Variables
- func AddTag(src, target string) error
- func BuildArtifact(ctx context.Context, out io.Writer, cli APIClient, workspace string, ...) error
- func CreateDockerTarContext(w io.Writer, workspace string, a *v1alpha2.DockerArtifact) error
- func CreateDockerTarGzContext(w io.Writer, workspace string, a *v1alpha2.DockerArtifact) error
- func Digest(ctx context.Context, cli APIClient, ref string) (string, error)
- func GetBuildArgs(a *v1alpha2.DockerArtifact) []string
- func GetDependencies(workspace string, a *v1alpha2.DockerArtifact) ([]string, error)
- func NormalizeDockerfilePath(context, dockerfile string) (string, error)
- func RemoteDigest(identifier string) (string, error)
- func RunPush(ctx context.Context, cli APIClient, ref string, out io.Writer) error
- func StreamDockerMessages(dst io.Writer, src io.Reader) error
- func UploadContextToGCS(ctx context.Context, workspace string, a *v1alpha2.DockerArtifact, ...) error
- type APIClient
- type AuthConfigHelper
- type ImageReference
Constants ¶
This section is empty.
Variables ¶
var RetrieveImage = retrieveImage
RetrieveImage is overridden for unit testing
Functions ¶
func BuildArtifact ¶ added in v0.11.0
func BuildArtifact(ctx context.Context, out io.Writer, cli APIClient, workspace string, a *v1alpha2.DockerArtifact, initialTag string) error
BuildArtifact performs a docker build and returns nothing
func CreateDockerTarContext ¶
func CreateDockerTarGzContext ¶ added in v0.4.0
func Digest ¶
Digest returns the image digest for a corresponding reference. The digest is of the form sha256:<image_id>
func GetBuildArgs ¶ added in v0.11.0
func GetBuildArgs(a *v1alpha2.DockerArtifact) []string
GetBuildArgs gives the build args flags for docker build.
func GetDependencies ¶ added in v0.7.0
func GetDependencies(workspace string, a *v1alpha2.DockerArtifact) ([]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 StreamDockerMessages ¶ added in v0.6.0
StreamDockerMessages streams formatted json output from the docker daemon TODO(@r2d4): Make this output much better, this is the bare minimum
func UploadContextToGCS ¶ added in v0.5.0
Types ¶
type APIClient ¶ added in v0.8.0
type APIClient interface { client.CommonAPIClient }
func NewAPIClient ¶ added in v0.8.0
NewAPIClient guesses the docker client to use based on current kubernetes context.
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 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.