Documentation ¶
Index ¶
- Constants
- func IsNil(i interface{}) bool
- type ChannelRule
- type Deployment
- type DeploymentAction
- type DeploymentActionContainer
- type DeploymentProcess
- type DeploymentProcessService
- func (s *DeploymentProcessService) Get(project *projects.Project, gitRef string) (*DeploymentProcess, error)
- func (s *DeploymentProcessService) GetAll() ([]*DeploymentProcess, error)
- func (s *DeploymentProcessService) GetByID(id string) (*DeploymentProcess, error)
- func (s *DeploymentProcessService) GetTemplate(deploymentProcess *DeploymentProcess, channelID string, releaseID string) (*DeploymentProcessTemplate, error)
- func (s *DeploymentProcessService) Update(deploymentProcess *DeploymentProcess) (*DeploymentProcess, error)
- type DeploymentProcessTemplate
- type DeploymentProcesses
- type DeploymentProcessesQuery
- type DeploymentQuery
- type DeploymentService
- func (s *DeploymentService) Add(deployment *Deployment) (*Deployment, error)
- func (s *DeploymentService) GetByID(id string) (*Deployment, error)
- func (s *DeploymentService) GetByIDs(ids []string) ([]*Deployment, error)
- func (s *DeploymentService) GetByName(name string) ([]*Deployment, error)
- func (s *DeploymentService) GetDeployments(release *releases.Release, deploymentQuery ...*DeploymentQuery) (*Deployments, error)
- func (s *DeploymentService) GetProgression(release *releases.Release) (*releases.Progression, error)
- func (s *DeploymentService) Update(resource Deployment) (*Deployment, error)
- type DeploymentSettings
- type DeploymentStep
- type DeploymentStepConditionType
- type DeploymentStepPackageRequirement
- type DeploymentStepStartTrigger
- type Deployments
- type DeploymentsQuery
- type StepUsage
- type StepUsageEntry
Constants ¶
const ( PackageAcquisitionLocationServer = "Server" PackageAcquisitionLocationExecutionTarget = "ExecutionTarget" PackageAcquisitionLocationNotAcquired = "NotAcquired" )
Variables ¶
This section is empty.
Functions ¶
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 ¶
func NewDeploymentProcessService ¶
func NewDeploymentProcessService(sling *sling.Sling, uriTemplate string) *DeploymentProcessService
func (*DeploymentProcessService) Get ¶
func (s *DeploymentProcessService) Get(project *projects.Project, gitRef string) (*DeploymentProcess, error)
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 ¶
func (s *DeploymentProcessService) GetAll() ([]*DeploymentProcess, error)
GetAll returns all deployment processes. If none can be found or an error occurs, it returns an empty collection.
func (*DeploymentProcessService) GetByID ¶
func (s *DeploymentProcessService) GetByID(id string) (*DeploymentProcess, error)
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 DeploymentProcesses ¶
type DeploymentProcesses struct { Items []*DeploymentProcess `json:"Items"` resources.PagedResults }
type DeploymentQuery ¶
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) (*Deployments, 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 Deployments ¶
type Deployments struct { Items []*Deployment `json:"Items"` resources.PagedResults }
Deployments defines a collection of deployment instances with built-in support for paged results.
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 ¶
Source Files ¶
- channel_rule.go
- deployment.go
- deployment_action.go
- deployment_action_container.go
- deployment_process.go
- deployment_process_service.go
- deployment_process_template.go
- deployment_processes_query.go
- deployment_query.go
- deployment_service.go
- deployment_settings.go
- deployment_step.go
- deployment_step_condition_types.go
- deployment_step_package_requirement.go
- deployment_step_start_trigger.go
- deployments_query.go
- is_nil.go
- step_usage.go
- step_usage_entry.go