bumper

package
v0.0.0-...-ba98ca2 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bump

func Bump[T any](b Bumper[T], o *BumpingOptions) error

Bump bumps files using the Bumpers b according to the BumpingOptions.

func BumpObject

func BumpObject[T any](b Bumper[T], file, outDir string) error

func ReplaceWithNextVersion

func ReplaceWithNextVersion(line string, major int) (string, error)

Find every {major}.{minor} reference into 'line' and the replace it with {major}.{minor+1}

func ReplaceWithNextVersionInPlace

func ReplaceWithNextVersionInPlace(line *string, major int) error

Types

type AggregatedProwJobVerification

type AggregatedProwJobVerification struct {
	ProwJob          *ProwJobVerification `json:"prowJob,omitempty"`
	AnalysisJobCount int                  `json:"analysisJobCount,omitempty"`
}

type Bumper

type Bumper[T any] interface {
	GetFiles() ([]string, error)

	Unmarshall(file string) (T, error)

	BumpFilename(filename string, obj T) (string, error)

	BumpContent(obj T) (T, error)

	Marshall(obj T, bumpedFilename, dir string) error
}

type BumpingOptions

type BumpingOptions struct {
	OutDir string
}

type CheckConsistentImages

type CheckConsistentImages struct {
	Parent string `json:"parent,omitempty"`
}

type GeneratedReleaseGatingJobsBumper

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

func NewGeneratedReleaseGatingJobsBumper

func NewGeneratedReleaseGatingJobsBumper(ocpVer, jobsDir string, newIntervalValue int) (*GeneratedReleaseGatingJobsBumper, error)

func (*GeneratedReleaseGatingJobsBumper) BumpContent

Candidate bumping fields: .base_images.*.name .releases.*.{release,candidate}.version .releases.*.prerelease.version_bounds.{lower,upper} .tests[].steps.test[].env[].default

func (*GeneratedReleaseGatingJobsBumper) BumpFilename

func (b *GeneratedReleaseGatingJobsBumper) BumpFilename(
	filename string,
	dataWithInfo *cioperatorcfg.DataWithInfo) (string, error)

func (*GeneratedReleaseGatingJobsBumper) GetFiles

func (b *GeneratedReleaseGatingJobsBumper) GetFiles() ([]string, error)

func (*GeneratedReleaseGatingJobsBumper) Marshall

func (b *GeneratedReleaseGatingJobsBumper) Marshall(dataWithInfo *cioperatorcfg.DataWithInfo, bumpedFilename, dir string) error

func (*GeneratedReleaseGatingJobsBumper) Unmarshall

type ProwJobVerification

type ProwJobVerification struct {
	Name string `json:"name,omitempty"`
}

type PublishStreamReference

type PublishStreamReference struct {
	Name        string   `json:"name,omitempty"`
	Namespace   string   `json:"namespace,omitempty"`
	Tags        []string `json:"tags,omitempty"`
	ExcludeTags []string `json:"excludeTags,omitempty"`
}

type PublishTagReference

type PublishTagReference struct {
	Name string `json:"name,omitempty"`
}

type PublishVerifyBugs

type PublishVerifyBugs struct {
	PreviousReleaseTag *VerifyBugsTagInfo `json:"previousReleaseTag,omitempty"`
}

type ReleaseCheck

type ReleaseCheck struct {
	ConsistentImages *CheckConsistentImages `json:"consistentImages,omitempty"`
}

type ReleaseConfig

type ReleaseConfig struct {
	Name                       string                         `json:"name,omitempty"`
	To                         string                         `json:"to,omitempty"`
	Message                    string                         `json:"message,omitempty"`
	MirrorPrefix               string                         `json:"mirrorPrefix,omitempty"`
	Expires                    string                         `json:"expires,omitempty"`
	MaxUnreadyReleases         int                            `json:"maxUnreadyReleases,omitempty"`
	MinCreationIntervalSeconds int                            `json:"minCreationIntervalSeconds,omitempty"`
	ReferenceMode              string                         `json:"referenceMode,omitempty"`
	PullSecretName             string                         `json:"pullSecretName,omitempty"`
	Hide                       bool                           `json:"hide,omitempty"`
	EndOfLife                  bool                           `json:"endOfLife,omitempty"`
	As                         string                         `json:"as,omitempty"`
	OverrideCLIImage           string                         `json:"overrideCLIImage,omitempty"`
	Check                      map[string]ReleaseCheck        `json:"check"`
	Publish                    map[string]ReleasePublish      `json:"publish"`
	Verify                     map[string]ReleaseVerification `json:"verify"`
	Periodic                   map[string]ReleasePeriodic     `json:"periodic,omitempty"`
}

