deployments

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: Apache-2.0 Imports: 14 Imported by: 7 modules, 7 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 (
	PackageAcquisitionLocationServer          = "Server"
	PackageAcquisitionLocationExecutionTarget = "ExecutionTarget"
	PackageAcquisitionLocationNotAcquired     = "NotAcquired"
)

Variables

This section is empty.

Functions

func IsNil

func IsNil(i interface{}) bool

Types

type ChannelRule

type ChannelRule struct {
	ActionPackages []packages.DeploymentActionPackage `json:"ActionPackages,omitempty"`
	ID             string                             `json:"Id,omitempty"`
	Tag            string                             `json:"Tag,omitempty"`

	//Use the NuGet or Maven versioning syntax (depending on the feed type)
	//to specify the range of versions to include
	VersionRange string `json:"VersionRange,omitempty"`

	resources.Resource
}

type Deployment

type Deployment struct {
	Changes                  []*releases.ReleaseChanges `json:"Changes"`
	ChangesMarkdown          string                     `json:"ChangesMarkdown,omitempty"`
	ChannelID                string                     `json:"ChannelId,omitempty"`
	Comments                 string                     `json:"Comments,omitempty"`
	Created                  *time.Time                 `json:"Created,omitempty"`
	DeployedBy               string                     `json:"DeployedBy,omitempty"`
	DeployedByID             string                     `json:"DeployedById,omitempty"`
	DeployedToMachineIDs     []string                   `json:"DeployedToMachineIds"`
	DeploymentProcessID      string                     `json:"DeploymentProcessId,omitempty"`
	EnvironmentID            string                     `json:"EnvironmentId" validate:"required"`
	ExcludedMachineIDs       []string                   `json:"ExcludedMachineIds"`
	FailureEncountered       bool                       `json:"FailureEncountered,omitempty"`
	ForcePackageDownload     bool                       `json:"ForcePackageDownload,omitempty"`
	ForcePackageRedeployment bool                       `json:"ForcePackageRedeployment,omitempty"`
	FormValues               map[string]string          `json:"FormValues,omitempty"`
	ManifestVariableSetID    string                     `json:"ManifestVariableSetId,omitempty"`
	Name                     string                     `json:"Name,omitempty"`
	ProjectID                string                     `json:"ProjectId,omitempty"`
	QueueTime                *time.Time                 `json:"QueueTime,omitempty"`
	QueueTimeExpiry          *time.Time                 `json:"QueueTimeExpiry,omitempty"`
	ReleaseID                string                     `json:"ReleaseId" validate:"required"`
	SkipActions              []string                   `json:"SkipActions"`
	SpaceID                  string                     `json:"SpaceId,omitempty"`
	SpecificMachineIDs       []string                   `json:"SpecificMachineIds"`
	TaskID                   string                     `json:"TaskId,omitempty"`
	TenantID                 string                     `json:"TenantId,omitempty"`
	TentacleRetentionPeriod  *core.RetentionPeriod      `json:"TentacleRetentionPeriod,omitempty"`
	UseGuidedFailure         bool                       `json:"UseGuidedFailure,omitempty"`

	resources.Resource
}

func NewDeployment

func NewDeployment(environmentID string, releaseID string) *Deployment

NewDeployment initializes a deployment with a name, environment ID, and release ID.

func (*Deployment) Validate

func (d *Deployment) Validate() error

Validate checks the state of the deployment and returns an error if invalid.

type DeploymentAction

type DeploymentAction struct {
	ActionType                    string                        `json:"ActionType" validate:"required,notblank"`
	CanBeUsedForProjectVersioning bool                          `json:"CanBeUsedForProjectVersioning,omitempty"`
	Channels                      []string                      `json:"Channels,omitempty"`
	Condition                     string                        `json:"Condition,omitempty"`
	Container                     *DeploymentActionContainer    `json:"Container,omitempty"`
	Environments                  []string                      `json:"Environments,omitempty"`
	ExcludedEnvironments          []string                      `json:"ExcludedEnvironments,omitempty"`
	IsDisabled                    bool                          `json:"IsDisabled,omitempty"`
	IsRequired                    bool                          `json:"IsRequired,omitempty"`
	Name                          string                        `json:"Name" validate:"required,notblank"`
	Notes                         string                        `json:"Notes,omitempty"`
	Packages                      []*packages.PackageReference  `json:"Packages,omitempty"`
	Properties                    map[string]core.PropertyValue `json:"Properties,omitempty"`
	StepPackageVersion            string                        `json:"StepPackageVersion,omitempty"`
	TenantTags                    []string                      `json:"TenantTags,omitempty"`
	WorkerPool                    string                        `json:"WorkerPoolId,omitempty"`
	WorkerPoolVariable            string                        `json:"WorkerPoolVariable,omitempty"`

	resources.Resource
}

func NewDeploymentAction

func NewDeploymentAction(name string, actionType string) *DeploymentAction

