Documentation ¶
Index ¶
- func BuildAndPushTektonBundle(YamlContent []byte, ref name.Reference, remoteOption remoteimg.Option) error
- func CreatePVC(pvcs v1.PersistentVolumeClaimInterface, pvcName string) error
- func DidTaskRunSucceed(tr interface{}) bool
- func DidTaskSucceed(tr interface{}) bool
- func ExtractTektonObjectFromBundle(bundleRef, kind, name string) (runtime.Object, error)
- func GetBundleRef(pipelineRef *pipeline.PipelineRef) string
- func GetDefaultPipelineBundleRef(buildPipelineConfigConfigMapYamlURL, name string) (string, error)
- func GetFailedPipelineRunLogs(c crclient.Client, ki kubernetes.Interface, pipelineRun *pipeline.PipelineRun) (string, error)
- func GetPipelineNameAndBundleRef(pipelineRef *pipeline.PipelineRef) (string, string)
- func HasPipelineRunFailed(pr *pipeline.PipelineRun) bool
- func HasPipelineRunSucceeded(pr *pipeline.PipelineRun) bool
- func MatchTaskRunResult(name, value string) types.GomegaMatcher
- func MatchTaskRunResultWithJSONPathValue(name, path string, json interface{}) types.GomegaMatcher
- func MatchTaskRunResultWithJSONValue(name string, json interface{}) types.GomegaMatcher
- func NewBundleResolverPipelineRef(name string, bundleRef string) *pipeline.PipelineRef
- type BuildPipelineConfig
- type BuildahDemo
- type CosignResult
- type ECIntegrationTestScenario
- type FailedPipelineRunDetails
- type ManifestResponse
- type PipelineRef
- type PipelineRunGenerator
- type QuayImageInfo
- type Tag
- type TagResponse
- type TaskRunResultMatcher
- type VerifyEnterpriseContract
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 ¶
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 ¶
GetDefaultPipelineBundleRef gets the specific Tekton pipeline bundle reference from a Build pipeline config ConfigMap (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 BuildPipelineConfig ¶
type BuildPipelineConfig struct { DefaultPipelineName string `json:"default-pipeline-name"` Pipelines []PipelineRef `json:"pipelines"` }
type BuildahDemo ¶
func (BuildahDemo) Generate ¶
func (b BuildahDemo) Generate() (*pipeline.PipelineRun, error)
This is a demo pipeline to create test image and task signing
type CosignResult ¶
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 ¶
func (p ECIntegrationTestScenario) Generate() (*pipeline.PipelineRun, error)
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 PipelineRef ¶
type PipelineRunGenerator ¶
type PipelineRunGenerator interface {
Generate() (*pipeline.PipelineRun, error)
}
type QuayImageInfo ¶
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 ¶
func (p VerifyEnterpriseContract) Generate() (*pipeline.PipelineRun, error)
Generates pipelineRun from VerifyEnterpriseContract.
func (*VerifyEnterpriseContract) WithComponentImage ¶
func (p *VerifyEnterpriseContract) WithComponentImage(imageRef string)