Documentation ¶
Index ¶
- Constants
- func GeneratePipelineOwnerRef(pipeline *pipelineapi.Pipeline) *metav1.OwnerReference
- func RenderCustomTask(cfg CustomTaskConfig) ([]byte, error)
- func RenderCustomTaskWithPipeline(pipeline *pipelineapi.Pipeline, taskName string, task *pipelineapi.CustomTask) ([]byte, error)
- func RenderPipelineWithPipeline(pipeline *pipelineapi.Pipeline) ([]byte, error)
- func RenderPredefinedTask(cfg PredefinedTaskConfig) ([]byte, error)
- func RenderPredefinedTaskWithPipeline(pipeline *pipelineapi.Pipeline, task *pipelineapi.PredefinedTask) ([]byte, error)
- func RenderRBAC(cfg RBACConfig) ([]byte, error)
- func RenderTrigger(cfg TriggerConfig) ([]byte, error)
- func RenderTriggerWithPipeline(pipeline *pipelineapi.Pipeline) ([]byte, error)
- type CustomTaskConfig
- type PipelineConfig
- type PredefinedTaskConfig
- type RBACConfig
- type TaskInfo
- type TriggerConfig
- type Workspace
Constants ¶
const ( PipelineTemplateName = "pipeline-template" DockerCredentialsName = "dockerconfig" DockerCredentialsWorkspace = "docker-credentials" )
const BuildPushImageContent = `` /* 3172-byte string literal not displayed */
const CustomTaskTemplateContent = `` /* 1875-byte string literal not displayed */
const (
CustomTaskTemplateName = "pipeline custom task template"
)
const GitCloneTaskContent = `` /* 9450-byte string literal not displayed */
const GoLintTaskContent = `` /* 2601-byte string literal not displayed */
const GoTestTaskContent = `` /* 2668-byte string literal not displayed */
const PipelineTemplateContent = `` /* 2062-byte string literal not displayed */
const RBACTemplateContent = `` /* 1945-byte string literal not displayed */
const (
RBACTemplateName = "pipeline rbac template"
)
const TriggerTemplateContent = `` /* 2929-byte string literal not displayed */
const (
TriggerTemplateName = "pipeline trigger template"
)
Variables ¶
This section is empty.
Functions ¶
func GeneratePipelineOwnerRef ¶
func GeneratePipelineOwnerRef(pipeline *pipelineapi.Pipeline) *metav1.OwnerReference
func RenderCustomTask ¶
func RenderCustomTask(cfg CustomTaskConfig) ([]byte, error)
RenderCustomTask takes a CustomTaskConfig object and generates YAML byte array configuration representing the CustomTask configuration.
func RenderCustomTaskWithPipeline ¶
func RenderCustomTaskWithPipeline(pipeline *pipelineapi.Pipeline, taskName string, task *pipelineapi.CustomTask) ([]byte, error)
RenderCustomTaskWithPipeline takes a Pipeline object and generates YAML byte array configuration representing the CustomTask configuration.
func RenderPipelineWithPipeline ¶
func RenderPipelineWithPipeline(pipeline *pipelineapi.Pipeline) ([]byte, error)
RenderPipelineWithPipeline renders the pipeline configuration as a YAML byte array. It uses the specified pipeline to gather necessary information.
func RenderPredefinedTask ¶
func RenderPredefinedTask(cfg PredefinedTaskConfig) ([]byte, error)
RenderPredefinedTask takes a PredefinedTaskConfig object and generates YAML byte array configuration representing the PredefinedTask configuration.
func RenderPredefinedTaskWithPipeline ¶
func RenderPredefinedTaskWithPipeline(pipeline *pipelineapi.Pipeline, task *pipelineapi.PredefinedTask) ([]byte, error)
RenderPredefinedTaskWithPipeline takes a Pipeline object and generates YAML byte array configuration representing the PredefinedTask configuration.
func RenderRBAC ¶
func RenderRBAC(cfg RBACConfig) ([]byte, error)
RenderRBAC renders the RBAC configuration using a specified template.
func RenderTrigger ¶
func RenderTrigger(cfg TriggerConfig) ([]byte, error)
RenderTrigger takes a TriggerConfig object and generates YAML byte array configuration representing the trigger configuration.
func RenderTriggerWithPipeline ¶
func RenderTriggerWithPipeline(pipeline *pipelineapi.Pipeline) ([]byte, error)
RenderTriggerWithPipeline takes a pipeline object and generates YAML byte array configuration representing the trigger configuration.
Types ¶
type CustomTaskConfig ¶
type CustomTaskConfig struct { TaskName string PipelineName string PipelineNamespace string Image string Command []string Args []string Env []corev1.EnvVar ResourceRequirements *corev1.ResourceRequirements Script string OwnerReference *metav1.OwnerReference }
func (CustomTaskConfig) CustomTaskName ¶
func (cfg CustomTaskConfig) CustomTaskName() string
CustomTaskName is the name of custom task object, in case different pipeline have the same name task.
type PipelineConfig ¶
type PipelineConfig struct { PipelineName string PipelineNamespace string // TasksInfo contains the necessary information to integrate tasks into the pipeline. TasksInfo string OwnerReference *metav1.OwnerReference // DockerCredentials is the name of Docker credentials secret for image build tasks. DockerCredentials string }
PipelineConfig defines the configuration needed to render a pipeline.
type PredefinedTaskConfig ¶
type PredefinedTaskConfig struct { PipelineName string Namespace string // TemplateName is set by user in `Pipeline.Tasks[i].PredefinedTask.Name` TemplateName string // Params is set by user in `Pipeline.Tasks[i].PredefinedTask.Params` Params map[string]string OwnerReference *metav1.OwnerReference }
func (PredefinedTaskConfig) PredefinedTaskName ¶
func (cfg PredefinedTaskConfig) PredefinedTaskName() string
PredefinedTaskName is the name of Predefined task object, in case different pipeline have the same name task.
type RBACConfig ¶
type RBACConfig struct { PipelineName string // Name of the pipeline. PipelineNamespace string // Kubernetes namespace where the pipeline is deployed. OwnerReference *metav1.OwnerReference ChainCredentialsName string }
RBACConfig contains the configuration data required for the RBAC template. Both PipelineName and PipelineNamespace are required.
func (RBACConfig) ServiceAccountName ¶
func (rbac RBACConfig) ServiceAccountName() string
ServiceAccountName generates the service account name using the pipeline name.
type TriggerConfig ¶
type TriggerConfig struct { PipelineName string PipelineNamespace string OwnerReference *metav1.OwnerReference AccessMode string StorageRequest string StorageClassName string VolumeMode string }
func (TriggerConfig) ServiceAccountName ¶
func (cfg TriggerConfig) ServiceAccountName() string
ServiceAccountName is the service account used by trigger