Documentation ¶
Index ¶
- func AllParentSourcesIncluded(parentSourceImage, builtSourceImage string) (bool, error)
- func DeleteImageRepo(imageName string) (bool, error)
- func DoesImageRepoExistInQuay(quayImageRepoName string) (bool, error)
- func DoesQuayOrgSupportPrivateRepo() (bool, error)
- func DoesRobotAccountExistInQuay(robotAccountName string) (bool, error)
- func DoesTagExistsInQuay(imageURL string) (bool, error)
- func ExtractImage(image string) (string, error)
- func FetchImageConfig(imagePullspec string) (*v1.ConfigFile, error)
- func FetchImageDigest(imagePullspec string) (string, error)
- func GetBinaryImage(pr *pipeline.PipelineRun) string
- func GetImageTag(organization, repository, tagName string) (quay.Tag, error)
- func GetParsedSbomFilesContentFromImage(image string) (*SbomPurl, *SbomCyclonedx, error)
- func GetPrefetchValue(pr *pipeline.PipelineRun) string
- func GetQuayImageName(annotations map[string]string) (string, error)
- func GetRobotAccountInfoFromSecret(secret *corev1.Secret) (string, string)
- func GetRobotAccountName(imageName string) string
- func GetRobotAccountToken(robotAccountName string) (string, error)
- func ImageFromPipelineRun(pipelineRun *pipeline.PipelineRun) (*imageInfo.Image, error)
- func ImageRepoCreationSucceeded(annotations map[string]string) bool
- func IsAppSourceFilesExists(absExtraSourceDirPath string, gitUrl string) (bool, error)
- func IsDockerBuild(pr *pipeline.PipelineRun) bool
- func IsFBCBuild(pr *pipeline.PipelineRun) bool
- func IsHermeticBuildEnabled(pr *pipeline.PipelineRun) bool
- func IsImageAnnotationPresent(annotations map[string]string) bool
- func IsImagePulledFromAllowedRegistry(imagePullspec string) (bool, error)
- func IsImageRepoPublic(quayImageRepoName string) (bool, error)
- func IsPreFetchDependencysFilesExists(absExtraSourceDirPath string, isHermetic bool, prefetchValue string) (bool, error)
- func IsSourceBuildEnabled(pr *pipeline.PipelineRun) bool
- func IsSourceFilesExistsInSourceImage(srcImage string, gitUrl string, isHermetic bool, prefetchValue string) (bool, error)
- func ReadDockerfileUsedForBuild(c client.Client, tektonController *tekton.TektonController, ...) ([]byte, error)
- func ResolveSourceImage(image string) (string, error)
- func SourceBuildTaskRunLogsContain(tektonController *tekton.TektonController, pr *pipeline.PipelineRun, ...) (bool, error)
- func ValidateBuildPipelineTestResults(pipelineRun *pipeline.PipelineRun, c crclient.Client) error
- type ClairScanResult
- type Dockerfile
- type PipelineBuildInfo
- type SbomCyclonedx
- type SbomPurl
- type SourceBuildResult
- type TestOutput
- type Vulnerabilities
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteImageRepo ¶
func DoesTagExistsInQuay ¶
imageURL format example: quay.io/redhat-appstudio-qe/devfile-go-rhtap-uvv7:build-66d4e-1685533053
func ExtractImage ¶
func FetchImageConfig ¶
func FetchImageConfig(imagePullspec string) (*v1.ConfigFile, error)
FetchImageConfig fetches image config from remote registry. It uses the registry authentication credentials stored in default place ~/.docker/config.json
func FetchImageDigest ¶
func GetBinaryImage ¶
func GetBinaryImage(pr *pipeline.PipelineRun) string
func GetParsedSbomFilesContentFromImage ¶
func GetParsedSbomFilesContentFromImage(image string) (*SbomPurl, *SbomCyclonedx, error)
func GetPrefetchValue ¶
func GetPrefetchValue(pr *pipeline.PipelineRun) string
func GetRobotAccountInfoFromSecret ¶
GetRobotAccountInfoFromSecret gets robot account name and token from secret data
func GetRobotAccountName ¶
func GetRobotAccountToken ¶
GetRobotAccountToken gets the robot account token from a given robot account name
func ImageFromPipelineRun ¶
func ImageFromPipelineRun(pipelineRun *pipeline.PipelineRun) (*imageInfo.Image, error)
func IsAppSourceFilesExists ¶
func IsDockerBuild ¶
func IsDockerBuild(pr *pipeline.PipelineRun) bool
func IsFBCBuild ¶
func IsFBCBuild(pr *pipeline.PipelineRun) bool
func IsHermeticBuildEnabled ¶
func IsHermeticBuildEnabled(pr *pipeline.PipelineRun) bool
func IsImageRepoPublic ¶
func IsSourceBuildEnabled ¶
func IsSourceBuildEnabled(pr *pipeline.PipelineRun) bool
func ReadDockerfileUsedForBuild ¶
func ReadDockerfileUsedForBuild(c client.Client, tektonController *tekton.TektonController, pr *pipeline.PipelineRun) ([]byte, error)
ReadDockerfileUsedForBuild reads the Dockerfile and return its content.
func ResolveSourceImage ¶
func SourceBuildTaskRunLogsContain ¶
func SourceBuildTaskRunLogsContain( tektonController *tekton.TektonController, pr *pipeline.PipelineRun, message string) (bool, error)
func ValidateBuildPipelineTestResults ¶
func ValidateBuildPipelineTestResults(pipelineRun *pipeline.PipelineRun, c crclient.Client) error
Types ¶
type ClairScanResult ¶
type ClairScanResult struct {
Vulnerabilities Vulnerabilities `json:"vulnerabilities"`
}
type Dockerfile ¶
type Dockerfile struct {
// contains filtered or unexported fields
}
func ParseDockerfile ¶
func ParseDockerfile(content []byte) (*Dockerfile, error)
func (*Dockerfile) ConvertParentImagesToBaseImagesDigestsForm ¶
func (d *Dockerfile) ConvertParentImagesToBaseImagesDigestsForm() ([]string, error)
ConvertParentImagesToBaseImagesDigestsForm is a helper function for testing the order is matched between BASE_IMAGES_DIGESTS and parent images within Dockerfile. ConvertParentImagesToBaseImagesDigestsForm de-duplicates the images what buildah task does for BASE_IMAGES_DIGESTS.
func (*Dockerfile) IsBuildFromScratch ¶
func (d *Dockerfile) IsBuildFromScratch() bool
func (*Dockerfile) ParentImages ¶
func (d *Dockerfile) ParentImages() []string
type PipelineBuildInfo ¶
type PipelineBuildInfo struct {
// contains filtered or unexported fields
}
func GetPipelineBuildInfo ¶
func GetPipelineBuildInfo(pr *pipeline.PipelineRun) PipelineBuildInfo
type SbomCyclonedx ¶
type SbomPurl ¶
type SbomPurl struct { ImageContents struct { Dependencies []struct { Purl string `json:"purl"` } `json:"dependencies"` } `json:"image_contents"` }
type SourceBuildResult ¶
type SourceBuildResult struct { Status string `json:"status"` Message string `json:"message,omitempty"` DependenciesIncluded bool `json:"dependencies_included"` BaseImageSourceIncluded bool `json:"base_image_source_included"` ImageUrl string `json:"image_url"` ImageDigest string `json:"image_digest"` }
func ReadSourceBuildResult ¶
func ReadSourceBuildResult(c client.Client, tektonController *tekton.TektonController, pr *pipeline.PipelineRun) (*SourceBuildResult, error)
ReadSourceBuildResult reads source-build task result BUILD_RESULT and returns the decoded data.