NewDeploymentAction initializes a DeploymentAction with a name.

func (DeploymentAction) Validate

func (d DeploymentAction) Validate() error

Validate checks the state of the channel and returns an error if invalid.

type DeploymentActionContainer

type DeploymentActionContainer struct {
	FeedID string `json:"FeedId,omitempty"`
	Image  string `json:"Image,omitempty"`
}

func NewDeploymentActionContainer

func NewDeploymentActionContainer(feedID *string, image *string) *DeploymentActionContainer

NewDeploymentActionContainer creates and initializes a new Kubernetes endpoint.

type DeploymentProcess

type DeploymentProcess struct {
	Branch         string            `json:"-"`
	LastSnapshotID string            `json:"LastSnapshotId,omitempty"`
	ProjectID      string            `json:"ProjectId,omitempty"`
	SpaceID        string            `json:"SpaceId,omitempty"`
	Steps          []*DeploymentStep `json:"Steps,omitempty"`
	Version        int32             `json:"Version"`

	resources.Resource
}

func NewDeploymentProcess

func NewDeploymentProcess(projectID string) *DeploymentProcess

NewDeploymentProcess initializes a deployment process.

type DeploymentProcessService

type DeploymentProcessService struct {
	services.Service
}

func NewDeploymentProcessService

func NewDeploymentProcessService(sling *sling.Sling, uriTemplate string) *DeploymentProcessService

func (*DeploymentProcessService) Get

Get returns the deployment process that matches the input project and a git reference. If one cannot be found, it returns nil and an error.

func (*DeploymentProcessService) GetAll

GetAll returns all deployment processes. If none can be found or an error occurs, it returns an empty collection.

func (*DeploymentProcessService) GetByID

GetByID returns the deployment process that matches the input ID. If one cannot be found, it returns nil and an error.

func (*DeploymentProcessService) GetTemplate added in v2.1.0

func (s *DeploymentProcessService) GetTemplate(deploymentProcess *DeploymentProcess, channelID string, releaseID string) (*DeploymentProcessTemplate, error)

func (*DeploymentProcessService) Update

func (s *DeploymentProcessService) Update(deploymentProcess *DeploymentProcess) (*DeploymentProcess, error)

Update modifies a deployment process based on the one provided as input.

type DeploymentProcessTemplate added in v2.1.0

type DeploymentProcessTemplate struct {
	DeploymentProcessId            string                            `json:"DeploymentProcessId,omitempty"`
	LastReleaseVersion             string                            `json:"LastReleaseVersion,omitempty"`
	NextVersionIncrement           string                            `json:"NextVersionIncrement,omitempty"`
	VersioningPackageStepName      *string                           `json:"VersioningPackageStepName,omitempty"`
	VersioningPackageReferenceName *string                           `json:"VersioningPackageReferenceName,omitempty"`
	Packages                       []releases.ReleaseTemplatePackage `json:"Packages,omitempty"`

	resources.Resource
}

type DeploymentProcessesQuery

type DeploymentProcessesQuery struct {
	IDs  []string `uri:"ids,omitempty" url:"ids,omitempty"`
	Skip int      `uri:"skip,omitempty" url:"skip,omitempty"`
	Take int      `uri:"take,omitempty" url:"take,omitempty"`
}

type DeploymentQuery

type DeploymentQuery struct {
	Skip int `uri:"skip,omitempty" url:"skip,omitempty"`
	Take int `uri:"take,omitempty" url:"take,omitempty"`
}

type DeploymentService

type DeploymentService struct {
	services.CanDeleteService
}

DeploymentService handles communication for any operations in the Octopus API that pertain to deployments.

func NewDeploymentService

func NewDeploymentService(sling *sling.Sling, uriTemplate string) *DeploymentService

NewDeploymentService returns a deploymentService with a preconfigured client.

func (*DeploymentService) Add

func (s *DeploymentService) Add(deployment *Deployment) (*Deployment, error)

Add creates a new deployment.

func (*DeploymentService) GetByID

func (s *DeploymentService) GetByID(id string) (*Deployment, error)

GetByID gets a deployment that matches the input ID. If one cannot be found, it returns nil and an error.

func (*DeploymentService) GetByIDs

func (s *DeploymentService) GetByIDs(ids []string) ([]*Deployment, error)

GetByIDs gets a list of deployments that match the input IDs.

func (*DeploymentService) GetByName

func (s *DeploymentService) GetByName(name string) ([]*Deployment, error)

GetByName performs a lookup and returns instances of a Deployment with a matching partial name.

func (*DeploymentService) GetDeployments

func (s *DeploymentService) GetDeployments(release *releases.Release, deploymentQuery ...*DeploymentQuery) (*resources.Resources[*Deployment], error)

func (*DeploymentService) GetProgression

func (s *DeploymentService) GetProgression(release *releases.Release) (*releases.Progression, error)

