tekton

package
v0.0.0-...-317aa01 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildAndPushTektonBundle

func BuildAndPushTektonBundle(YamlContent []byte, ref name.Reference, remoteOption remoteimg.Option) error

BuildAndPushTektonBundle builds a Tekton bundle from YAML and pushes to remote container registry

func CreatePVC

func CreatePVC(pvcs v1.PersistentVolumeClaimInterface, pvcName string) error

CreatePVC creates PVC.

func DidTaskRunSucceed

func DidTaskRunSucceed(tr interface{}) bool

DidTaskRunSucceed checks if task succeeded.

func DidTaskSucceed

func DidTaskSucceed(tr interface{}) bool

func ExtractTektonObjectFromBundle

func ExtractTektonObjectFromBundle(bundleRef, kind, name string) (runtime.Object, error)

ExtractTektonObjectFromBundle extracts specified Tekton object from specified bundle reference

func GetBundleRef

func GetBundleRef(pipelineRef *pipeline.PipelineRef) string

GetBundleRef returns the bundle reference from a pipelineRef

func GetDefaultPipelineBundleRef

func GetDefaultPipelineBundleRef(buildPipelineSelectorYamlURL, selectorName string) (string, error)

GetDefaultPipelineBundleRef gets the specific Tekton pipeline bundle reference from a Build pipeline selector (in a YAML format) from a URL specified in the parameter

func GetFailedPipelineRunLogs

func GetFailedPipelineRunLogs(c crclient.Client, ki kubernetes.Interface, pipelineRun *pipeline.PipelineRun) (string, error)

GetFailedPipelineRunLogs gets the logs of the pipelinerun failed task

func GetPipelineNameAndBundleRef

func GetPipelineNameAndBundleRef(pipelineRef *pipeline.PipelineRef) (string, string)

GetPipelineNameAndBundleRef returns the pipeline name and bundle reference from a pipelineRef https://tekton.dev/docs/pipelines/pipelineruns/#tekton-bundles

func HasPipelineRunFailed

func HasPipelineRunFailed(pr *pipeline.PipelineRun) bool

func HasPipelineRunSucceeded

func HasPipelineRunSucceeded(pr *pipeline.PipelineRun) bool

func MatchTaskRunResult

func MatchTaskRunResult(name, value string) types.GomegaMatcher

MatchTaskRunResult returns a taskRunResult matcher.

func MatchTaskRunResultWithJSONPathValue

func MatchTaskRunResultWithJSONPathValue(name, path string, json interface{}) types.GomegaMatcher

MatchTaskRunResultWithJSONPathValue returns a taskRunResult with a JSONPath and JSONvalue matcher.

func MatchTaskRunResultWithJSONValue

func MatchTaskRunResultWithJSONValue(name string, json interface{}) types.GomegaMatcher

MatchTaskRunResultWithJSONValue returns a taskRunResult with a JSONValue matcher.

func NewBundleResolverPipelineRef

func NewBundleResolverPipelineRef(name string, bundleRef string) *pipeline.PipelineRef

Types

type BuildahDemo

type BuildahDemo struct {
	Image     string
	Bundle    string
	Name      string
	Namespace string
}

func (BuildahDemo) Generate

func (b BuildahDemo) Generate() (*pipeline.PipelineRun, error)

This is a demo pipeline to create test image and task signing

type CosignResult

type CosignResult struct {
	SignatureImageRef   string
	AttestationImageRef string
}

func FindCosignResultsForImage

func FindCosignResultsForImage(imageRef string) (*CosignResult, error)

FindCosignResultsForImage looks for .sig and .att image tags in the OpenShift image stream for the provided image reference. If none can be found errors.IsNotFound(err) is true, when err is nil CosignResult contains image references for signature and attestation images, otherwise other errors could be returned.

func (CosignResult) IsPresent

func (c CosignResult) IsPresent() bool

IsPresent checks if CosignResult is present.

func (CosignResult) Missing

func (c CosignResult) Missing(prefix string) string

Missing checks if CosignResult is missing.

type ECIntegrationTestScenario

type ECIntegrationTestScenario struct {
	Image                 string
	Name                  string
	Namespace             string
	PipelineGitURL        string
	PipelineGitRevision   string
	PipelineGitPathInRepo string
}

func (ECIntegrationTestScenario) Generate

Generates pipelineRun from ECIntegrationTestScenario.

type FailedPipelineRunDetails

type FailedPipelineRunDetails struct {
	FailedTaskRunName   string
	PodName             string
	FailedContainerName string
}

func GetFailedPipelineRunDetails

func GetFailedPipelineRunDetails(c crclient.Client, pipelineRun *pipeline.PipelineRun) (*FailedPipelineRunDetails, error)

type ManifestResponse

type ManifestResponse struct {
	Layers []any `json:"layers"`
}

type PipelineRunGenerator

type PipelineRunGenerator interface {
	Generate() (*pipeline.PipelineRun, error)
}

type QuayImageInfo

type QuayImageInfo struct {
	ImageRef string
	Layers   []any
}

type Tag

type Tag struct {
	Digest string `json:"manifest_digest"`
}

type TagResponse

type TagResponse struct {
	Tags []Tag `json:"tags"`
}

type TaskRunResultMatcher

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

func (*TaskRunResultMatcher) FailureMessage

func (matcher *TaskRunResultMatcher) FailureMessage(actual interface{}) (message string)

FailureMessage returns failure message for a TaskRunResult matcher.

func (*TaskRunResultMatcher) Match

func (matcher *TaskRunResultMatcher) Match(actual interface{}) (success bool, err error)

Match matches the matcher with a given taskRun.

func (*TaskRunResultMatcher) NegatedFailureMessage

func (matcher *TaskRunResultMatcher) NegatedFailureMessage(actual interface{}) (message string)

NegatedFailureMessage returns negated failure message for a TaskRunResult matcher.

type VerifyEnterpriseContract

type VerifyEnterpriseContract struct {
	Snapshot            app.SnapshotSpec
	TaskBundle          string
	Name                string
	Namespace           string
	PolicyConfiguration string
	PublicKey           string
	Strict              bool
	EffectiveTime       string
	IgnoreRekor         bool
}

func (*VerifyEnterpriseContract) AppendComponentImage

func (p *VerifyEnterpriseContract) AppendComponentImage(imageRef string)

func (VerifyEnterpriseContract) Generate

Generates pipelineRun from VerifyEnterpriseContract.

func (*VerifyEnterpriseContract) WithComponentImage

func (p *VerifyEnterpriseContract) WithComponentImage(imageRef string)

Jump to

Keyboard shortcuts

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