repository

package
v1.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package repository provides support for building and pushing images to a repository.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerLoginBuildPusher

type ContainerLoginBuildPusher interface {
	Build(args *exec.BuildArguments) error
	Login(uri, username, password string) error
	Push(uri string, tags ...string) (digest string, err error)
	IsEcrCredentialHelperEnabled(uri string) bool
}

ContainerLoginBuildPusher provides support for logging in to repositories, building images and pushing images to repositories.

type Registry

type Registry interface {
	RepositoryURI(name string) (string, error)
	Auth() (string, string, error)
}

Registry gets information of repositories.

type Repository

type Repository struct {
	// contains filtered or unexported fields
}

Repository builds and pushes images to a repository.

func New

func New(name string, registry Registry) (*Repository, error)

New instantiates a new Repository.

func (*Repository) BuildAndPush

func (r *Repository) BuildAndPush(docker ContainerLoginBuildPusher, args *exec.BuildArguments) (digest string, err error)

BuildAndPush builds the image from Dockerfile and pushes it to the repository with tags.

func (*Repository) URI

func (r *Repository) URI() string

URI returns the uri of the repository.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL