Documentation
¶
Index ¶
Constants ¶
const ( Error int = 20 Warning = 15 Info = 10 Permission = 5 Ok = 0 )
const ( Organization string = "Organization" Naming string = "Naming" Security = "Security" Performance = "Performance" Optimization = "Optimization" GeneralError = "GeneralError" )
Variables ¶
var DefaultStepNames = []string{
"Run a Script",
"Run an Azure Script",
"Run an AWS CLI Script",
"Run gcloud in a Script",
"Deploy an Azure Resource Manager template",
"Run a Service Fabric SDK PowerShell Script",
"Run a kubectl CLI Script",
"Deploy a Package",
"Deploy to IIS",
"Deploy a Windows Service",
"Deploy an Azure Web App (Web Deploy)",
"Deploy a Service Fabric App",
"Deploy an Azure Cloud Service",
"Upload a package to an AWS S3 bucket",
"Deploy to NGINX",
"Transfer a Package",
"Deploy Java Archive",
"Deploy a VHD",
"Deploy Amazon ECS Service",
"Update Amazon ECS Service",
"Deploy an AWS CloudFormation template",
"Apply an AWS CloudFormation Change Set",
"Delete an AWS CloudFormation stack",
"Upload a package to an AWS S3 bucket",
"Deploy a Bicep template",
"Deploy an Azure App Service",
"Import Certificate",
"Deploy a certificate to Tomcat",
"Configure certificate for WildFly or EAP",
"Deploy a keystore to the filesystem",
"Create a Docker Network",
"Run a Docker Container",
"Stop a Docker Resource",
"Deploy Java Archive",
"Deploy to Tomcat via Manager",
"Start/Stop App in Tomcat",
"Deploy to WildFly or EAP",
"Enable/Disable deployment in WildFly or EAP",
"Deploy raw Kubernetes YAML",
"Kustomize",
"Upgrade a Helm Chart",
"Deploy Kubernetes containers",
"Deploy Kubernetes config map resource",
"Deploy Kubernetes ingress resource",
"Deploy Kubernetes secret resource",
"Apply a Terraform template",
"Destroy Terraform resources",
"Plan to apply a Terraform template",
"Plan a Terraform destroy",
"Send an Email",
"Health Check",
"Manual Intervention Required",
"Deploy a Release",
"Jira Service Desk Change Request",
}
DefaultStepNames lists the default step names that are used if the step name is not specifically supplied.
var SpecialVars = []string{
"OctopusPrintVariables",
"OctopusPrintEvaluatedVariables",
}
SpecialVars is a list of known debug or system variables that are not expected to appear in the project itself
Functions ¶
func IgnoreVariable ¶
IgnoreVariable is used to find special variables that the end user does not control the naming or use of
Types ¶
type OctopusCheck ¶
type OctopusCheck interface {
// Execute runs the check
Execute(concurrency int) (OctopusCheckResult, error)
// Id returns the unique ID of the check, used to cross-reference with documentation
Id() string
}
OctopusCheck defines the contract for each lint check
type OctopusCheckResult ¶
type OctopusCheckResult interface {
Description() string
Code() string
Link() string
Severity() int
Category() string
}
OctopusCheckResult describes the result of an OctopusCheck
type OctopusCheckResultImpl ¶
type OctopusCheckResultImpl struct {
// contains filtered or unexported fields
}
func (OctopusCheckResultImpl) Category ¶
func (o OctopusCheckResultImpl) Category() string
func (OctopusCheckResultImpl) Code ¶
func (o OctopusCheckResultImpl) Code() string
func (OctopusCheckResultImpl) Description ¶
func (o OctopusCheckResultImpl) Description() string
func (OctopusCheckResultImpl) Link ¶
func (o OctopusCheckResultImpl) Link() string
func (OctopusCheckResultImpl) Severity ¶
func (o OctopusCheckResultImpl) Severity() int
type OctopusClientErrorHandler ¶
type OctopusClientErrorHandler interface {
// HandleError either handles the error and returns a OctopusCheckResult, or bubbles an error up. This
// is called when the main request is made in a check, and the inability to process that first request
// means the check can not continue.
HandleError(id string, group string, err error) (OctopusCheckResult, error)
// ShouldContinue is used to determine if a secondary request that failed should be ignored. This is typically called
// when looping through resources where the failure of some requests do not invalidate the whole check. For example,
// the inability to get a deployment process for one project does not invalidate the checks against other projects.
ShouldContinue(err error) bool
}
OctopusClientErrorHandler is a service used to respond to errors from the octopus client_wrapper.
type OctopusClientPermissiveErrorHandler ¶
type OctopusClientPermissiveErrorHandler struct {
}
OctopusClientPermissiveErrorHandler treats almost every 400 HTTP error as a permissions error and returns a result at the Permission level.
func (OctopusClientPermissiveErrorHandler) HandleError ¶
func (o OctopusClientPermissiveErrorHandler) HandleError(id string, group string, err error) (OctopusCheckResult, error)
func (OctopusClientPermissiveErrorHandler) ShouldContinue ¶
func (o OctopusClientPermissiveErrorHandler) ShouldContinue(err error) bool
ShouldContinue is used to determine if an error was a permissions error. Things like 404s are also treated as permission errors (we saw this a lot trying to get deployment processes). Interestingly we also saw a lot of StatusCode's set to 0, so this function also reads the error to work out what is going on.