Documentation
¶
Index ¶
- Constants
- Variables
- func AllOptional(all map[string]ReleaseVerification, names ...string) bool
- func CalculateBackoff(retryCount int, initialTime, currentTime *metav1.Time) time.Duration
- func ContainsString(arr []string, s string) bool
- func ContainsTagReference(tags []*imagev1.TagReference, name string) bool
- func CountUnreadyReleases(release *Release, tags []*imagev1.TagReference) int
- func CreateTerminalError(err error) error
- func FindImageIDForTag(is *imagev1.ImageStream, name string) string
- func FindImagePullSpec(is *imagev1.ImageStream, name string) string
- func FindPublicImagePullSpec(is *imagev1.ImageStream, name string) string
- func FindSpecTag(tags []imagev1.TagReference, name string) *imagev1.TagReference
- func FindTagReference(is *imagev1.ImageStream, name string) *imagev1.TagReference
- func GenerateProwJobResultsURL(suffix string) string
- func GetImageInfo(releaseInfo ReleaseInfo, architecture, pullSpec string) (*imageInfoConfig, error)
- func GetMirror(release *Release, releaseTagName string, lister *MultiImageStreamLister) (*imagev1.ImageStream, error)
- func GetVerificationJobs(rcCache *lru.Cache, eventRecorder record.EventRecorder, ...) (map[string]ReleaseVerification, error)
- func HashSpecTagImageDigests(is *imagev1.ImageStream) string
- func IncrementSemanticVersion(v semver.Version) (semver.Version, error)
- func Int32p(i int32) *int32
- func IsReleaseDelayedForInterval(release *Release, tag *imagev1.TagReference) (bool, string, time.Duration)
- func IsTagEventConditionNotImported(event *imagev1.NamedTagEventList) bool
- func IsTerminalError(err error) bool
- func LoadUpgradeGraph(graph *UpgradeGraph, secretClient kv1core.SecretInterface, ns, name string, ...)
- func MirrorName(release *Release, releaseTagName string) string
- func NewDynamicSharedIndexInformer(client dynamic.NamespaceableResourceInterface, namespace string, ...) cache.SharedIndexInformer
- func NewLatestImageCache(imageStream string, tag string) *latestImageCache
- func ReleaseGenerationFromObject(name string, annotations map[string]string) (int64, bool)
- func SaveUpgradeGraph(buf *bytes.Buffer, graph *UpgradeGraph, secretClient kv1core.SecretInterface, ...) error
- func SemverParseTolerant(v string) (semver.Version, error)
- func SemverToMajorMinor(sr semver.Version) string
- func SortedRawReleaseTags(release *Release, phases ...string) []*imagev1.TagReference
- func SortedReleaseTags(release *Release, phases ...string) []*imagev1.TagReference
- func StringSliceContains(slice []string, s string) bool
- func SyncGraphToSecret(graph *UpgradeGraph, update bool, secretClient kv1core.SecretInterface, ...)
- func TagNames(refs []*imagev1.TagReference) []string
- func TransformJiraIssues(issues []jiraBaseClient.Issue, prMap map[string][]string, ...) map[string]IssueDetails
- func VerificationJobsWithRetries(jobs map[string]ReleaseVerification, result VerificationStatusMap) ([]string, bool)
- type APIRelease
- type APIReleaseInfo
- type APITag
- type AggregatedProwJobVerification
- type BugDetails
- type CachingReleaseInfo
- func (c *CachingReleaseInfo) Bugs(from, to string) ([]BugDetails, error)
- func (c *CachingReleaseInfo) ChangeLog(from, to string, json bool) (string, error)
- func (c *CachingReleaseInfo) GetFeatureChildren(featuresList []string, validityPeriod time.Duration) (string, error)
- func (c *CachingReleaseInfo) ImageInfo(image, archtecture string) (string, error)
- func (c *CachingReleaseInfo) IssuesInfo(changelog string) (string, error)
- func (c *CachingReleaseInfo) ReleaseInfo(image string) (string, error)
- func (c *CachingReleaseInfo) UpgradeInfo(image string) (ReleaseUpgradeInfo, error)
- type ChangeLog
- type ChangeLogComponentInfo
- type ChangeLogImageInfo
- type ChangeLogReleaseInfo
- type CheckConsistentImages
- type CommitInfo
- type Duration
- type ExecReleaseFiles
- type ExecReleaseInfo
- func (r *ExecReleaseInfo) Bugs(from, to string) ([]BugDetails, error)
- func (r *ExecReleaseInfo) ChangeLog(from, to string, isJson bool) (string, error)
- func (r *ExecReleaseInfo) GetFeatureChildren(featuresList []string, validityPeriod time.Duration) (string, error)
- func (r *ExecReleaseInfo) GetIssuesWithChunks(issues []string) (result []jiraBaseClient.Issue, err error)
- func (r *ExecReleaseInfo) GetIssuesWithDemoLink(issues []string) (result []jiraBaseClient.Issue, err error)
- func (r *ExecReleaseInfo) GetRemoteLinksWithConcurrency(issues []string) (result map[string][]string, err error)
- func (r *ExecReleaseInfo) ImageInfo(image, architecture string) (string, error)
- func (r *ExecReleaseInfo) IssuesInfo(changelog string) (string, error)
- func (r *ExecReleaseInfo) JiraRecursiveGet(issues []jiraBaseClient.Issue, allIssues *[]jiraBaseClient.Issue, ...) error
- func (r *ExecReleaseInfo) ReleaseInfo(image string) (string, error)
- func (r *ExecReleaseInfo) UpgradeInfo(image string) (ReleaseUpgradeInfo, error)
- type IssueDetails
- type MultiImageStreamLister
- type MultiReleasePayloadLister
- type NewestSemVerFromSummaries
- type NewestSemVerToSummaries
- type ProwJobVerification
- type PublishStreamReference
- type PublishTagReference
- type PublishVerifyIssues
- type Release
- type ReleaseCandidate
- type ReleaseCandidateList
- type ReleaseCheck
- type ReleaseConfig
- type ReleaseInfo
- type ReleasePeriodic
- type ReleasePromoteJobParameters
- type ReleasePublish
- type ReleaseUpgradeInfo
- type ReleaseUpgradeMetadata
- type ReleaseVerification
- type SemanticVersion
- type SemanticVersions
- type StableReferences
- type StableRelease
- type StableReleases
- type TagReferencesByAge
- type TerminalError
- type Transition
- type UpgradeCandidate
- type UpgradeGraph
- func (g *UpgradeGraph) Add(fromTag, toTag string, results ...UpgradeResult)
- func (g *UpgradeGraph) Histories() []UpgradeHistory
- func (g *UpgradeGraph) Load(r io.Reader) error
- func (g *UpgradeGraph) OrderedRecords() []UpgradeRecord
- func (g *UpgradeGraph) PrettyPrint()
- func (g *UpgradeGraph) PrintSecretPayload()
- func (g *UpgradeGraph) PruneTags(pruneTagList []string)
- func (g *UpgradeGraph) Records() []UpgradeRecord
- func (g *UpgradeGraph) Save(w io.Writer) error
- func (g *UpgradeGraph) SummarizeUpgradesFrom(fromNames ...string) []UpgradeHistory
- func (g *UpgradeGraph) SummarizeUpgradesTo(toNames ...string) []UpgradeHistory
- func (g *UpgradeGraph) UpgradesFrom(fromNames ...string) []UpgradeHistory
- func (g *UpgradeGraph) UpgradesTo(toNames ...string) []UpgradeHistory
- type UpgradeHistory
- type UpgradePrerelease
- type UpgradeRecord
- type UpgradeRelease
- type UpgradeResult
- type UpgradeVerification
- type UpgradeVersionBounds
- type VerificationJobsSummary
- type VerificationStatus
- type VerificationStatusMap
- type VerifyIssuesTagInfo
Constants ¶
const ( JiraCustomFieldEpicLink = "customfield_12311140" JiraCustomFieldFeatureLinkOnEpic = "customfield_12313140" JiraCustomFieldFeatureLink = "customfield_12318341" JiraCustomFieldReleaseNotes = "customfield_12310211" JiraTypeSubTask = "Sub-task" JiraTypeEpic = "Epic" JiraTypeFeature = "Feature" JiraTypeStory = "Story" JiraTypeMarketProblem = "Market Problem" )
const ( // ReleasePhasePending is assigned to release tags that are waiting for an update // payload image to be created and pushed. // // This phase may transition to Failed or Ready. ReleasePhasePending = "Pending" // ReleasePhaseFailed occurs when an update payload image cannot be created for // a given set of image mirrors. // // This phase is a terminal phase. Pending is the only input phase. ReleasePhaseFailed = "Failed" // ReleasePhaseReady represents an image tag that has a valid update payload image // created and pushed to the release image stream. It may not have completed all // possible verification. // // This phase may transition to Accepted or Rejected. Pending is the only input phase. ReleasePhaseReady = "Ready" // ReleasePhaseAccepted represents an image tag that has passed its verification // criteria and can safely be promoted to an external location. // // This phase is a terminal phase. Ready is the only input phase. ReleasePhaseAccepted = "Accepted" // ReleasePhaseRejected represents an image tag that has failed one or more of the // verification criteria. // // The controller will take no more action in this phase, but a human may set the // phase back to Ready to retry and the controller will attempt verification again. ReleasePhaseRejected = "Rejected" ReleaseVerificationStateSucceeded = "Succeeded" ReleaseVerificationStateFailed = "Failed" ReleaseVerificationStatePending = "Pending" ReleaseConfigModeStable = "Stable" ReleaseUpgradeFromPreviousMinor = "PreviousMinor" ReleaseUpgradeFromPreviousPatch = "PreviousPatch" ReleaseUpgradeFromPrevious = "Previous" ReleaseUpgradeFromPreviousMinus1 = "PreviousMinus1" // ReleaseAnnotationConfig is the JSON serialized representation of the ReleaseConfig // struct. It is only accepted on image streams. An image stream with this annotation // is considered an input image stream for creating releases. ReleaseAnnotationConfig = "release.openshift.io/config" ReleaseAnnotationKeep = "release.openshift.io/keep" ReleaseAnnotationGeneration = "release.openshift.io/generation" ReleaseAnnotationSource = "release.openshift.io/source" ReleaseAnnotationTarget = "release.openshift.io/target" ReleaseAnnotationName = "release.openshift.io/name" ReleaseAnnotationReleaseTag = "release.openshift.io/releaseTag" ReleaseAnnotationImageHash = "release.openshift.io/hash" ReleaseAnnotationPhase = "release.openshift.io/phase" ReleaseAnnotationCreationTimestamp = "release.openshift.io/creationTimestamp" ReleaseAnnotationVerify = "release.openshift.io/verify" // ReleaseAnnotationRewrite if true, the release controller should rewrite this release ReleaseAnnotationRewrite = "release.openshift.io/rewrite" // ReleaseAnnotationHasReleases an image stream with this annotation holds release tags ReleaseAnnotationHasReleases = "release.openshift.io/hasReleases" // ReleaseAnnotationMirrorImages if set, when rewriting a stable tag use the images locally ReleaseAnnotationMirrorImages = "release.openshift.io/mirrorImages" // ReleaseAnnotationJobPurpose when set on a job, controls which queue the job is notified on ReleaseAnnotationJobPurpose = "release.openshift.io/purpose" ReleaseAnnotationReason = "release.openshift.io/reason" ReleaseAnnotationMessage = "release.openshift.io/message" ReleaseAnnotationLog = "release.openshift.io/log" ReleaseAnnotationFromTag = "release.openshift.io/from-tag" ReleaseAnnotationToTag = "release.openshift.io/tag" // ReleaseAnnotationFromImageStream specifies the imagestream // a release was promoted from. It has the format <namespace>/<imagestream name> ReleaseAnnotationFromImageStream = "release.openshift.io/from-image-stream" // ReleaseAnnotationIssuesVerified indicates whether the release has been // processed by the JiraVerifier ReleaseAnnotationIssuesVerified = "release.openshift.io/issues-verified" // ReleaseAnnotationSoftDelete indicates automation external to the release controller can use this annotation to decide when, formatted with RFC3339, to clean up the tag ReleaseAnnotationSoftDelete = "release.openshift.io/soft-delete" // ReleaseAnnotationArchitecture indicates the architecture of the release ReleaseAnnotationArchitecture = "release.openshift.io/architecture" // ReleaseAnnotationBuildURL the URL of the corresponding ART build that produced this Release ReleaseAnnotationBuildURL = "release.openshift.io/build-url" // ReleaseAnnotationRuntimeBrewEvent the Brew event number of the corresponding ART build that produced this Release ReleaseAnnotationRuntimeBrewEvent = "release.openshift.io/runtime-brew-event" // ReleaseAnnotationInconsistency an imagestream with this annotation indicates an inconsistency ReleaseAnnotationInconsistency = "release.openshift.io/inconsistency" // ReleaseLabelVerify indicates the ProwJob is for release verification ReleaseLabelVerify = "release.openshift.io/verify" // ReleaseLabelPayload indicates the ReleasePayload of the release ReleaseLabelPayload = "release.openshift.io/payload" // ProwJobResultsURLPrefix the URL prefix for ProwJob Results ProwJobResultsURLPrefix = "https://prow.ci.openshift.org/view/gs/test-platform-results/logs" // ReleaseStreamAnnotationMode specifies the mode that the stream is currently operating in ReleaseStreamAnnotationMode = "release.openshift.io/mode" // ReleaseStreamModeLocked specifies that the stream is currently locked ReleaseStreamModeLocked = "locked" // ReleaseStreamModeUnlocked specifies that the stream is currently unlocked ReleaseStreamModeUnlocked = "unlocked" // ReleaseStreamAnnotationMessagePrefix specifies an HTML string to inject before the ReleaseConfig.Message or ReleaseStreamAnnotationMessageOverride ReleaseStreamAnnotationMessagePrefix = "release.openshift.io/messagePrefix" // ReleaseStreamAnnotationMessageOverride overrides the message specified in ReleaseConfig.Message ReleaseStreamAnnotationMessageOverride = "release.openshift.io/messageOverride" )
const ( PruneGraphPrintSecret = "secret" PruneGraphPrintDebug = "debug" )
Variables ¶
var ( ErrStreamNotFound = fmt.Errorf("no release configuration exists with the requested name") ErrStreamTagNotFound = fmt.Errorf("no tags exist within the release that satisfy the request") )
Functions ¶
func AllOptional ¶
func AllOptional(all map[string]ReleaseVerification, names ...string) bool
func CalculateBackoff ¶
func ContainsString ¶
func ContainsTagReference ¶
func ContainsTagReference(tags []*imagev1.TagReference, name string) bool
func CountUnreadyReleases ¶
func CountUnreadyReleases(release *Release, tags []*imagev1.TagReference) int
func CreateTerminalError ¶
func FindImageIDForTag ¶
func FindImageIDForTag(is *imagev1.ImageStream, name string) string
func FindImagePullSpec ¶
func FindImagePullSpec(is *imagev1.ImageStream, name string) string
func FindPublicImagePullSpec ¶
func FindPublicImagePullSpec(is *imagev1.ImageStream, name string) string
func FindSpecTag ¶
func FindSpecTag(tags []imagev1.TagReference, name string) *imagev1.TagReference
func FindTagReference ¶
func FindTagReference(is *imagev1.ImageStream, name string) *imagev1.TagReference
func GetImageInfo ¶
func GetImageInfo(releaseInfo ReleaseInfo, architecture, pullSpec string) (*imageInfoConfig, error)
func GetMirror ¶
func GetMirror(release *Release, releaseTagName string, lister *MultiImageStreamLister) (*imagev1.ImageStream, error)
func GetVerificationJobs ¶
func GetVerificationJobs(rcCache *lru.Cache, eventRecorder record.EventRecorder, lister *MultiImageStreamLister, release *Release, releaseTag *imagev1.TagReference, artSuffix string) (map[string]ReleaseVerification, error)
func HashSpecTagImageDigests ¶
func HashSpecTagImageDigests(is *imagev1.ImageStream) string
func IsTagEventConditionNotImported ¶
func IsTagEventConditionNotImported(event *imagev1.NamedTagEventList) bool
func IsTerminalError ¶
func LoadUpgradeGraph ¶
func LoadUpgradeGraph(graph *UpgradeGraph, secretClient kv1core.SecretInterface, ns, name string, stopCh <-chan struct{})
func MirrorName ¶
func NewDynamicSharedIndexInformer ¶
func NewDynamicSharedIndexInformer(client dynamic.NamespaceableResourceInterface, namespace string, resyncPeriod time.Duration, selector labels.Selector) cache.SharedIndexInformer
func NewLatestImageCache ¶
func SaveUpgradeGraph ¶
func SaveUpgradeGraph(buf *bytes.Buffer, graph *UpgradeGraph, secretClient kv1core.SecretInterface, ns, name string) error
func SemverParseTolerant ¶
semverParseTolerant works around https://github.com/blang/semver/issues/55 until it is resolved.
func SemverToMajorMinor ¶
func SortedRawReleaseTags ¶
func SortedRawReleaseTags(release *Release, phases ...string) []*imagev1.TagReference
SortedRawReleaseTags returns the tags for the given release in order of their creation if they are in one of the provided phases. Use sortedReleaseTags if you are trying to get the most appropriate recent tag. Intended for use only within the release.
func SortedReleaseTags ¶
func SortedReleaseTags(release *Release, phases ...string) []*imagev1.TagReference
SortedReleaseTags returns the tags for a given release in the most appropriate order - by creation date for iterative streams, by semantic version for stable streams. If phase is specified the list will be filtered.
func StringSliceContains ¶
func SyncGraphToSecret ¶
func SyncGraphToSecret(graph *UpgradeGraph, update bool, secretClient kv1core.SecretInterface, ns, name string, stopCh <-chan struct{})
func TagNames ¶
func TagNames(refs []*imagev1.TagReference) []string
func TransformJiraIssues ¶
func TransformJiraIssues(issues []jiraBaseClient.Issue, prMap map[string][]string, demoURLsMap map[string][]string) map[string]IssueDetails
func VerificationJobsWithRetries ¶
func VerificationJobsWithRetries(jobs map[string]ReleaseVerification, result VerificationStatusMap) ([]string, bool)
Types ¶
type APIRelease ¶
type APIRelease struct { // Name is the name of the release stream. Name string `json:"name"` // Tags is a list of all tags in the release sorted by semantic version, oldest to newest. Tags []APITag `json:"tags"` }
APIRelease contains information about a release stream.
type APIReleaseInfo ¶
type APIReleaseInfo struct { // Name is the name of the release tag. Name string `json:"name"` // Phase is the phase of the release tag. Phase string `json:"phase"` // Results is the status of the release verification jobs for this release tag Results *VerificationJobsSummary `json:"results,omitempty"` // UpgradesTo is the list of UpgradeHistory "to" this release tag UpgradesTo []UpgradeHistory `json:"upgradesTo,omitempty"` //UpgradesFrom is the list of UpgradeHistory "from" this release tag UpgradesFrom []UpgradeHistory `json:"upgradesFrom,omitempty"` //ChangeLog is the html representation of the changes included in this release tag ChangeLog []byte `json:"changeLog,omitempty"` //ChangeLogJson is the json representation of the changes included in this release tag ChangeLogJson ChangeLog `json:"changeLogJson,omitempty"` }
APIReleaseInfo encapsulates the release verification results and upgrade history for a release tag.
type APITag ¶
type APITag struct { // Name is the name of the tag. This is usually a semantic version. Name string `json:"name"` // Phase is the phase of the tag. Phase string `json:"phase"` // PullSpec can be used to retrieve the release image. PullSpec string `json:"pullSpec"` // DownloadURL is a link to the web page for downloading the tools. DownloadURL string `json:"downloadURL"` }
APITag contains information about a release tag in a stream.
type AggregatedProwJobVerification ¶
type AggregatedProwJobVerification struct { // ProwJob requires that the named ProwJob from the prow config pass before the // release is accepted. The job is run only one time and if it fails the release // is rejected. // Defaults to "release-openshift-release-analysis-aggregator" if not specified. ProwJob *ProwJobVerification `json:"prowJob,omitempty"` // AnalysisJobCount Number of asynchronous jobs to execute for release analysis. AnalysisJobCount int `json:"analysisJobCount,omitempty"` }
AggregatedProwJobVerification identifies the name of a prow job that will be used to aggregate the release analysis jobs.
func (*AggregatedProwJobVerification) DeepCopyInto ¶
func (in *AggregatedProwJobVerification) DeepCopyInto(out *AggregatedProwJobVerification)
type BugDetails ¶
type CachingReleaseInfo ¶
type CachingReleaseInfo struct {
// contains filtered or unexported fields
}
func (*CachingReleaseInfo) Bugs ¶
func (c *CachingReleaseInfo) Bugs(from, to string) ([]BugDetails, error)
func (*CachingReleaseInfo) ChangeLog ¶
func (c *CachingReleaseInfo) ChangeLog(from, to string, json bool) (string, error)
func (*CachingReleaseInfo) GetFeatureChildren ¶
func (*CachingReleaseInfo) ImageInfo ¶
func (c *CachingReleaseInfo) ImageInfo(image, archtecture string) (string, error)
func (*CachingReleaseInfo) IssuesInfo ¶
func (c *CachingReleaseInfo) IssuesInfo(changelog string) (string, error)
func (*CachingReleaseInfo) ReleaseInfo ¶
func (c *CachingReleaseInfo) ReleaseInfo(image string) (string, error)
func (*CachingReleaseInfo) UpgradeInfo ¶
func (c *CachingReleaseInfo) UpgradeInfo(image string) (ReleaseUpgradeInfo, error)
type ChangeLog ¶
type ChangeLog struct { From ChangeLogReleaseInfo `json:"from"` To ChangeLogReleaseInfo `json:"to"` Components []ChangeLogComponentInfo `json:"components,omitempty"` NewImages []ChangeLogImageInfo `json:"newImages,omitempty"` RemovedImages []ChangeLogImageInfo `json:"removedImages,omitempty"` RebuiltImages []ChangeLogImageInfo `json:"rebuiltImages,omitempty"` UpdatedImages []ChangeLogImageInfo `json:"updatedImages,omitempty"` }
ChangeLog represents the data structure that oc returns when providing a changelog in JSON format TODO: This is being carried from changes in openshift/oc. These changes should be removed if/when we bump up our k8s dependencies up to the latest/greatest version. We're currently pinned at: v0.24.2
type ChangeLogComponentInfo ¶
type ChangeLogImageInfo ¶
type ChangeLogImageInfo struct { Name string `json:"name"` Path string `json:"path"` ShortCommit string `json:"shortCommit,omitempty"` Commit string `json:"commit,omitempty"` ImageRef string `json:"imageRef,omitempty"` Commits []CommitInfo `json:"commits,omitempty"` FullChangeLog string `json:"fullChangeLog,omitempty"` }
type ChangeLogReleaseInfo ¶
type CheckConsistentImages ¶
type CheckConsistentImages struct { // Parent is the release stream to compare against. Parent string `json:"parent"` }
type CommitInfo ¶
type CommitInfo struct { Bugs map[string]string `json:"bugs,omitempty"` Issues map[string]string `json:"issues,omitempty"` Subject string `json:"subject,omitempty"` PullID int `json:"pullID,omitempty"` PullURL string `json:"pullURL,omitempty"` CommitID string `json:"commitID,omitempty"` CommitURL string `json:"commitURL,omitempty"` }
type Duration ¶
func (*Duration) UnmarshalJSON ¶
type ExecReleaseFiles ¶
type ExecReleaseFiles struct {
// contains filtered or unexported fields
}
func NewExecReleaseFiles ¶
func NewExecReleaseFiles(client kubernetes.Interface, restConfig *rest.Config, namespace string, name string, releaseNamespace string, registry string, imageNameFn func() (string, error)) *ExecReleaseFiles
NewExecReleaseFiles creates a stateful set, in the specified namespace, that provides cached access to downloaded installer images from the Release Status website. The provided name will prevent other instances of the stateful set from being created when created with an identical name. The releaseNamespace is used to ensure that the tools are downloaded from the correct namespace.
func (*ExecReleaseFiles) RefreshPod ¶
func (r *ExecReleaseFiles) RefreshPod() error
type ExecReleaseInfo ¶
type ExecReleaseInfo struct {
// contains filtered or unexported fields
}
func NewExecReleaseInfo ¶
func NewExecReleaseInfo(client kubernetes.Interface, restConfig *rest.Config, namespace string, name string, imageNameFn func() (string, error), jiraClient jira.Client) *ExecReleaseInfo
NewExecReleaseInfo creates a stateful set, in the specified namespace, that provides git changelogs to the Release Status website. The provided name will prevent other instances of the stateful set from being created when created with an identical name.
func (*ExecReleaseInfo) Bugs ¶
func (r *ExecReleaseInfo) Bugs(from, to string) ([]BugDetails, error)
func (*ExecReleaseInfo) ChangeLog ¶
func (r *ExecReleaseInfo) ChangeLog(from, to string, isJson bool) (string, error)
func (*ExecReleaseInfo) GetFeatureChildren ¶
func (*ExecReleaseInfo) GetIssuesWithChunks ¶
func (r *ExecReleaseInfo) GetIssuesWithChunks(issues []string) (result []jiraBaseClient.Issue, err error)
func (*ExecReleaseInfo) GetIssuesWithDemoLink ¶
func (r *ExecReleaseInfo) GetIssuesWithDemoLink(issues []string) (result []jiraBaseClient.Issue, err error)
func (*ExecReleaseInfo) GetRemoteLinksWithConcurrency ¶
func (r *ExecReleaseInfo) GetRemoteLinksWithConcurrency(issues []string) (result map[string][]string, err error)
func (*ExecReleaseInfo) ImageInfo ¶
func (r *ExecReleaseInfo) ImageInfo(image, architecture string) (string, error)
func (*ExecReleaseInfo) IssuesInfo ¶
func (r *ExecReleaseInfo) IssuesInfo(changelog string) (string, error)
func (*ExecReleaseInfo) JiraRecursiveGet ¶
func (r *ExecReleaseInfo) JiraRecursiveGet(issues []jiraBaseClient.Issue, allIssues *[]jiraBaseClient.Issue, visited map[string]bool, limit int) error
func (*ExecReleaseInfo) ReleaseInfo ¶
func (r *ExecReleaseInfo) ReleaseInfo(image string) (string, error)
func (*ExecReleaseInfo) UpgradeInfo ¶
func (r *ExecReleaseInfo) UpgradeInfo(image string) (ReleaseUpgradeInfo, error)
type IssueDetails ¶
type MultiImageStreamLister ¶
type MultiImageStreamLister struct {
Listers map[string]imagelisters.ImageStreamNamespaceLister
}
MultiImageStreamLister uses multiple independent namespace listers to simulate a full lister so that multiple namespaces can be watched for image streams.
func (*MultiImageStreamLister) ImageStreams ¶
func (l *MultiImageStreamLister) ImageStreams(ns string) imagelisters.ImageStreamNamespaceLister
func (*MultiImageStreamLister) List ¶
func (l *MultiImageStreamLister) List(label labels.Selector) ([]*imagev1.ImageStream, error)
type MultiReleasePayloadLister ¶
type MultiReleasePayloadLister struct {
Listers map[string]releasepayloadlisters.ReleasePayloadNamespaceLister
}
MultiReleasePayloadLister uses multiple independent namespace listers to simulate a full lister so that multiple namespaces can be watched for releasepayloads.
func (*MultiReleasePayloadLister) List ¶
func (l *MultiReleasePayloadLister) List(label labels.Selector) ([]*v1alpha1.ReleasePayload, error)
func (*MultiReleasePayloadLister) ReleasePayloads ¶
func (l *MultiReleasePayloadLister) ReleasePayloads(ns string) releasepayloadlisters.ReleasePayloadNamespaceLister
type NewestSemVerFromSummaries ¶
type NewestSemVerFromSummaries struct {
// contains filtered or unexported fields
}
func NewNewestSemVerFromSummaries ¶
func NewNewestSemVerFromSummaries(summaries []UpgradeHistory) NewestSemVerFromSummaries
func (NewestSemVerFromSummaries) Len ¶
func (s NewestSemVerFromSummaries) Len() int
func (NewestSemVerFromSummaries) Less ¶
func (s NewestSemVerFromSummaries) Less(i, j int) bool
func (NewestSemVerFromSummaries) Swap ¶
func (s NewestSemVerFromSummaries) Swap(i, j int)
type NewestSemVerToSummaries ¶
type NewestSemVerToSummaries struct {
// contains filtered or unexported fields
}
func NewNewestSemVerToSummaries ¶
func NewNewestSemVerToSummaries(summaries []UpgradeHistory) NewestSemVerToSummaries
func (NewestSemVerToSummaries) Len ¶
func (s NewestSemVerToSummaries) Len() int
func (NewestSemVerToSummaries) Less ¶
func (s NewestSemVerToSummaries) Less(i, j int) bool
func (NewestSemVerToSummaries) Swap ¶
func (s NewestSemVerToSummaries) Swap(i, j int)
type ProwJobVerification ¶
type ProwJobVerification struct { // Name of the prow job to verify. Name string `json:"name"` }
ProwJobVerification identifies the name of a prow job that will be used to validate the release.
func (*ProwJobVerification) DeepCopyInto ¶
func (in *ProwJobVerification) DeepCopyInto(out *ProwJobVerification)
type PublishStreamReference ¶
type PublishStreamReference struct { // Name is the name of the release image stream to update. Required. Name string `json:"name"` // Namespace is the namespace of the release image stream to update. If left empty // it will default to the same namespace as the release image stream. Namespace string `json:"namespace"` // Tags if set will limit the set of tags that are published. Tags []string `json:"tags"` // ExcludeTags if set will explicitly not publish these tags. Is applied after the // tags field is checked. ExcludeTags []string `json:"excludeTags"` }
PublishStreamReference updates another image stream with spec tags that reference the images that were verified.
type PublishTagReference ¶
type PublishTagReference struct { // Name is the name of the release image stream tag that will be updated to point to // (reference) the release tag. Name string `json:"name"` }
PublishTagReference ensures that the release image stream has a tag that points to the most recent release.
type PublishVerifyIssues ¶
type PublishVerifyIssues struct { // PreviousRelease points to the last release created before the imagestream // being published was created. It is used to verify jira issues on the oldest tag // in the release being published. PreviousReleaseTag *VerifyIssuesTagInfo `json:"previousReleaseTag"` }
PublishVerifyIssues marks jira issue fixed by this tag as VERIFIED in Jira if the QA contact reviewed and approved the bugfix PR
type Release ¶
type Release struct { // Source is the image stream that the Config was loaded from and holds all // images that will compose the release. Source *imagev1.ImageStream // Target is the image stream that the release tag will be pushed to. It is // modified and updated during processing by this controller to allow multiple // release modifications in a single 'sync' call. Target *imagev1.ImageStream // Config holds the release configuration parsed off of Source. Config *ReleaseConfig }
Release holds information about the release used during processing.
func LatestForStream ¶
func LatestForStream(rcCache *lru.Cache, eventRecorder record.EventRecorder, lister *MultiImageStreamLister, streamName string, constraint semver.Range, relativeIndex int, versionPrefix string) (*Release, *imagev1.TagReference, error)
func ReleaseDefinition ¶
func ReleaseDefinition(is *imagev1.ImageStream, releaseConfigCache *lru.Cache, eventRecorder record.EventRecorder, releaseLister MultiImageStreamLister) (*Release, bool, error)
func (*Release) HasInconsistencies ¶
type ReleaseCandidate ¶
type ReleaseCandidate struct { ReleasePromoteJobParameters CreationTime string `json:"creationTime,omitempty"` Tag *imagev1.TagReference `json:"tag,omitempty"` }
type ReleaseCandidateList ¶
type ReleaseCandidateList struct {
Items []*ReleaseCandidate `json:"items"`
}
type ReleaseCheck ¶
type ReleaseCheck struct { // ConsistentImages verifies that the images in this release have not drifted // significantly from the referenced parent and that no significant disparities // exist. ConsistentImages *CheckConsistentImages `json:"consistentImages"` }
type ReleaseConfig ¶
type ReleaseConfig struct { // Name is a required field and is used to associate release tags back to the input. Name string `json:"name"` // Message is a markdown string that is injected at the top of the release listing // to describe the purpose of this stream. Message string `json:"message"` // Hide indicates this release should be visually less important on the status pages. Hide bool `json:"hide"` // EndOfLife indicates this release stream should be no longer be monitored or // displayed by the release-controller EndOfLife bool `json:"endOfLife"` // As defines what this image stream provides. The default value is "Integration" // and the images in the image stream will be used to build payloads. An optional // mode is "Stable" and tags are assumed to be release payloads that should be promoted // and published elsewhere. When choosing Stable, a user will tag a candidate release // image in as a new tag to this image stream and the controller will rebuild and // update the image with the appropriate name, metadata, and content. As string `json:"as"` // To is the image stream where release tags will be created when the As field is // Integration. This field is ignored when As is Stable. To string `json:"to"` // MaxUnreadyReleases blocks creating new releases if there are more than this many // releases in non-terminal (Failed, Accepted, Rejected) states. MaxUnreadyReleases int `json:"maxUnreadyReleases"` // MinCreationIntervalSeconds controls how quickly multiple releases can be created. // Releases will be created no more rapidly than this interval. MinCreationIntervalSeconds int `json:"minCreationIntervalSeconds"` // ReferenceMode describes how the release image will refer to the origin. If empty // or 'public' images will be copied and no source location will be preserved. If // `source` then the controller will attempt to keep the originating reference in place. ReferenceMode string `json:"referenceMode"` // PullSecretName is the name of a pull secret in the release job namespace to mount // into the pod that will create the release. The secret must contain a single file // config.json with a valid Docker auths array. PullSecretName string `json:"pullSecretName"` // MirrorPrefix is the prefix applied to the release mirror image stream. If unset, // MirrorPrefix is the name of the source image stream + the date. MirrorPrefix string `json:"mirrorPrefix"` // OverrideCLIImage may be used to override the location where the CLI image is // located for actions on this image stream. It is useful when a bug prevents a // historical image from being used with newer functionality. OverrideCLIImage string `json:"overrideCLIImage"` // Expires is the amount of time as a golang duration before Accepted release tags // should be expired and removed. If unset, tags are not expired. Expires Duration `json:"expires"` // Verify is a map of short names to verification steps that must succeed before the // release is Accepted. Failures for some job types will cause the release to be // rejected. Verify map[string]ReleaseVerification `json:"verify"` // Periodic is a map of short names to verification steps that run based on a cron // or interval timer. Periodic map[string]ReleasePeriodic `json:"periodic"` // Publish is a map of short names to publish steps that will be performed after // the release is Accepted. Some publish steps are continuously maintained, others // may only be performed once. Publish map[string]ReleasePublish `json:"publish"` // Check is a map of short names to check routines that report additional information // about the health or quality of this stream to the user interface. Check map[string]ReleaseCheck `json:"check"` // Upgrade is a map of short names of upgrade tests to launch for releases after they // have been promoted into a "Stable" stream. Upgrade map[string]UpgradeVerification `json:"upgrade"` // AlternateImageRepository is the full path to an external Image Repository where we // will mirror Accepted releases to. // For example: // "alternateImageRepository": "quay.io/openshift-release-dev/dev-release" AlternateImageRepository string `json:"alternateImageRepository"` }
ReleaseConfig is serialized in JSON as the release.openshift.io/config annotation on image streams that wish to have release payloads generated from them. It modifies how the release is calculated.
func ParseReleaseConfig ¶
func ParseReleaseConfig(data string, configCache *lru.Cache) (*ReleaseConfig, error)
type ReleaseInfo ¶
type ReleaseInfo interface { // Bugs returns a list of jira bug IDs for bugs fixed between the provided release tags Bugs(from, to string) ([]BugDetails, error) ChangeLog(from, to string, json bool) (string, error) ReleaseInfo(image string) (string, error) UpgradeInfo(image string) (ReleaseUpgradeInfo, error) ImageInfo(image, architecture string) (string, error) IssuesInfo(changelog string) (string, error) GetFeatureChildren(featuresList []string, validityPeriod time.Duration) (string, error) }
func NewCachingReleaseInfo ¶
func NewCachingReleaseInfo(info ReleaseInfo, size int64, architecture string) ReleaseInfo
type ReleasePeriodic ¶
type ReleasePeriodic struct { // Interval to wait between two runs of the job. Interval string `json:"interval,omitempty"` // Cron representation of job trigger time Cron string `json:"cron,omitempty"` // Upgrade is true if this periodic should be an upgrade job. // The default UpgradeFrom for stable streams is PreviousMicro and the default // for other types of streams is PreviousMinus1. Upgrade bool `json:"upgrade"` // UpgradeFrom, if set, describes a different default upgrade source. The supported // values are: // // Previous - selects the latest accepted tag from the current stream // PreviousMinus1 - selects the second latest accepted tag from the current stream // PreviousMicro - selects the latest accepted patch version from the current minor // version (4.2.1 will select the latest accepted 4.2.z tag). // PreviousMinor - selects the latest accepted patch version from the previous minor // version (4.2.1 will select the latest accepted 4.1.z tag). // // If no matching target exists the job will be a no-op. UpgradeFrom string `json:"upgradeFrom"` // UpgradeFromRelease, if set, describes the release that should be used as the inital // release in upgrade periodic jobs. UpgradeFromRelease *UpgradeRelease `json:"upgradeFromRelease"` // ProwJob requires that the named ProwJob from the prow config pass before the // release is accepted. The job is run only one time and if it fails the release // is rejected. ProwJob *ProwJobVerification `json:"prowJob"` }
ReleasePeriodic is a job that runs on the speicifed cron or interval period as a release informer.
type ReleasePromoteJobParameters ¶
type ReleasePromoteJobParameters struct { // Parameters for promotion job described at // https://github.com/openshift/aos-cd-jobs/blob/master/jobs/build/release/Jenkinsfile#L20-L81 // Imagestream tag which is to be promoted to the new release FromTag string `json:"fromTag"` // Name of new release to be created by the promote job Name string `json:"name"` // Optional: versions this can upgrade from UpgradeFrom []string `json:"upgradeFrom,omitempty"` }
type ReleasePublish ¶
type ReleasePublish struct { // Disabled will prevent this publish step from being run. Disabled bool `json:"disabled"` // TagRef updates the named tag in the release image stream to point at the release. TagRef *PublishTagReference `json:"tagRef"` // ImageStreamRef copies all images to another image stream in one transaction. ImageStreamRef *PublishStreamReference `json:"imageStreamRef"` // VerifyIssue marks jira issues fixed by this tag as VERIFIED in Jira if the QA contact reviewed and approved the bugfix PR VerifyIssues *PublishVerifyIssues `json:"verifyIssues"` }
ReleasePublish defines one action to take when a release is Accepted.
type ReleaseUpgradeInfo ¶
type ReleaseUpgradeInfo struct {
Metadata *ReleaseUpgradeMetadata `json:"metadata"`
}
type ReleaseUpgradeMetadata ¶
type ReleaseVerification ¶
type ReleaseVerification struct { // Disabled will prevent this verification from being considered as blocking Disabled bool `json:"disabled"` // Optional verifications are run, but failures will not cause the release to // be rejected. Optional bool `json:"optional"` // Upgrade is true if this verification should be used to verify upgrades. // The default UpgradeFrom for stable streams is PreviousMicro and the default // for other types of streams is Previous. Upgrade bool `json:"upgrade"` // UpgradeFrom, if set, describes a different default upgrade source. The supported // values are: // // Previous - selects the latest accepted tag from the current stream // PreviousMinus1 - selects the second latest accepted tag from the current stream // PreviousMicro - selects the latest accepted patch version from the current minor // version (4.2.1 will select the latest accepted 4.2.z tag). // PreviousMinor - selects the latest accepted patch version from the previous minor // version (4.2.1 will select the latest accepted 4.1.z tag). // // If no matching target exists the job will be a no-op. UpgradeFrom string `json:"upgradeFrom"` // UpgradeFromRelease, if set, describes the release that should be used as the inital // release in upgrade verification jobs. UpgradeFromRelease *UpgradeRelease `json:"upgradeFromRelease"` // ProwJob requires that the named ProwJob from the prow config pass before the // release is accepted. The job is run only one time and if it fails the release // is rejected. ProwJob *ProwJobVerification `json:"prowJob"` // Maximum retry attempts for the job. Defaults to 0 - do not retry on fail MaxRetries int `json:"maxRetries,omitempty"` // AggregatedProwJob defines the prow job used to run release analysis verification AggregatedProwJob *AggregatedProwJobVerification `json:"aggregatedProwJob,omitempty"` // MultiJobAnalysis indicates the job is used to analyze results from multiple other // job runs from the payload. Thus, it needs some environment variables set, such as // PAYLOAD_TAG. MultiJobAnalysis bool `json:"multiJobAnalysis"` }
ReleaseVerification is a task that must be completed before a release is marked as Accepted. When some tasks fail the release will be marked as Rejected.
func (*ReleaseVerification) DeepCopy ¶
func (in *ReleaseVerification) DeepCopy() *ReleaseVerification
func (*ReleaseVerification) DeepCopyInto ¶
func (in *ReleaseVerification) DeepCopyInto(out *ReleaseVerification)
type SemanticVersion ¶
type SemanticVersion struct { Version *semver.Version Tag *imagev1.TagReference }
func FirstTagWithMajorMinorSemanticVersion ¶
func FirstTagWithMajorMinorSemanticVersion(versions SemanticVersions, version semver.Version) *SemanticVersion
type SemanticVersions ¶
type SemanticVersions []SemanticVersion
func NewSemanticVersions ¶
func NewSemanticVersions(tags []*imagev1.TagReference) SemanticVersions
func UnsortedSemanticReleaseTags ¶
func UnsortedSemanticReleaseTags(release *Release, phases ...string) SemanticVersions
UnsortedSemanticReleaseTags returns the tags in the release as a sortable array, but does not sort the array. If phases is specified only tags in the provided phases are returned.
func (SemanticVersions) Len ¶
func (v SemanticVersions) Len() int
func (SemanticVersions) Less ¶
func (v SemanticVersions) Less(i, j int) bool
func (SemanticVersions) Swap ¶
func (v SemanticVersions) Swap(i, j int)
func (SemanticVersions) Tags ¶
func (v SemanticVersions) Tags() []*imagev1.TagReference
type StableReferences ¶
type StableReferences struct {
Releases StableReleases
}
func GetStableReleases ¶
func GetStableReleases(rcCache *lru.Cache, eventRecorder record.EventRecorder, lister *MultiImageStreamLister) (*StableReferences, error)
type StableRelease ¶
type StableRelease struct { Release *Release Version semver.Version Versions SemanticVersions }
type StableReleases ¶
type StableReleases []StableRelease
func (StableReleases) Len ¶
func (v StableReleases) Len() int
func (StableReleases) Less ¶
func (v StableReleases) Less(i, j int) bool
func (StableReleases) Swap ¶
func (v StableReleases) Swap(i, j int)
type TagReferencesByAge ¶
type TagReferencesByAge []*imagev1.TagReference
TagReferencesByAge returns the newest tag first, the oldest tag last
func (TagReferencesByAge) Len ¶
func (a TagReferencesByAge) Len() int
func (TagReferencesByAge) Less ¶
func (a TagReferencesByAge) Less(i, j int) bool
func (TagReferencesByAge) Swap ¶
func (a TagReferencesByAge) Swap(i, j int)
type TerminalError ¶
type TerminalError struct {
// contains filtered or unexported fields
}
TerminalError is a wrapper that indicates the error should be logged but the queue key should not be requeued.
type UpgradeCandidate ¶
type UpgradeCandidate struct { // Stream is the stream from which we pick the latest candidate Stream string `json:"stream"` // Version is the minor version to search for Version string `json:"version"` // Relative optionally specifies how old of a release // is requested from this stream. For instance, a value // of 1 will resolve to the previous validated release // for this stream. Relative int `json:"relative,omitempty"` }
UpgradeCandidate describes a validated candidate release payload
type UpgradeGraph ¶
type UpgradeGraph struct { To map[string]map[string]*UpgradeHistory From map[string]sets.Set[string] Architecture string // contains filtered or unexported fields }
func NewUpgradeGraph ¶
func NewUpgradeGraph(architecture string) *UpgradeGraph
func (*UpgradeGraph) Add ¶
func (g *UpgradeGraph) Add(fromTag, toTag string, results ...UpgradeResult)
func (*UpgradeGraph) Histories ¶
func (g *UpgradeGraph) Histories() []UpgradeHistory
func (*UpgradeGraph) OrderedRecords ¶
func (g *UpgradeGraph) OrderedRecords() []UpgradeRecord
func (*UpgradeGraph) PrettyPrint ¶
func (g *UpgradeGraph) PrettyPrint()
func (*UpgradeGraph) PrintSecretPayload ¶
func (g *UpgradeGraph) PrintSecretPayload()
func (*UpgradeGraph) PruneTags ¶
func (g *UpgradeGraph) PruneTags(pruneTagList []string)
func (*UpgradeGraph) Records ¶
func (g *UpgradeGraph) Records() []UpgradeRecord
func (*UpgradeGraph) SummarizeUpgradesFrom ¶
func (g *UpgradeGraph) SummarizeUpgradesFrom(fromNames ...string) []UpgradeHistory
func (*UpgradeGraph) SummarizeUpgradesTo ¶
func (g *UpgradeGraph) SummarizeUpgradesTo(toNames ...string) []UpgradeHistory
func (*UpgradeGraph) UpgradesFrom ¶
func (g *UpgradeGraph) UpgradesFrom(fromNames ...string) []UpgradeHistory
func (*UpgradeGraph) UpgradesTo ¶
func (g *UpgradeGraph) UpgradesTo(toNames ...string) []UpgradeHistory
type UpgradeHistory ¶
type UpgradePrerelease ¶
type UpgradePrerelease struct { // VersionBounds describe the allowable version bounds to search in VersionBounds UpgradeVersionBounds `json:"version_bounds"` }
UpgradePrerelease describes a validated release payload before it is exposed
type UpgradeRecord ¶
type UpgradeRecord struct { From string `json:"from"` To string `json:"to"` Results []UpgradeResult `json:"results"` }
type UpgradeRelease ¶
type UpgradeRelease struct { // Candidate describes a candidate release payload Candidate *UpgradeCandidate `json:"candidate,omitempty"` // Prerelease describes a yet-to-be released payload Prerelease *UpgradePrerelease `json:"prerelease,omitempty"` // Official describes a released payload Official *citools.Release `json:"release,omitempty"` }
type UpgradeResult ¶
type UpgradeVerification ¶
type UpgradeVerification struct { // Disabled will prevent this verification from being used to launch any upgrade // verification tests. Disabled bool `json:"disabled"` // ProwJob the name of the ProwJob, from prow's job configuration, that // specifies the upgrade job definition to launch. ProwJob *ProwJobVerification `json:"prowJob"` }
UpgradeVerification is an upgrade task that will be executed against releases, as they are promoted into a stable channel.
type UpgradeVersionBounds ¶
UpgradeVersionBounds describe the upper and lower bounds on a version search
func (*UpgradeVersionBounds) Query ¶
func (b *UpgradeVersionBounds) Query() string
type VerificationJobsSummary ¶
type VerificationJobsSummary struct { BlockingJobs VerificationStatusMap `json:"blockingJobs,omitempty"` InformingJobs VerificationStatusMap `json:"informingJobs,omitempty"` PendingJobs VerificationStatusMap `json:"pendingJobs,omitempty"` }
VerificationJobsSummary an organized, by job type, collection of VerificationStatusMap objects
type VerificationStatus ¶
type VerificationStatus struct { State string `json:"state"` URL string `json:"url"` Retries int `json:"retries,omitempty"` TransitionTime *metav1.Time `json:"transitionTime,omitempty"` }
func ProwJobVerificationStatus ¶
func ProwJobVerificationStatus(obj *unstructured.Unstructured) (*VerificationStatus, bool)
type VerificationStatusMap ¶
type VerificationStatusMap map[string]*VerificationStatus
func (VerificationStatusMap) Failures ¶
func (m VerificationStatusMap) Failures() ([]string, bool)
func (VerificationStatusMap) Incomplete ¶
func (m VerificationStatusMap) Incomplete(required map[string]ReleaseVerification) ([]string, bool)
type VerifyIssuesTagInfo ¶
type VerifyIssuesTagInfo struct { // Namespace is the namespace where the imagestream resides. Namespace string `json:"namespace"` // Name is the name of the imagestream Name string `json:"name"` // Tag is the tag that is being referenced in the image stream Tag string `json:"tag"` }
VerifyIssuesTagInfo contains the necessary data to get a tag reference as needed in the jira verification support.