workflow

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DockerBuildTaskName      = "docker-build"
	DockerRunVersionTaskName = "docker-run-version"
	DockerRunHelpTaskName    = "docker-run-help"

	DockerLoginTaskName      = "docker-login"
	DockerTagTaskName        = "docker-tag"
	DockerTagLatestTaskName  = "docker-tag-latest"
	DockerPushShaTaskName    = "docker-push-sha"
	DockerPushTagTaskName    = "docker-push-tag"
	DockerPushLatestTaskName = "docker-push-latest"
	DockerPullTaskName       = "docker-pull"

	// DockerImageRefFmt is the format string used to compute the reference of the
	// Docker image used to build and push. It may look something like this.
	//
	//     quay.io/giantswarm/architect:e8363ac222255e991c126abe6673cd0f33934ac8
	//
	DockerImageRefFmt    = "%s/%s/%s:%s"
	LatestDockerImageTag = "latest"
)
View Source
const (
	HelmImage = "quay.io/giantswarm/docker-helm:23ac1ca6527bb59e07a6a8c36809488e39dd5791"
)
View Source
const (
	RepoCheckTaskName = "repo-check"
)

Variables

View Source
var (
	GoPullTaskName       = "go-pull"
	GoFmtTaskName        = "go-fmt"
	GoVetTaskName        = "go-vet"
	GoTestTaskName       = "go-test"
	GoBuildTaskName      = "go-build"
	GoConcurrentTaskName = "go-concurrent"
)
View Source
var (
	HelmPullTaskName          = "helm-pull"
	HelmLoginTaskName         = "helm-login"
	HelmPushTaskName          = "helm-push"
	HelmDeleteChannelTaskName = "helm-delete-channel"
)

Functions

func IsDecodeCert

func IsDecodeCert(err error) bool

IsDecodeCert asserts decodeCertError

func IsEmptyChannel

func IsEmptyChannel(err error) bool

IsEmptyChannel asserts emptyChannelError

func IsEmptyDockerPassword

func IsEmptyDockerPassword(err error) bool

IsEmptyDockerPassword asserts emptyDockerPasswordError

func IsEmptyDockerUsername

func IsEmptyDockerUsername(err error) bool

IsEmptyDockerUsername asserts emptyDockerUsernameError

func IsEmptyGoarch

func IsEmptyGoarch(err error) bool

IsEmptyGoarch asserts emptyGoarchError

func IsEmptyGolangImage

func IsEmptyGolangImage(err error) bool

IsEmptyGolangImage asserts emptyGolangImageError

func IsEmptyGolangVersion

func IsEmptyGolangVersion(err error) bool

IsEmptyGolangVersion asserts emptyGolangVersionError

func IsEmptyGoos

func IsEmptyGoos(err error) bool

IsEmptyGoos asserts emptyGoosError

func IsEmptyKubectlVersion

func IsEmptyKubectlVersion(err error) bool

IsEmptyKubectlVersion asserts emptyKubectlVersionError

func IsEmptyKubernetesAPIServer

func IsEmptyKubernetesAPIServer(err error) bool

IsEmptyKubernetesAPIServer asserts emptyKubernetesAPIServerError

func IsEmptyKubernetesCAPath

func IsEmptyKubernetesCAPath(err error) bool

IsEmptyKubernetesCAPath asserts emptyKubernetesKeyPathError

func IsEmptyKubernetesCaPath

func IsEmptyKubernetesCaPath(err error) bool

IsEmptyKubernetesCaPath asserts emptyKubernetesCaPathError

func IsEmptyKubernetesCrtPath

func IsEmptyKubernetesCrtPath(err error) bool

IsEmptyKubernetesCrtPath asserts emptyKubernetesCAPathError

func IsEmptyOrganisation

func IsEmptyOrganisation(err error) bool

IsEmptyOrganisation asserts emptyOrganisationError

func IsEmptyProject

func IsEmptyProject(err error) bool

IsEmptyProject asserts emptyProjectError

func IsEmptyRef

func IsEmptyRef(err error) bool

IsEmptyRef asserts emptyRefError

func IsEmptyRegistry

func IsEmptyRegistry(err error) bool

IsEmptyRegistry asserts emptyRegistryError

func IsEmptySha

func IsEmptySha(err error) bool

IsEmptySha asserts emptyShaError

func IsEmptyWorkingDirectory

func IsEmptyWorkingDirectory(err error) bool

IsEmptyWorkingDirectory asserts emptyWorkingDirectoryError

func IsIncorrectNumberCerts

func IsIncorrectNumberCerts(err error) bool

IsIncorrectNumberCerts asserts incorrectNumberCertsError

func IsInvalidHelmDirectory

func IsInvalidHelmDirectory(err error) bool

IsInvalidHelmDirectory asserts invalidHelmDirectoryError.

func IsMissingFileError

func IsMissingFileError(err error) bool

IsMissingFileError asserts missingFileError.

func IsNoCertEnvVar

func IsNoCertEnvVar(err error) bool

IsNoCertEnvVar asserts noCertEnvVarError

func IsNoHelmDirectory

func IsNoHelmDirectory(err error) bool

IsNoHelmDirectory asserts noHelmDirectoryError

func IsWriteCert

func IsWriteCert(err error) bool

IsWriteCert asserts writeCertError

func NewDockerBuildTask

