tekton

package
v0.0.0-...-cc70305 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bundles

type Bundles struct {
	FBCBuilderBundle    string
	DockerBuildBundle   string
	JavaBuilderBundle   string
	NodeJSBuilderBundle string
}

type TektonController

type TektonController struct {
	*kubeCl.CustomClient
}

Create the struct for kubernetes clients

func NewSuiteController

func NewSuiteController(kube *kubeCl.CustomClient) *TektonController

Create controller for Tekton Task/Pipeline CRUD operations

func (*TektonController) AddFinalizerToPipelineRun

func (t *TektonController) AddFinalizerToPipelineRun(pipelineRun *pipeline.PipelineRun, finalizerName string) error

func (*TektonController) AwaitAttestationAndSignature

func (t *TektonController) AwaitAttestationAndSignature(image string, timeout time.Duration) error

AwaitAttestationAndSignature awaits attestation and signature.

func (*TektonController) CheckPipelineRunFinished

func (t *TektonController) CheckPipelineRunFinished(pipelineRunName, namespace string) wait.ConditionFunc

CheckPipelineRunFinished checks if pipelineRun finished.

func (*TektonController) CheckPipelineRunStarted

func (t *TektonController) CheckPipelineRunStarted(pipelineRunName, namespace string) wait.ConditionFunc

CheckPipelineRunStarted checks if pipelineRUn started.

func (*TektonController) CheckPipelineRunSucceeded

func (t *TektonController) CheckPipelineRunSucceeded(pipelineRunName, namespace string) wait.ConditionFunc

CheckPipelineRunSucceeded checks if pipelineRun succeeded. Returns error if getting pipelineRun fails.

func (*TektonController) CheckTaskRunFinished

func (t *TektonController) CheckTaskRunFinished(taskRunName, namespace string) wait.ConditionFunc

CheckTaskRunFinished checks if taskRun finished.

func (*TektonController) CheckTaskRunSucceeded

func (t *TektonController) CheckTaskRunSucceeded(taskRunName, namespace string) wait.ConditionFunc

CheckTaskRunSucceeded checks if taskRun succeeded. Returns error if getting taskRun fails.

func (*TektonController) CreateEnterpriseContractPolicy

func (t *TektonController) CreateEnterpriseContractPolicy(name, namespace string, ecpolicy ecp.EnterpriseContractPolicySpec) (*ecp.EnterpriseContractPolicy, error)

CreateEnterpriseContractPolicy creates an EnterpriseContractPolicy in a specified namespace.

func (*TektonController) CreateOrUpdatePolicyConfiguration

func (t *TektonController) CreateOrUpdatePolicyConfiguration(namespace string, policy ecp.EnterpriseContractPolicySpec) error

CreateOrUpdatePolicyConfiguration creates new policy if it doesn't exist, otherwise updates the existing one, in a specified namespace.

func (*TektonController) CreateOrUpdateSigningSecret

func (t *TektonController) CreateOrUpdateSigningSecret(publicKey []byte, name, namespace string) (err error)

CreateOrUpdateSigningSecret creates a signing secret if it doesn't exist, otherwise updates the existing one.

func (*TektonController) CreatePVCInAccessMode

func (t *TektonController) CreatePVCInAccessMode(name, namespace string, accessMode corev1.PersistentVolumeAccessMode) (*corev1.PersistentVolumeClaim, error)

CreatePVCInAccessMode creates a PVC with mode as passed in arguments.

func (*TektonController) CreatePipeline

func (t *TektonController) CreatePipeline(pipeline *pipeline.Pipeline, ns string) (*pipeline.Pipeline, error)

CreatePipeline creates a tekton pipeline and returns the pipeline or an error

func (*TektonController) CreatePipelineRun

func (t *TektonController) CreatePipelineRun(pipelineRun *pipeline.PipelineRun, ns string) (*pipeline.PipelineRun, error)

CreatePipelineRun creates a tekton pipelineRun and returns the pipelineRun or error

func (*TektonController) CreateSkopeoCopyTask

