factory

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdditionalImageNames

func AdditionalImageNames(manifest Manifest) []string

func Build

func Build(folderPath string, manifest Manifest, gitSha1 string, output io.Writer) (string, error)

func GitChangedFolders

func GitChangedFolders(repoPath string, currentSha string, previousSha string) ([]string, error)

func GitGetCurrentSha1 added in v0.0.3

func GitGetCurrentSha1(repoPath string) (string, error)

func ImageExists

func ImageExists(manifest Manifest) (bool, error)

func ImageName

func ImageName(manifest Manifest) string

func Push

func Push(image string, additionalTags []string, output io.Writer) error

func PushImage

func PushImage(image string, output io.Writer) error

func TagImage

func TagImage(image string, tag string, output io.Writer) error

Types

type DockerConfig

type DockerConfig struct {
	Credentials       map[string]*DockerConfigAuth `json:"auths"`
	DefaultCredHelper string                       `json:"credsStore"`
	CredHelpers       map[string]string            `json:"credHelpers"`
}

type DockerConfigAuth

type DockerConfigAuth struct {
	Auth string `json:"auth"`
}

type Manifest

type Manifest struct {
	Registry       string
	Name           string
	Tag            string
	AdditionalTags []string `yaml:"additionalTags"`
}

func ReadManifest

func ReadManifest(repoPath string, directory string) (Manifest, error)

type RegistryAuthResponse

type RegistryAuthResponse struct {
	Token     string
	ExpiresIn int    `json:"expires_in"`
	IssuedAt  string `json:"issued_at"`
}

type RegistryCredentials

type RegistryCredentials struct {
	ServerURL string
	Username  string
	Secret    string
}

func GetRegistryCredentials

func GetRegistryCredentials(registry string) (*RegistryCredentials, error)

type RegistryResponse

type RegistryResponse struct {
	StatusCode int
	Body       []byte
}

Jump to

Keyboard shortcuts

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