func NewDockerBuildTask(fs afero.Fs, projectInfo ProjectInfo) (tasks.Task, error)

func NewDockerLoginTask

func NewDockerLoginTask(fs afero.Fs, projectInfo ProjectInfo) (tasks.Task, error)

func NewDockerPullTask

func NewDockerPullTask(fs afero.Fs, projectInfo ProjectInfo) (tasks.Task, error)

func NewDockerPushLatestTask

func NewDockerPushLatestTask(fs afero.Fs, projectInfo ProjectInfo) (tasks.Task, error)

func NewDockerPushShaTask

func NewDockerPushShaTask(fs afero.Fs, projectInfo ProjectInfo) (tasks.Task, error)

func NewDockerPushTagTask

func NewDockerPushTagTask(fs afero.Fs, projectInfo ProjectInfo) (tasks.Task, error)

func NewDockerRunHelpTask

func NewDockerRunHelpTask(fs afero.Fs, projectInfo ProjectInfo) (tasks.Task, error)

func NewDockerRunVersionTask

func NewDockerRunVersionTask(fs afero.Fs, projectInfo ProjectInfo) (tasks.Task, error)

func NewDockerTagLatestTask

func NewDockerTagLatestTask(fs afero.Fs, projectInfo ProjectInfo) (tasks.Task, error)

func NewDockerTagTask

func NewDockerTagTask(fs afero.Fs, projectInfo ProjectInfo) (tasks.Task, error)

func NewGoBuildTask

func NewGoBuildTask(fs afero.Fs, projectInfo ProjectInfo) (tasks.Task, error)

func NewGoFmtTask

func NewGoFmtTask(fs afero.Fs, projectInfo ProjectInfo) (tasks.Task, error)

func NewGoPullTask

func NewGoPullTask(fs afero.Fs, projectInfo ProjectInfo) (tasks.Task, error)

func NewGoTestTask

func NewGoTestTask(fs afero.Fs, projectInfo ProjectInfo) (tasks.Task, error)

func NewGoVetTask

func NewGoVetTask(fs afero.Fs, projectInfo ProjectInfo) (tasks.Task, error)

func NewHelmDeleteFromChannelTask

func NewHelmDeleteFromChannelTask(fs afero.Fs, chartDir string, projectInfo ProjectInfo, channel string) (tasks.Task, error)

func NewHelmLoginTask

func NewHelmLoginTask(fs afero.Fs, projectInfo ProjectInfo) (tasks.Task, error)

func NewHelmPromoteToChannelTask

func NewHelmPromoteToChannelTask(fs afero.Fs, chartDir string, projectInfo ProjectInfo, channel string) (tasks.Task, error)

func NewHelmPromoteToStableChannelTask

func NewHelmPromoteToStableChannelTask(fs afero.Fs, chartDir string, projectInfo ProjectInfo) (tasks.Task, error)

func NewHelmPullTask

func NewHelmPullTask(fs afero.Fs, projectInfo ProjectInfo) (tasks.Task, error)

func NewHelmPushTask

func NewHelmPushTask(fs afero.Fs, chartDir string, projectInfo ProjectInfo) (tasks.Task, error)

func NewPackageHelmChartTaskCreator

func NewPackageHelmChartTaskCreator(dst string) func(afero.Fs, string, ProjectInfo) (tasks.Task, error)

NewPackageHelmChartTaskCreator returns a closure with pre-defined dst directory.

This is usefull when used with processHelmDir.

func NewReleaseGithubTask

func NewReleaseGithubTask(client *github.Client, dir string, projectInfo ProjectInfo) (tasks.Task, error)

func NewTemplateHelmChartTask

func NewTemplateHelmChartTask(fs afero.Fs, chartDir string, projectInfo ProjectInfo) (tasks.Task, error)

Types

type ProjectInfo

type ProjectInfo struct {
	WorkingDirectory string
	Organisation     string
	Project          string

	BuildTimestamp time.Time

	Branch string
	Sha    string
	Tag    string

	Version string

	Registry       string
	DockerUsername string
	DockerPassword string

	HelmDirectoryPath string

	Goos          string
	Goarch        string
	GolangImage   string
	GolangVersion string

	Channels []string
}

type RepoCheckTask

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

func NewRepoCheckTask

func NewRepoCheckTask(fs afero.Fs, projectInfo ProjectInfo) (RepoCheckTask, error)

func (RepoCheckTask) Name

func (t RepoCheckTask) Name() string

func (RepoCheckTask) Run

func (t RepoCheckTask) Run() error

func (RepoCheckTask) String

func (t RepoCheckTask) String() string

type Workflow

type Workflow []tasks.Task

func NewBuild

func NewBuild(projectInfo ProjectInfo, fs afero.Fs) (Workflow, error)

func NewDeploy

func NewDeploy(projectInfo ProjectInfo, fs afero.Fs) (Workflow, error)

func NewPublish

func NewPublish(projectInfo ProjectInfo, fs afero.Fs) (Workflow, error)

func NewRelease

func NewRelease(projectInfo ProjectInfo, fs afero.Fs, releaseDir string, githubClient *github.Client) (Workflow, error)

func NewUnpublish

func NewUnpublish(projectInfo ProjectInfo, fs afero.Fs) (Workflow, error)

func (Workflow) String

func (w Workflow) String() string

Jump to

Keyboard shortcuts

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