create

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: Apache-2.0 Imports: 29 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	FlagProject            = "project"
	FlagChannel            = "channel"
	FlagPackageVersionSpec = "package"

	FlagVersion                  = "version"
	FlagAliasReleaseNumberLegacy = "releaseNumber" // alias for FlagVersion

	FlagPackageVersion                   = "package-version"
	FlagAliasDefaultPackageVersion       = "default-package-version" // alias for FlagPackageVersion
	FlagAliasPackageVersionLegacy        = "packageVersion"          // alias for FlagPackageVersion
	FlagAliasDefaultPackageVersionLegacy = "defaultPackageVersion"   // alias for FlagPackageVersion

	FlagReleaseNotes            = "release-notes"
	FlagAliasReleaseNotesLegacy = "releaseNotes"

	FlagReleaseNotesFile            = "release-notes-file"
	FlagAliasReleaseNotesFileLegacy = "releaseNotesFile"
	FlagAliasReleaseNoteFileLegacy  = "releaseNoteFile"

	FlagGitRef            = "git-ref"
	FlagAliasGitRefLegacy = "gitRef"
	FlagAliasGitRefRef    = "ref" // alias for FlagGitRef

	FlagGitCommit            = "git-commit"
	FlagAliasGitCommitLegacy = "gitCommit"

	FlagIgnoreExisting            = "ignore-existing"
	FlagAliasIgnoreExistingLegacy = "ignoreExisting"

	FlagIgnoreChannelRules            = "ignore-channel-rules"
	FlagAliasIgnoreChannelRulesLegacy = "ignoreChannelRules"
)

Variables

This section is empty.

Functions

func AskPackageOverrideLoop

func AskPackageOverrideLoop(
	packageVersionBaseline []*StepPackageVersion,
	defaultPackageVersion string,
	initialPackageOverrideFlags []string,
	asker question.Asker,
	stdout io.Writer) ([]*StepPackageVersion, []*PackageVersionOverride, error)

func AskQuestions

func AskQuestions(octopus *octopusApiClient.Client, stdout io.Writer, asker question.Asker, options *executor.TaskOptionsCreateRelease) error

func NewCmdCreate

func NewCmdCreate(f factory.Factory) *cobra.Command

Types

type AmbiguousPackageVersionOverride

type AmbiguousPackageVersionOverride struct {
	ActionNameOrPackageID string
	PackageReferenceName  string
	Version               string
}

AmbiguousPackageVersionOverride tells us that we want to set the version of some package to `Version` but it's not clear whether ActionNameOrPackageID refers to an ActionName or PackageID at this point

func ParsePackageOverrideString

func ParsePackageOverrideString(packageOverride string) (*AmbiguousPackageVersionOverride, error)

ParsePackageOverrideString parses a package version override string into a structure. Logic should align with PackageVersionResolver in the Octopus Server and .NET CLI In cases where things are ambiguous, we look in steps for matching values to see if something is a PackageID or a StepName

type CreateFlags

type CreateFlags struct {
	Project            *flag.Flag[string]
	Channel            *flag.Flag[string]
	GitRef             *flag.Flag[string]
	GitCommit          *flag.Flag[string]
	PackageVersion     *flag.Flag[string]
	ReleaseNotes       *flag.Flag[string]
	ReleaseNotesFile   *flag.Flag[string]
	Version            *flag.Flag[string]
	IgnoreExisting     *flag.Flag[bool]
	IgnoreChannelRules *flag.Flag[bool]
	PackageVersionSpec *flag.Flag[[]string]
}

func NewCreateFlags

func NewCreateFlags() *CreateFlags

type PackageVersionOverride

type PackageVersionOverride struct {
	ActionName           string // optional, but one or both of ActionName or PackageID must be supplied
	PackageID            string // optional, but one or both of ActionName or PackageID must be supplied
	PackageReferenceName string // optional; use for advanced situations where the same package is referenced multiple times by a single step
	Version              string // required
}

func (*PackageVersionOverride) ToPackageOverrideString

func (p *PackageVersionOverride) ToPackageOverrideString() string

ToPackageOverrideString converts the struct back into a string which the server can parse e.g. StepName:Version. This is the inverse of ParsePackageOverrideString

type StepPackageVersion

type StepPackageVersion struct {
	// these 3 fields are the main ones for showing the user
	PackageID  string
	ActionName string // "StepName is an obsolete alias for ActionName, they always contain the same value"
	Version    string // note this may be an empty string, indicating that no version could be found for this package yet

	// used to locate the deployment process VersioningStrategy Donor Package
	PackageReferenceName string
}

func ApplyPackageOverrides

func ApplyPackageOverrides(packages []*StepPackageVersion, overrides []*PackageVersionOverride) []*StepPackageVersion

func BuildPackageVersionBaseline

func BuildPackageVersionBaseline(octopus *octopusApiClient.Client, deploymentProcessTemplate *deployments.DeploymentProcessTemplate, channel *channels.Channel) ([]*StepPackageVersion, error)

BuildPackageVersionBaseline loads the deployment process template from the server, and for each step+package therein, finds the latest available version satisfying the channel version rules. Result is the list of step+package+versions to use as a baseline. The package version override process takes this as an input and layers on top of it

Jump to

Keyboard shortcuts

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