orchestrators

package
v0.39.3 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const KptImage = "gcr.io/kpt-dev/kpt:latest"

Variables

This section is empty.

Functions

This section is empty.

Types

type CircleCI added in v0.32.0

type CircleCI struct {
	Version   string                       `yaml:",omitempty"`
	Orbs      map[string]*CircleCIOrb      `yaml:",omitempty"`
	Workflows map[string]*CircleCIWorkflow `yaml:",omitempty"`
}

CircleCI represents a config file for CircleCI pipelines.

func (*CircleCI) Generate added in v0.32.0

func (p *CircleCI) Generate() (out []byte, err error)

func (*CircleCI) Init added in v0.32.0

func (p *CircleCI) Init(config *types.PipelineConfig) Pipeline

type CircleCICommand added in v0.32.0

type CircleCICommand struct {
	Steps []*CircleCICommandStep `yaml:",omitempty"`
}

CircleCICommand represents a multi-step command.

type CircleCICommandStep added in v0.32.0

type CircleCICommandStep struct {
	Run string `yaml:",omitempty"`
}

CircleCICommandStep represents a step in the command steps.

type CircleCIDockerExecutor added in v0.32.0

type CircleCIDockerExecutor struct {
	Image string `yaml:",omitempty"`
}

CircleCIDockerExecutor represents a dicker executor.

type CircleCIExecutor added in v0.32.0

type CircleCIExecutor = map[string][]*CircleCIDockerExecutor

CircleCIExecutor represents an executor which only has one key as its type in the map.

type CircleCIJob added in v0.32.0

type CircleCIJob struct {
	Executor string   `yaml:",omitempty"`
	Steps    []string `yaml:",omitempty"`
}

CircleCIJob wraps a sequence of commands to run and their executor.

type CircleCIOrb added in v0.32.0

type CircleCIOrb struct {
	Executors map[string]*CircleCIExecutor `yaml:",omitempty"`
	Commands  map[string]*CircleCICommand  `yaml:",omitempty"`
	Jobs      map[string]*CircleCIJob      `yaml:",omitempty"`
}

CircleCIOrb represents a reusable orb object that is a collection of executors, commands, and jobs.

func (*CircleCIOrb) Init added in v0.32.0

func (orb *CircleCIOrb) Init(config *CircleCIOrbConfig) *CircleCIOrb

type CircleCIOrbConfig added in v0.32.0

type CircleCIOrbConfig struct {
	*types.PipelineConfig
	ExecutorName string
	CommandName  string
	JobName      string
}

CircleCIOrbConfig allows to customize a CircleCI Orb object.

type CircleCIWorkflow added in v0.32.0

type CircleCIWorkflow struct {
	Jobs []string `yaml:",omitempty"`
}

CircleCIWorkflow defines a sequence of job to execute.

type CloudBuild

type CloudBuild struct {
	Steps []CloudBuildStep `yaml:",omitempty"`
}

CloudBuild is a simplified representation of Cloud Build config. @see https://cloud.google.com/cloud-build/docs/build-config

func (*CloudBuild) Generate

func (p *CloudBuild) Generate() (out []byte, err error)

func (*CloudBuild) Init

func (p *CloudBuild) Init(config *types.PipelineConfig) Pipeline

type CloudBuildStep

type CloudBuildStep struct {
	Name string   `yaml:",omitempty"`
	Args []string `yaml:",omitempty"`
}

type GitHubActionStepArgs

type GitHubActionStepArgs struct {
	Args string `yaml:",omitempty"`
}

type GitHubActions

type GitHubActions struct {
	Name string                          `yaml:",omitempty"`
	On   map[string]GitHubActionsTrigger `yaml:",omitempty"`
	Jobs map[string]GitHubActionsJob     `yaml:",omitempty"`
}

GitHubActions represents a GitHub Actions workflow. @see https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions

func (*GitHubActions) Generate

func (p *GitHubActions) Generate() (out []byte, err error)

func (*GitHubActions) Init

func (p *GitHubActions) Init(config *types.PipelineConfig) Pipeline

