Documentation ¶
Index ¶
- Constants
- type DefaultRelease
- func (d *DefaultRelease) CheckPrerequisites() error
- func (d *DefaultRelease) CheckProvenance() error
- func (d *DefaultRelease) CheckReleaseBranchState() error
- func (d *DefaultRelease) CreateAnnouncement() error
- func (d *DefaultRelease) GenerateReleaseVersion() error
- func (d *DefaultRelease) InitLogFile() error
- func (d *DefaultRelease) InitState()
- func (d *DefaultRelease) PrepareWorkspace() error
- func (d *DefaultRelease) PushArtifacts() error
- func (d *DefaultRelease) PushGitObjects() error
- func (d *DefaultRelease) SetImpl(impl releaseImpl)
- func (d *DefaultRelease) SetState(state *ReleaseState)
- func (d *DefaultRelease) Submit(stream bool) error
- func (d *DefaultRelease) UpdateGitHubPage() error
- func (d *DefaultRelease) ValidateOptions() error
- type DefaultStage
- func (d *DefaultStage) Build() error
- func (d *DefaultStage) CheckPrerequisites() error
- func (d *DefaultStage) CheckReleaseBranchState() error
- func (d *DefaultStage) GenerateBillOfMaterials() error
- func (d *DefaultStage) GenerateChangelog() error
- func (d *DefaultStage) GenerateReleaseVersion() error
- func (d *DefaultStage) InitLogFile() error
- func (d *DefaultStage) InitState()
- func (d *DefaultStage) PrepareWorkspace() error
- func (d *DefaultStage) SetImpl(impl stageImpl)
- func (d *DefaultStage) SetState(state *StageState)
- func (d *DefaultStage) StageArtifacts() error
- func (d *DefaultStage) State() *StageState
- func (d *DefaultStage) Submit(stream bool) error
- func (d *DefaultStage) TagRepository() error
- func (d *DefaultStage) ValidateOptions() error
- func (d *DefaultStage) VerifyArtifacts() error
- type Options
- type Release
- type ReleaseOptions
- type ReleaseState
- type Stage
- type StageOptions
- type StageState
- type State
Constants ¶
const (
// The default license for all artifacts.
LicenseIdentifier = "Apache-2.0"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultRelease ¶
type DefaultRelease struct {
// contains filtered or unexported fields
}
DefaultRelease is the default staging implementation used in production.
func NewDefaultRelease ¶
func NewDefaultRelease(options *ReleaseOptions) *DefaultRelease
NewDefaultRelease creates a new defaultRelease instance.
func (*DefaultRelease) CheckPrerequisites ¶
func (d *DefaultRelease) CheckPrerequisites() error
func (*DefaultRelease) CheckProvenance ¶ added in v0.12.0
func (d *DefaultRelease) CheckProvenance() error
CheckProvenance verifies the artifacts staged in the release bucket by verifying the provenance metadata generated during the stage run.
func (*DefaultRelease) CheckReleaseBranchState ¶
func (d *DefaultRelease) CheckReleaseBranchState() error
func (*DefaultRelease) CreateAnnouncement ¶
func (d *DefaultRelease) CreateAnnouncement() error
CreateAnnouncement creates the announcement.html file.
func (*DefaultRelease) GenerateReleaseVersion ¶
func (d *DefaultRelease) GenerateReleaseVersion() error
func (*DefaultRelease) InitLogFile ¶
func (d *DefaultRelease) InitLogFile() error
func (*DefaultRelease) InitState ¶
func (d *DefaultRelease) InitState()
func (*DefaultRelease) PrepareWorkspace ¶
func (d *DefaultRelease) PrepareWorkspace() error
func (*DefaultRelease) PushArtifacts ¶
func (d *DefaultRelease) PushArtifacts() error
func (*DefaultRelease) PushGitObjects ¶
func (d *DefaultRelease) PushGitObjects() error
PushGitObjects uploads to the remote repository the release's tags and branches. Internally, this function calls the release implementation's PushTags, PushBranches and PushMainBranch methods.
func (*DefaultRelease) SetImpl ¶
func (d *DefaultRelease) SetImpl(impl releaseImpl)
SetImpl can be used to set the internal release implementation.
func (*DefaultRelease) SetState ¶
func (d *DefaultRelease) SetState(state *ReleaseState)
SetState fixes the current state. Mainly used for passing arbitrary values during testing.
func (*DefaultRelease) Submit ¶
func (d *DefaultRelease) Submit(stream bool) error
func (*DefaultRelease) UpdateGitHubPage ¶
func (d *DefaultRelease) UpdateGitHubPage() error
UpdateGitHubPage Update the GitHub release page, uploading the source code.
func (*DefaultRelease) ValidateOptions ¶
func (d *DefaultRelease) ValidateOptions() error
type DefaultStage ¶
type DefaultStage struct {
// contains filtered or unexported fields
}
DefaultStage is the default staging implementation used in production.
func NewDefaultStage ¶
func NewDefaultStage(options *StageOptions) *DefaultStage
NewDefaultStage creates a new defaultStage instance.
func (*DefaultStage) Build ¶
func (d *DefaultStage) Build() error
func (*DefaultStage) CheckPrerequisites ¶
func (d *DefaultStage) CheckPrerequisites() error
func (*DefaultStage) CheckReleaseBranchState ¶
func (d *DefaultStage) CheckReleaseBranchState() error
func (*DefaultStage) GenerateBillOfMaterials ¶ added in v0.10.0
func (d *DefaultStage) GenerateBillOfMaterials() error
func (*DefaultStage) GenerateChangelog ¶
func (d *DefaultStage) GenerateChangelog() error
func (*DefaultStage) GenerateReleaseVersion ¶
func (d *DefaultStage) GenerateReleaseVersion() error
func (*DefaultStage) InitLogFile ¶
func (d *DefaultStage) InitLogFile() error
func (*DefaultStage) InitState ¶
func (d *DefaultStage) InitState()
func (*DefaultStage) PrepareWorkspace ¶
func (d *DefaultStage) PrepareWorkspace() error
func (*DefaultStage) SetImpl ¶
func (d *DefaultStage) SetImpl(impl stageImpl)
SetImpl can be used to set the internal stage implementation.
func (*DefaultStage) SetState ¶
func (d *DefaultStage) SetState(state *StageState)
SetState fixes the current state. Mainly used for passing arbitrary values during testing.
func (*DefaultStage) StageArtifacts ¶
func (d *DefaultStage) StageArtifacts() error
func (*DefaultStage) State ¶
func (d *DefaultStage) State() *StageState
State returns the internal state.
func (*DefaultStage) Submit ¶
func (d *DefaultStage) Submit(stream bool) error
func (*DefaultStage) TagRepository ¶
func (d *DefaultStage) TagRepository() error
func (*DefaultStage) ValidateOptions ¶
func (d *DefaultStage) ValidateOptions() error
func (*DefaultStage) VerifyArtifacts ¶ added in v0.10.0
func (d *DefaultStage) VerifyArtifacts() error
VerifyArtifacts checks the artifacts to ensure they are correct.
type Options ¶
type Options struct { // Run the whole process in non-mocked mode. Which means that it uses // production remote locations for storing artifacts and modifying git // repositories. NoMock bool // The release type which should be produced. Can be either `alpha`, // `beta`, `rc` or `official`. ReleaseType string // The release branch for which the release should be build. Can be // `master` or any `release-x.y` branch. ReleaseBranch string // The build version to be released. Has to be specified in the format: // `vX.Y.Z-[alpha|beta|rc].N.C+SHA` BuildVersion string }
Options are settings which will be used by `StageOptions` as well as `ReleaseOptions`.
func (*Options) ContainerRegistry ¶
ContainerRegistry returns the container registry for these `Options`.
func (*Options) ValidateBuildVersion ¶ added in v0.15.0
type Release ¶
type Release struct {
// contains filtered or unexported fields
}
Release is the structure to be used for releasing staged releases.
func NewRelease ¶
func NewRelease(options *ReleaseOptions) *Release
NewRelease creates a new `Release` instance.
type ReleaseOptions ¶
type ReleaseOptions struct {
*Options
}
ReleaseOptions contains the options for running `Release`.
func DefaultReleaseOptions ¶
func DefaultReleaseOptions() *ReleaseOptions
DefaultReleaseOptions create a new default `ReleaseOptions`.
func (*ReleaseOptions) String ¶
func (r *ReleaseOptions) String() string
String returns a string representation for the `ReleaseOptions` type.
func (*ReleaseOptions) Validate ¶
func (r *ReleaseOptions) Validate(state *State) error
Validate if the options are correctly set.
type ReleaseState ¶
type ReleaseState struct {
*State
}
ReleaseState holds the release process state.
func DefaultReleaseState ¶
func DefaultReleaseState() *ReleaseState
DefaultReleaseState create a new default `ReleaseOptions`.
type Stage ¶
type Stage struct {
// contains filtered or unexported fields
}
Stage is the structure to be used for staging releases.
func NewStage ¶
func NewStage(options *StageOptions) *Stage
NewStage creates a new `Stage` instance.
func (*Stage) Run ¶
Run for the `Stage` struct prepares a release and puts the results on a staging bucket.
type StageOptions ¶
type StageOptions struct {
*Options
}
StageOptions contains the options for running `Stage`.
func DefaultStageOptions ¶
func DefaultStageOptions() *StageOptions
DefaultStageOptions create a new default `StageOptions`.
func (*StageOptions) String ¶
func (s *StageOptions) String() string
String returns a string representation for the `StageOptions` type.
func (*StageOptions) Validate ¶
func (s *StageOptions) Validate(state *State) error
Validate if the options are correctly set.
type StageState ¶
type StageState struct {
*State
}
StageState holds the release process state.
func DefaultStageState ¶
func DefaultStageState() *StageState
DefaultStageState create a new default `StageState`.
type State ¶
type State struct {
// contains filtered or unexported fields
}
State holds all inferred and calculated values from the release process it's state mutates as each step es executed.