type ReleaseControllerConfigBumper

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

func NewReleaseControllerConfigBumper

func NewReleaseControllerConfigBumper(ocpVer, jobsDir string) (*ReleaseControllerConfigBumper, error)

func (*ReleaseControllerConfigBumper) BumpContent

func (b *ReleaseControllerConfigBumper) BumpContent(releaseConfig *ReleaseConfig) (*ReleaseConfig, error)

Candidate bumping fields:

.message
.mirrorPrefix
.name
.overrideCLIImage
.check.*.consistentImages.parent
.publish.*
	.verifyBugs.previousReleaseTag
		.name
		.tag
	.imageStreamRef.name
	.tagRef.name
.verify
	.* (this represents the name of the job)
	.*.prowJob.name

func (*ReleaseControllerConfigBumper) BumpFilename

func (b *ReleaseControllerConfigBumper) BumpFilename(filename string, _ *ReleaseConfig) (string, error)

func (*ReleaseControllerConfigBumper) GetFiles

func (b *ReleaseControllerConfigBumper) GetFiles() ([]string, error)

func (*ReleaseControllerConfigBumper) Marshall

func (b *ReleaseControllerConfigBumper) Marshall(releaseConfig *ReleaseConfig,
	bumpedFilename, dir string) error

func (*ReleaseControllerConfigBumper) Unmarshall

func (b *ReleaseControllerConfigBumper) Unmarshall(file string) (*ReleaseConfig, error)

type ReleasePeriodic

type ReleasePeriodic struct {
	Interval           string               `json:"interval,omitempty"`
	Cron               string               `json:"cron,omitempty"`
	Upgrade            bool                 `json:"upgrade,omitempty"`
	UpgradeFrom        string               `json:"upgradeFrom,omitempty"`
	UpgradeFromRelease *UpgradeRelease      `json:"upgradeFromRelease,omitempty"`
	ProwJob            *ProwJobVerification `json:"prowJob,omitempty"`
}

type ReleasePublish

type ReleasePublish struct {
	Disabled       bool                    `json:"disabled,omitempty"`
	TagRef         *PublishTagReference    `json:"tagRef,omitempty"`
	ImageStreamRef *PublishStreamReference `json:"imageStreamRef,omitempty"`
	VerifyBugs     *PublishVerifyBugs      `json:"verifyBugs,omitempty"`
}

type ReleaseVerification

type ReleaseVerification struct {
	MaxRetries         int                            `json:"maxRetries,omitempty"`
	Optional           bool                           `json:"optional,omitempty"`
	ProwJob            *ProwJobVerification           `json:"prowJob,omitempty"`
	Disabled           bool                           `json:"disabled,omitempty"`
	Upgrade            bool                           `json:"upgrade,omitempty"`
	UpgradeFrom        string                         `json:"upgradeFrom,omitempty"`
	UpgradeFromRelease *UpgradeRelease                `json:"upgradeFromRelease,omitempty"`
	AggregatedProwJob  *AggregatedProwJobVerification `json:"aggregatedProwJob,omitempty"`
}

type UpgradeCandidate

type UpgradeCandidate struct {
	Stream   string `json:"stream,omitempty"`
	Version  string `json:"version,omitempty"`
	Relative int    `json:"relative,omitempty"`
}

type UpgradePrerelease

type UpgradePrerelease struct {
	VersionBounds UpgradeVersionBounds `json:"version_bounds,omitempty"`
}

type UpgradeRelease

type UpgradeRelease struct {
	Candidate  *UpgradeCandidate  `json:"candidate,omitempty"`
	Prerelease *UpgradePrerelease `json:"prerelease,omitempty"`
	Official   *api.Release       `json:"release,omitempty"`
}

type UpgradeVersionBounds

type UpgradeVersionBounds struct {
	Lower string `json:"lower,omitempty"`
	Upper string `json:"upper,omitempty"`
}

type VerifyBugsTagInfo

type VerifyBugsTagInfo struct {
	Namespace string `json:"namespace,omitempty"`
	Name      string `json:"name,omitempty"`
	Tag       string `json:"tag,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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