Documentation
¶
Index ¶
- func AllParentSourcesIncluded(parentSourceImage, builtSourceImage string) (bool, error)
- func CleanupWebhooks(f *framework.Framework, repoName string) error
- func CreateCustomBuildBundle(pipelineName string) (string, error)
- func CreateGitlabBuildSecret(f *framework.Framework, secretName string, annotations map[string]string, ...) 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 GetDockerBuildPipelineBundle() map[string]string
- func GetImageTag(organization, repository, tagName string) (quay.Tag, error)
- func GetPrefetchValue(pr *pipeline.PipelineRun) string
- func GetRobotAccountInfoFromSecret(secret *corev1.Secret) (string, string)
- func GetRobotAccountToken(robotAccountName string) (string, error)
- func GetSecretDefForGitHub(namespace string) *corev1.Secret
- func ImageFromPipelineRun(pipelineRun *pipeline.PipelineRun) (*imageInfo.Image, error)
- func IsHermeticBuildEnabled(pr *pipeline.PipelineRun) bool
- func IsImagePulledFromAllowedRegistry(imagePullspec string) (bool, error)
- func IsImageRepoPublic(quayImageRepoName string) (bool, error)
- func IsPreFetchDependenciesFilesExists(gitUrl, 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 NewGithubClient(organization string) (*github.Github, error)
- func ReadDockerfileUsedForBuild(c client.Client, tektonController *tekton.TektonController, ...) ([]byte, error)
- func ReadFileFromGitRepo(repoUrl, filePath, branch string) (string, error)
- func ReadRequirements(repoUrl string) ([]string, error)
- func ResolveGitDetails(repoUrlENV, repoRevisionENV string) (string, string, error)
- func ResolveKonfluxSourceImage(image string) (string, error)
- func ResolveSourceImageByVersionRelease(image string) (string, error)
- func SourceBuildTaskRunLogsContain(tektonController *tekton.TektonController, pr *pipeline.PipelineRun, ...) (bool, error)
- func ValidateBuildPipelineTestResults(pipelineRun *pipeline.PipelineRun, c crclient.Client, isFBCBuild bool) error
- type ClairScanReports
- type ClairScanResult
- type Dockerfile
- type SbomCyclonedx
- type SourceBuildResult
- type TestOutput
- type Vulnerabilities
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCustomBuildBundle ¶
func CreateGitlabBuildSecret ¶
func CreateGitlabBuildSecret(f *framework.Framework, secretName string, annotations map[string]string, token string) error
CreateGitlabBuildSecret creates a Kubernetes secret for GitLab build credentials
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 ¶
FetchImageDigest fetches image manifest digest. Digest is returned as a hex string without sha256: prefix.
func GetBinaryImage ¶
func GetBinaryImage(pr *pipeline.PipelineRun) string
func GetPrefetchValue ¶
func GetPrefetchValue(pr *pipeline.PipelineRun) string
func GetRobotAccountInfoFromSecret ¶
GetRobotAccountInfoFromSecret gets robot account name and token from secret data
func GetRobotAccountToken ¶
GetRobotAccountToken gets the robot account token from a given robot account name
func GetSecretDefForGitHub ¶
GetSecretDefForGitHub returns the definition of a Kubernetes Secret for GitHub SCM, and of type "basic-auth"
func ImageFromPipelineRun ¶
func ImageFromPipelineRun(pipelineRun *pipeline.PipelineRun) (*imageInfo.Image, error)
func IsHermeticBuildEnabled ¶
func IsHermeticBuildEnabled(pr *pipeline.PipelineRun) bool
func IsImageRepoPublic ¶
func IsSourceBuildEnabled ¶
func IsSourceBuildEnabled(pr *pipeline.PipelineRun) bool
func NewGithubClient ¶
NewGithubClient creates a GitHub client with custom organization. The token is retrieved in the same way as what SuiteController does.
func ReadDockerfileUsedForBuild ¶
func ReadDockerfileUsedForBuild(c client.Client, tektonController *tekton.TektonController, pr *pipeline.PipelineRun) ([]byte, error)
ReadDockerfileUsedForBuild reads the Dockerfile and return its content.
func ReadFileFromGitRepo ¶
ReadFileFromGitRepo reads a file from a remote Git repository hosted in GitHub. The filePath should be a relative path to the root of the repository. File content is returned. If error occurs, the error will be returned and empty string is returned as nothing is read. If branch is omitted, file is read from the "main" branch.
func ReadRequirements ¶
ReadRequirements reads dependencies from compiled requirements.txt by pip-compile, and it assumes the requirements.txt is simple in the root of the repository. The requirements are returned a list of strings, each of them is in form name==version.
func ResolveGitDetails ¶
resolve the git url and revision from a pull request. If not found, return a default that is set from environment variables.
func SourceBuildTaskRunLogsContain ¶
func SourceBuildTaskRunLogsContain( tektonController *tekton.TektonController, pr *pipeline.PipelineRun, message string) (bool, error)
Types ¶
type ClairScanReports ¶
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) ConvertParentImagesToBuildahOutputForm ¶
func (d *Dockerfile) ConvertParentImagesToBuildahOutputForm() ([]string, error)
ConvertParentImagesToBuildahOutputForm converts the image pullspecs found in the Dockerfile to a format corresponding to `buildah images --format '{{ .Name }}:{{ .Tag }}@{{ .Digest }}'`. ConvertParentImagesToBuildahOutputForm de-duplicates the images.
func (*Dockerfile) IsBuildFromScratch ¶
func (d *Dockerfile) IsBuildFromScratch() bool
func (*Dockerfile) ParentImages ¶
func (d *Dockerfile) ParentImages() []string
type SbomCyclonedx ¶
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.