func (*DeploymentService) Update

func (s *DeploymentService) Update(resource Deployment) (*Deployment, error)

Update modifies a Deployment based on the one provided as input.

type DeploymentSettings

type DeploymentSettings struct {
	ChangeDescription               string                       `json:"ChangeDescription,omitempty"`
	ConnectivityPolicy              *core.ConnectivityPolicy     `json:"ProjectConnectivityPolicy,omitempty"`
	DefaultGuidedFailureMode        string                       `json:"DefaultGuidedFailureMode,omitempty"`
	DefaultToSkipIfAlreadyInstalled bool                         `json:"DefaultToSkipIfAlreadyInstalled,omitempty"`
	DeploymentChangesTemplate       string                       `json:"DeploymentChangesTemplate,omitempty"`
	ProjectID                       string                       `json:"ProjectId"`
	ReleaseNotesTemplate            string                       `json:"ReleaseNotesTemplate,omitempty"`
	SpaceID                         string                       `json:"SpaceId"`
	VersioningStrategy              *projects.VersioningStrategy `json:"VersioningStrategy,omitempty"`

	resources.Resource
}

func NewDeploymentSettings

func NewDeploymentSettings() *DeploymentSettings

type DeploymentStep

type DeploymentStep struct {
	Actions            []*DeploymentAction              `json:"Actions,omitempty"`
	Condition          DeploymentStepConditionType      `json:"Condition,omitempty"` // variable option adds a Property "Octopus.Action.ConditionVariableExpression"
	Name               string                           `json:"Name"`
	PackageRequirement DeploymentStepPackageRequirement `json:"PackageRequirement,omitempty"`
	Properties         map[string]core.PropertyValue    `json:"Properties,omitempty"`
	StartTrigger       DeploymentStepStartTrigger       `json:"StartTrigger,omitempty" validate:"required,oneof=StartAfterPrevious StartWithPrevious"`
	TargetRoles        []string                         `json:"-"`

	resources.Resource
}

func NewDeploymentStep

func NewDeploymentStep(name string) *DeploymentStep

NewDeploymentStep initializes a DeploymentStep with a name.

func (DeploymentStep) Validate

func (d DeploymentStep) Validate() error

Validate checks the state of the deployment step and returns an error if invalid.

type DeploymentStepConditionType

type DeploymentStepConditionType string
const (
	DeploymentStepConditionTypeSuccess  DeploymentStepConditionType = "Success"
	DeploymentStepConditionTypeFailure  DeploymentStepConditionType = "Failure"
	DeploymentStepConditionTypeAlways   DeploymentStepConditionType = "Always"
	DeploymentStepConditionTypeVariable DeploymentStepConditionType = "Variable"
)

type DeploymentStepPackageRequirement

type DeploymentStepPackageRequirement string
const (
	DeploymentStepPackageRequirementLetOctopusDecide         DeploymentStepPackageRequirement = "LetOctopusDecide"
	DeploymentStepPackageRequirementBeforePackageAcquisition DeploymentStepPackageRequirement = "BeforePackageAcquisition"
	DeploymentStepPackageRequirementAfterPackageAcquisition  DeploymentStepPackageRequirement = "AfterPackageAcquisition"
)

type DeploymentStepStartTrigger

type DeploymentStepStartTrigger string
const (
	DeploymentStepStartTriggerStartAfterPrevious DeploymentStepStartTrigger = "StartAfterPrevious"
	DeploymentStepStartTriggerStartWithPrevious  DeploymentStepStartTrigger = "StartWithPrevious"
)

type DeploymentsQuery

type DeploymentsQuery struct {
	Channels     string   `uri:"channels,omitempty" url:"channels,omitempty"`
	Environments []string `uri:"environments,omitempty" url:"environments,omitempty"`
	IDs          []string `uri:"ids,omitempty" url:"ids,omitempty"`
	PartialName  string   `uri:"partialName,omitempty" url:"partialName,omitempty"`
	Projects     []string `uri:"projects,omitempty" url:"projects,omitempty"`
	Skip         int      `uri:"skip,omitempty" url:"skip,omitempty"`
	Take         int      `uri:"take,omitempty" url:"take,omitempty"`
	TaskState    string   `uri:"taskState,omitempty" url:"taskState,omitempty"`
	Tenants      []string `uri:"tenants,omitempty" url:"tenants,omitempty"`
}

type StepUsage

type StepUsage struct {
	ProjectID   string            `json:"ProjectId,omitempty"`
	ProjectName string            `json:"ProjectName,omitempty"`
	ProjectSlug string            `json:"ProjectSlug,omitempty"`
	Steps       []*StepUsageEntry `json:"Steps"`
}

type StepUsageEntry

type StepUsageEntry struct {
	StepID   string `json:"StepId,omitempty"`
	StepName string `json:"StepName,omitempty"`
}

Jump to

Keyboard shortcuts

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