type GitHubActionsJob

type GitHubActionsJob struct {
	RunsOn string              `yaml:"runs-on,omitempty"`
	Steps  []GitHubActionsStep `yaml:",omitempty"`
}

type GitHubActionsStep

type GitHubActionsStep struct {
	Name string               `yaml:",omitempty"`
	Uses string               `yaml:",omitempty"`
	With GitHubActionStepArgs `yaml:",omitempty"`
}

type GitHubActionsTrigger

type GitHubActionsTrigger struct {
	Branches []string `yaml:",omitempty"`
}

type GitLabCI

type GitLabCI struct {
	Stages []string `yaml:",omitempty"`
	// @see https://github.com/go-yaml/yaml/issues/63
	GitLabCIStages `yaml:",inline"`
}

GitLabCi is a simplified representation of GitLab CI/CD Configuration. @see https://docs.gitlab.com/ee/ci/yaml/

func (*GitLabCI) Generate

func (p *GitLabCI) Generate() (out []byte, err error)

func (*GitLabCI) Init

func (p *GitLabCI) Init(config *types.PipelineConfig) Pipeline

type GitLabCIStage

type GitLabCIStage struct {
	Stage    string   `yaml:",omitempty"`
	Image    string   `yaml:",omitempty"`
	Services []string `yaml:",omitempty"`
	Script   string   `yaml:",omitempty"`
}

type GitLabCIStages

type GitLabCIStages map[string]GitLabCIStage

type Jenkins added in v0.32.0

type Jenkins struct {
	Stage JenkinsStage
}

Jenkins is a single-stage Jenkinsfile that uses `any` agent.

func (*Jenkins) Generate added in v0.32.0

func (p *Jenkins) Generate() (out []byte, err error)

func (*Jenkins) Init added in v0.32.0

func (p *Jenkins) Init(config *types.PipelineConfig) Pipeline

type JenkinsMultilineScript added in v0.32.0

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