func (t *TektonController) CreateSkopeoCopyTask(namespace string) error

CreateSkopeoCopyTask creates a skopeo copy task in the given namespace.

func (*TektonController) CreateTask

func (t *TektonController) CreateTask(task *pipeline.Task, ns string) (*pipeline.Task, error)

Create a tekton task and return the task or error.

func (*TektonController) CreateTaskRun

func (t *TektonController) CreateTaskRun(taskRun *pipeline.TaskRun, ns string) (*pipeline.TaskRun, error)

func (*TektonController) CreateTaskRunCopy

func (t *TektonController) CreateTaskRunCopy(name, namespace, serviceAccountName, srcImageURL, destImageURL string) (*pipeline.TaskRun, error)

CreateTaskRunCopy creates a TaskRun that copies one image to a second image repository.

func (*TektonController) DeleteAllPipelineRunsInASpecificNamespace

func (t *TektonController) DeleteAllPipelineRunsInASpecificNamespace(ns string) error

DeleteAllPipelineRunsInASpecificNamespace deletes all PipelineRuns in a given namespace (removing the finalizers field, first)

func (*TektonController) DeleteAllTaskRunsInASpecificNamespace

func (t *TektonController) DeleteAllTaskRunsInASpecificNamespace(namespace string) error

DeleteAllTaskRunsInASpecificNamespace removes all TaskRuns from a given repository. Useful when creating a lot of resources and wanting to remove all of them.

func (*TektonController) DeleteAllTasksInASpecificNamespace

func (t *TektonController) DeleteAllTasksInASpecificNamespace(namespace string) error

DeleteAllTasksInASpecificNamespace removes all Tasks from a given repository. Useful when creating a lot of resources and wanting to remove all of them.

func (*TektonController) DeleteEnterpriseContractPolicy

func (t *TektonController) DeleteEnterpriseContractPolicy(name string, namespace string, failOnNotFound bool) error

DeleteEnterpriseContractPolicy deletes enterprise contract policy.

func (*TektonController) DeletePVC

func (t *TektonController) DeletePVC(name, namespace string) error

func (*TektonController) DeletePipeline

func (t *TektonController) DeletePipeline(name, ns string) error

DeletePipeline removes the pipeline from given namespace.

func (*TektonController) DeletePipelineRun

func (t *TektonController) DeletePipelineRun(name, ns string) error

DeletePipelineRun deletes a pipelineRun form a given namespace.

func (*TektonController) GetEnterpriseContractPolicy

func (t *TektonController) GetEnterpriseContractPolicy(name, namespace string) (*ecp.EnterpriseContractPolicy, error)

GetEnterpriseContractPolicy gets an EnterpriseContractPolicy from specified a namespace

func (*TektonController) GetEnvVariable

func (t *TektonController) GetEnvVariable(tr *pipeline.TaskRun, envVar string) (string, error)

func (*TektonController) GetPVC

func (t *TektonController) GetPVC(name, namespace string) (*corev1.PersistentVolumeClaim, error)

func (*TektonController) GetPipelineRun

func (t *TektonController) GetPipelineRun(pipelineRunName, namespace string) (*pipeline.PipelineRun, error)

GetPipelineRun returns a pipelineRun with a given name.

func (*TektonController) GetPipelineRunLogs

func (t *TektonController) GetPipelineRunLogs(pipelineRunName, namespace string) (string, error)

GetPipelineRunLogs returns logs of a given pipelineRun.

func (*TektonController) GetPipelineRunWatch

func (t *TektonController) GetPipelineRunWatch(ctx context.Context, namespace string) (watch.Interface, error)

GetPipelineRunWatch returns pipelineRun watch interface.

func (*TektonController) GetRekorHost

func (t *TektonController) GetRekorHost() (rekorHost string, err error)

GetRekorHost returns a rekorHost.

func (*TektonController) GetRepositoryParams

func (t *TektonController) GetRepositoryParams(name, namespace string) ([]pacv1alpha1.Params, error)

GetRepositoryParams returns a repository params list

