Documentation ¶
Index ¶
- Constants
- type CircleCI
- type CircleCICommand
- type CircleCICommandStep
- type CircleCIDockerExecutor
- type CircleCIExecutor
- type CircleCIJob
- type CircleCIOrb
- type CircleCIOrbConfig
- type CircleCIWorkflow
- type CloudBuild
- type CloudBuildStep
- type GitHubActionStepArgs
- type GitHubActions
- type GitHubActionsJob
- type GitHubActionsStep
- type GitHubActionsTrigger
- type GitLabCI
- type GitLabCIStage
- type GitLabCIStages
- type Jenkins
- type JenkinsMultilineScript
- type JenkinsStage
- type JenkinsStageStep
- type Pipeline
- type TektonMetadata
- type TektonPipeline
- type TektonPipelineSpec
- type TektonPipelineTask
- type TektonPipelineTaskRef
- type TektonTask
- type TektonTaskConfig
- type TektonTaskSpec
- type TektonTaskStep
- type TektonVolume
- type TektonVolumeHostPath
- type TektonVolumeMount
- type TektonWorkspace
Constants ¶
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.
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
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 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/
type GitLabCIStage ¶
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.
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
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
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
func (step *JenkinsStageStep) Init(config *types.PipelineConfig) *JenkinsStageStep
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.