JenkinsMultilineScript represents a multiline script that can be joined using `\`.

func (*JenkinsMultilineScript) Generate added in v0.32.0

func (script *JenkinsMultilineScript) Generate() string

Generate produces a multiline script.

type JenkinsStage added in v0.32.0

type JenkinsStage struct {
	Name    string
	Scripts []string
}

JenkinsStage is a stage of a Jenkinsfile. It consists a series of steps to run.

func (*JenkinsStage) Generate added in v0.32.0

func (stage *JenkinsStage) Generate() (result string, err error)

func (*JenkinsStage) Init added in v0.32.0

func (stage *JenkinsStage) Init(config *types.PipelineConfig) *JenkinsStage

type JenkinsStageStep added in v0.32.0

type JenkinsStageStep struct {
	MountedWorkspace string
	Dir              string
	FnPaths          []string
}

JenkinsStageStep represents a shell script to execute in a stage in a Jenkinsfile.

func (*JenkinsStageStep) Generate added in v0.32.0

func (step *JenkinsStageStep) Generate() string

func (*JenkinsStageStep) Init added in v0.32.0

type Pipeline

type Pipeline interface {
	Init(config *types.PipelineConfig) Pipeline
	Generate() (out []byte, err error)
}

Pipeline is an abstraction of different workflow orchestrators.

type TektonMetadata added in v0.32.0

type TektonMetadata struct {
	Name string `yaml:",omitempty"`
}

TektonMetadata contains metadata to describe a resource object.

type TektonPipeline added in v0.32.0

type TektonPipeline struct {
	APIVersion string              `yaml:"apiVersion,omitempty"`
	Kind       string              `yaml:",omitempty"`
	Metadata   *TektonMetadata     `yaml:",omitempty"`
	Spec       *TektonPipelineSpec `yaml:",omitempty"`
	// contains filtered or unexported fields
}

TektonPipeline wraps a Pipeline object in Tekton. @see https://github.com/tektoncd/pipeline/blob/master/docs/pipelines.md

func (*TektonPipeline) Generate added in v0.32.0

func (p *TektonPipeline) Generate() (out []byte, err error)

Generate outputs a multi-doc yaml that contains Tekton Pipeline Object and a Tekton Task object.

func (*TektonPipeline) Init added in v0.32.0

func (p *TektonPipeline) Init(config *types.PipelineConfig) Pipeline

type TektonPipelineSpec added in v0.32.0

type TektonPipelineSpec struct {
	Workspaces []*TektonWorkspace    `yaml:",omitempty"`
	Tasks      []*TektonPipelineTask `yaml:",omitempty"`
}

TektonPipelineSpec describes the spec of a Pipeline.

type TektonPipelineTask added in v0.32.0

type TektonPipelineTask struct {
	Name       string                 `yaml:",omitempty"`
	TaskRef    *TektonPipelineTaskRef `yaml:"taskRef,omitempty"`
	RunAfter   []string               `yaml:"runAfter,omitempty"`
	Workspaces []*TektonWorkspace     `yaml:",omitempty"`
}

// TektonPipelineTaskRef represents a task in a Tekton Pipeline object.

type TektonPipelineTaskRef added in v0.32.0

type TektonPipelineTaskRef struct {
	Name string `yaml:",omitempty"`
}

TektonPipelineTaskRef represents a taskRef field in a task of a Tekton Pipeline object.

type TektonTask added in v0.32.0

type TektonTask struct {
	APIVersion string          `yaml:"apiVersion,omitempty"`
	Kind       string          `yaml:",omitempty"`
	Metadata   *TektonMetadata `yaml:",omitempty"`
	Spec       *TektonTaskSpec `yaml:",omitempty"`
}

TektonTask represents a Task object in Tekton. @see https://github.com/tektoncd/pipeline/blob/master/docs/tasks.md

func (*TektonTask) Generate added in v0.32.0

func (task *TektonTask) Generate() (out []byte, err error)

func (*TektonTask) Init added in v0.32.0

func (task *TektonTask) Init(config *TektonTaskConfig) *TektonTask

type TektonTaskConfig added in v0.32.0

type TektonTaskConfig struct {
	*types.PipelineConfig
	// Name specifies the name of the task.
	Name string
}

TektonTaskConfig contains necessary configurations of the TektonTask class.

type TektonTaskSpec added in v0.32.0

type TektonTaskSpec struct {
	Workspaces []*TektonWorkspace `yaml:",omitempty"`
	Steps      []*TektonTaskStep  `yaml:",omitempty"`
	Volumes    []*TektonVolume    `yaml:",omitempty"`
}

TektonTaskSpec describes the spec of a Task object.

type TektonTaskStep added in v0.32.0

type TektonTaskStep struct {
	Name         string               `yaml:",omitempty"`
	Image        string               `yaml:",omitempty"`
	Args         []string             `yaml:",omitempty"`
	VolumeMounts []*TektonVolumeMount `yaml:"volumeMounts,omitempty"`
}

TektonTaskStep is a step in the Task spec.

type TektonVolume added in v0.32.0

type TektonVolume struct {
	Name     string                `yaml:",omitempty"`
	HostPath *TektonVolumeHostPath `yaml:"hostPath,omitempty"`
}

TektonVolume describes a mountable volume on the host.

type TektonVolumeHostPath added in v0.32.0

type TektonVolumeHostPath struct {
	Path string `yaml:",omitempty"`
	Type string `yaml:",omitempty"`
}

TektonVolumeHostPath indicates the path and its file type of a file on the host.

type TektonVolumeMount added in v0.32.0

type TektonVolumeMount struct {
	Name      string `yaml:",omitempty"`
	MountPath string `yaml:"mountPath,omitempty"`
}

TektonVolumeMount mounts a volume to a path.

type TektonWorkspace added in v0.32.0

type TektonWorkspace struct {
	Name      string `yaml:",omitempty"`
	MountPath string `yaml:"mountPath,omitempty"`
	// Workspace references another workspace declared elsewhere.
	Workspace string `yaml:",omitempty"`
}

TektonWorkspace represents a shared workspace.

Jump to

Keyboard shortcuts

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