publisher

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2020 License: AGPL-3.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Dockerfile = "Dockerfile"
)
View Source
const PublishConfigFileName = "Buildpackfile.publish"

Variables

This section is empty.

Functions

func DisplayDockerLog

func DisplayDockerLog(w io.Writer, in io.Reader) error

func Publish

func Publish(ctx context.Context, w io.Writer, images []string, username, password string, client common.DockerClient) error

func PublishImage

func PublishImage(ctx context.Context, w io.Writer, image, username, password string, client common.DockerClient) error

func SetRepoManager

func SetRepoManager(rm RepoManager)

Types

type ArtifactoryMvn

type ArtifactoryMvn struct {
	ArtifactoryPublisher
}

type ArtifactoryPackage

type ArtifactoryPackage struct {
	Source   string
	Endpoint string
	Md5      string
	Username string
	Password string
}

type ArtifactoryPublisher

type ArtifactoryPublisher struct {
	PreparePackage
}

func (ArtifactoryPublisher) PostPublish

func (n ArtifactoryPublisher) PostPublish(ctx PublishContext) error

func (ArtifactoryPublisher) PrePublish

func (n ArtifactoryPublisher) PrePublish(ctx PublishContext) error

func (ArtifactoryPublisher) Publish

func (n ArtifactoryPublisher) Publish(ctx PublishContext) error

type ArtifactorySql

type ArtifactorySql struct {
	ArtifactoryPublisher
}

type Config

type Config struct {
	Publisher  string `yaml:"publisher,omitempty"`
	Repository string `yaml:"repository,omitempty"`
}

func ReadConfig

func ReadConfig(moduleDir string) (c Config, err error)

type DockerConfig

type DockerConfig struct {
	Config
	Tag        string   `yaml:"tag,omitempty"`
	Registries []string `yaml:"registries,omitempty"`
}

func ReadDockerConfig

func ReadDockerConfig(moduleDir string) (c DockerConfig, err error)

type DockerPublisher

type DockerPublisher struct {
	PrepareImage
}

func (DockerPublisher) PostPublish

func (n DockerPublisher) PostPublish(ctx PublishContext) error

func (DockerPublisher) PrePublish

func (n DockerPublisher) PrePublish(ctx PublishContext) error

func (DockerPublisher) Publish

func (n DockerPublisher) Publish(ctx PublishContext) error

type DockerSql

type DockerSql struct {
	DockerPublisher
}

type DummyPublisher

type DummyPublisher struct {
}

func (DummyPublisher) PostPublish

func (n DummyPublisher) PostPublish(ctx PublishContext) error

func (DummyPublisher) PrePublish

func (n DummyPublisher) PrePublish(ctx PublishContext) error

func (DummyPublisher) Publish

func (n DummyPublisher) Publish(ctx PublishContext) error

type Interface

type Interface interface {
	PrePublish(ctx PublishContext) error
	Publish(ctx PublishContext) error
	PostPublish(ctx PublishContext) error
}

func GetPublisher

func GetPublisher(name string) (Interface, error)

type PrepareImage

type PrepareImage func(ctx PublishContext, client common.DockerClient) ([]string, error)

type PreparePackage

type PreparePackage func(ctx PublishContext) ([]ArtifactoryPackage, error)

type PublishContext

type PublishContext struct {
	Name      string
	Path      string
	WorkDir   string
	OutputDir string
	RepoName  string
	Version   string
	IsStable  bool
	LogWriter io.Writer
	Ctx       context.Context
}

type RepoChannel

type RepoChannel struct {
	Address  string
	NoAuth   bool
	Username string
	Password string
}

func PickChannel

func PickChannel(name string, stable bool) (rc RepoChannel, err error)

func PickChannelByAddress

func PickChannelByAddress(address string, stable bool) (rc RepoChannel, err error)

type RepoManager

type RepoManager struct {
	Repos map[string]Repository
}

type Repository

type Repository struct {
	Name     string
	Stable   *RepoChannel
	Unstable *RepoChannel
}

func PickOne

func PickOne(name string) (r Repository, err error)

Jump to

Keyboard shortcuts

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