octopus_apis

package
v0.0.0-...-1d416a3 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const MaxInt = 2147483647

Variables

View Source
var ApplicationChannelVariable = regexp.MustCompile("^Metadata.ArgoCD\\.Application\\[([^\\[\\]]*?)]\\.Channel$")
View Source
var ApplicationEnvironmentVariable = regexp.MustCompile("^Metadata.ArgoCD\\.Application\\[([^\\[\\]]*?)]\\.Environment$")
View Source
var ApplicationImagePackageVersionVariable = regexp.MustCompile("^Metadata.ArgoCD\\.Application\\[([^\\[\\]]*?)]\\.ImageForPackageVersion\\[([^\\[\\]]*?)]$")
View Source
var ApplicationImageReleaseVersionVariable = regexp.MustCompile("^Metadata.ArgoCD\\.Application\\[([^\\[\\]]*?)]\\.ImageForReleaseVersion$")

Functions

This section is empty.

Types

type LiveOctopusClient

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

LiveOctopusClient interacts with a live Octopus API endpoint, and implements caching to reduce network calls.

func NewLiveOctopusClient

func NewLiveOctopusClient() (*LiveOctopusClient, error)

func (*LiveOctopusClient) CreateAndDeployRelease

func (o *LiveOctopusClient) CreateAndDeployRelease(project models.ArgoCDProjectExpanded, updateMessage models.ApplicationUpdateMessage, version types.OctopusReleaseVersion) error

func (*LiveOctopusClient) GetLatestDeploymentRelease

func (o *LiveOctopusClient) GetLatestDeploymentRelease(project *octopusdeploy.Project, environment *octopusdeploy.Environment) (*octopusdeploy.Release, error)

func (*LiveOctopusClient) GetLatestRelease

func (o *LiveOctopusClient) GetLatestRelease(project *octopusdeploy.Project) (*octopusdeploy.Release, error)

func (*LiveOctopusClient) GetProjects

func (*LiveOctopusClient) GetReleaseVersions

func (o *LiveOctopusClient) GetReleaseVersions(project *octopusdeploy.Project) ([]types.OctopusReleaseVersion, error)

func (*LiveOctopusClient) IsDeployed

func (o *LiveOctopusClient) IsDeployed(project *octopusdeploy.Project, releaseVersion types.OctopusReleaseVersion, environment *octopusdeploy.Environment) (bool, error)

type OctopusClient

type OctopusClient interface {
	// GetProjects returns the details of projects that match the incoming message
	GetProjects(updateMessage models.ApplicationUpdateMessage) ([]models.ArgoCDProjectExpanded, error)
	// CreateAndDeployRelease will ensure the release is deployed to the correct environment, creating a new release if necessary
	CreateAndDeployRelease(project models.ArgoCDProjectExpanded, updateMessage models.ApplicationUpdateMessage, version types.OctopusReleaseVersion) error
	// GetReleaseVersions returns the releases associated with a project
	GetReleaseVersions(project *octopusdeploy.Project) ([]types.OctopusReleaseVersion, error)
	// IsDeployed returns true if the release is deployed to the specified environment
	IsDeployed(project *octopusdeploy.Project, releaseVersion types.OctopusReleaseVersion, environment *octopusdeploy.Environment) (bool, error)
	// GetLatestRelease returns the latest release for a project
	GetLatestRelease(project *octopusdeploy.Project) (*octopusdeploy.Release, error)
	// GetLatestDeploymentRelease returns the latest release thar has been deployed to a project's environment
	GetLatestDeploymentRelease(project *octopusdeploy.Project, environment *octopusdeploy.Environment) (*octopusdeploy.Release, error)
}

Jump to

Keyboard shortcuts

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