func (*TektonController) GetResultFromTaskRun

func (t *TektonController) GetResultFromTaskRun(tr *pipeline.TaskRun, result string) (string, error)

func (*TektonController) GetTask

func (t *TektonController) GetTask(name, namespace string) (*pipeline.Task, error)

GetTask returns the requested Task object.

func (*TektonController) GetTaskRun

func (t *TektonController) GetTaskRun(name, namespace string) (*pipeline.TaskRun, error)

GetTaskRun returns the requested TaskRun object.

func (*TektonController) GetTaskRunFromPipelineRun

func (t *TektonController) GetTaskRunFromPipelineRun(c crclient.Client, pr *pipeline.PipelineRun, pipelineTaskName string) (*pipeline.TaskRun, error)

func (*TektonController) GetTaskRunLogs

func (t *TektonController) GetTaskRunLogs(pipelineRunName, pipelineTaskName, namespace string) (map[string]string, error)

GetTaskRunLogs returns logs of a specified taskRun.

func (*TektonController) GetTaskRunParam

func (t *TektonController) GetTaskRunParam(c crclient.Client, pr *pipeline.PipelineRun, pipelineTaskName, paramName string) (string, error)

GetTaskRunParam gets value of a TaskRun param.

func (*TektonController) GetTaskRunResult

func (t *TektonController) GetTaskRunResult(c crclient.Client, pr *pipeline.PipelineRun, pipelineTaskName string, result string) (string, error)

func (*TektonController) GetTaskRunStatus

func (t *TektonController) GetTaskRunStatus(c crclient.Client, pr *pipeline.PipelineRun, pipelineTaskName string) (*pipeline.PipelineRunTaskRunStatus, error)

GetTaskRunStatus returns the status of a specified taskRun.

func (*TektonController) GetTektonChainsPublicKey

func (t *TektonController) GetTektonChainsPublicKey() ([]byte, error)

GetTektonChainsPublicKey returns a TektonChains public key.

func (*TektonController) ListAllPipelineRuns

func (t *TektonController) ListAllPipelineRuns(ns string) (*pipeline.PipelineRunList, error)

ListAllPipelineRuns returns a list of all pipelineRuns in a namespace.

func (*TektonController) NewBundles

func (t *TektonController) NewBundles() (*Bundles, error)

NewBundles returns new Bundles.

func (*TektonController) RemoveFinalizerFromPipelineRun

func (t *TektonController) RemoveFinalizerFromPipelineRun(pipelineRun *pipeline.PipelineRun, finalizerName string) error

func (*TektonController) RunPipeline

func (t *TektonController) RunPipeline(g tekton.PipelineRunGenerator, namespace string, taskTimeout int) (*pipeline.PipelineRun, error)

RunPipeline creates a pipelineRun and waits for it to start.

func (*TektonController) RunTaskAndWait

func (t *TektonController) RunTaskAndWait(trSpec *pipeline.TaskRun, namespace string) (*pipeline.TaskRun, error)

func (*TektonController) StoreAllPipelineRuns

func (t *TektonController) StoreAllPipelineRuns(namespace string) error

StoreAllPipelineRuns stores all PipelineRuns in a given namespace.

func (*TektonController) StorePipelineRun

func (t *TektonController) StorePipelineRun(pipelineRun *pipeline.PipelineRun) error

StorePipelineRun stores a given PipelineRun as an artifact.

func (*TektonController) WatchPipelineRun

func (t *TektonController) WatchPipelineRun(pipelineRunName, namespace string, taskTimeout int) error

WatchPipelineRun waits until pipelineRun finishes.

func (*TektonController) WatchPipelineRunSucceeded

func (t *TektonController) WatchPipelineRunSucceeded(pipelineRunName, namespace string, taskTimeout int) error

WatchPipelineRunSucceeded waits until the pipelineRun succeeds.

func (*TektonController) WatchTaskRun

func (t *TektonController) WatchTaskRun(taskRunName, namespace string, taskTimeout int) error

Jump to

Keyboard shortcuts

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