Class AbstractOctopusDeployRecorderBuildStep

  • All Implemented Interfaces:
    hudson.ExtensionPoint, hudson.model.Describable<hudson.tasks.Builder>, hudson.tasks.BuildStep, jenkins.tasks.SimpleBuildStep
    Direct Known Subclasses:
    OctopusDeployPackRecorder, OctopusDeployPushBuildInformationRecorder, OctopusDeployPushRecorder

    public abstract class AbstractOctopusDeployRecorderBuildStep
    extends hudson.tasks.Builder
    implements jenkins.tasks.SimpleBuildStep
    The AbstractOctopusDeployRecorder tries to take care of most of the Octopus Deploy server access.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  AbstractOctopusDeployRecorderBuildStep.AbstractOctopusDeployDescriptorImplStep  
      • Nested classes/interfaces inherited from interface hudson.tasks.BuildStep

        hudson.tasks.BuildStep.PublisherList
      • Nested classes/interfaces inherited from interface hudson.ExtensionPoint

        hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
      • Nested classes/interfaces inherited from interface jenkins.tasks.SimpleBuildStep

        jenkins.tasks.SimpleBuildStep.LastBuildAction, jenkins.tasks.SimpleBuildStep.LastBuildActionFactory
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String additionalArgs
      The additional arguments to pass to Octopus CLI
      protected boolean cancelOnTimeout
      Whether to cancel the deployment if the deployment timeout is reached
      protected java.lang.String deploymentTimeout
      Specifies maximum time (timespan format) that the console session will wait for the deployment to finish(default 00:10:00)
      protected java.lang.String environment
      The environment to deploy to, if we are deploying.
      protected OctopusDeployServer octopusDeployServer
      Cache for OctopusDeployServer instance used in deployment transient keyword prevents leaking API key to Job configuration
      protected java.lang.String project
      The project name as defined in Octopus.
      protected java.lang.String serverId
      The serverId to use for this deployment
      protected java.lang.String spaceId
      The spaceId to use for this deployment
      protected java.lang.String tenant
      The Tenant to use for a deploy to in Octopus.
      protected java.lang.String tenantTag  
      protected java.lang.String toolId
      The toolId to use for this deployment
      protected java.lang.String variables
      The variables to use for a deploy to in Octopus.
      protected boolean verboseLogging
      Whether or not to enable verbose logging
      protected boolean waitForDeployment
      Whether or not perform will return control immediately, or wait until the Deployment task is completed.
      • Fields inherited from interface hudson.tasks.BuildStep

        BUILDERS, PUBLISHERS
    • Field Detail

      • octopusDeployServer

        protected transient OctopusDeployServer octopusDeployServer
        Cache for OctopusDeployServer instance used in deployment transient keyword prevents leaking API key to Job configuration
      • serverId

        protected java.lang.String serverId
        The serverId to use for this deployment
      • toolId

        protected java.lang.String toolId
        The toolId to use for this deployment
      • spaceId

        protected java.lang.String spaceId
        The spaceId to use for this deployment
      • project

        protected java.lang.String project
        The project name as defined in Octopus.
      • environment

        protected java.lang.String environment
        The environment to deploy to, if we are deploying.
      • variables

        protected java.lang.String variables
        The variables to use for a deploy to in Octopus.
      • tenant

        protected java.lang.String tenant
        The Tenant to use for a deploy to in Octopus.
      • tenantTag

        protected java.lang.String tenantTag
      • additionalArgs

        protected java.lang.String additionalArgs
        The additional arguments to pass to Octopus CLI
      • waitForDeployment

        protected boolean waitForDeployment
        Whether or not perform will return control immediately, or wait until the Deployment task is completed.
      • verboseLogging

        protected boolean verboseLogging
        Whether or not to enable verbose logging
      • deploymentTimeout

        protected java.lang.String deploymentTimeout
        Specifies maximum time (timespan format) that the console session will wait for the deployment to finish(default 00:10:00)
      • cancelOnTimeout

        protected boolean cancelOnTimeout
        Whether to cancel the deployment if the deployment timeout is reached
    • Constructor Detail

      • AbstractOctopusDeployRecorderBuildStep

        public AbstractOctopusDeployRecorderBuildStep()
    • Method Detail

      • getServerId

        public java.lang.String getServerId()
      • getToolId

        public java.lang.String getToolId()
      • getSpaceId

        public java.lang.String getSpaceId()
      • hasSpaces

        public static java.lang.Boolean hasSpaces()
      • getProject

        public java.lang.String getProject()
      • getEnvironment

        public java.lang.String getEnvironment()
      • getVariables

        public java.lang.String getVariables()
      • getTenant

        public java.lang.String getTenant()
      • getTenantTag

        public java.lang.String getTenantTag()
      • getAdditionalArgs

        public java.lang.String getAdditionalArgs()
      • setAdditionalArgs

        @DataBoundSetter
        public void setAdditionalArgs​(java.lang.String additionalArgs)
      • getWaitForDeployment

        public boolean getWaitForDeployment()
      • getVerboseLogging

        public boolean getVerboseLogging()
      • setVerboseLogging

        @DataBoundSetter
        public void setVerboseLogging​(boolean verboseLogging)
      • getDeploymentTimeout

        public java.lang.String getDeploymentTimeout()
      • getCancelOnTimeout

        public boolean getCancelOnTimeout()
      • getDefaultOctopusDeployServer

        protected static OctopusDeployServer getDefaultOctopusDeployServer()
        Get the default OctopusDeployServer from OctopusDeployPlugin configuration
        Returns:
        the default server
      • getOctopusDeployServers

        public static java.util.List<OctopusDeployServer> getOctopusDeployServers()
        Get the list of OctopusDeployServer from OctopusDeployPlugin configuration
        Returns:
        all configured servers
      • getOctopusDeployServersIds

        public static java.util.List<java.lang.String> getOctopusDeployServersIds()
      • getOctopusToolInstallations

        public static OctoInstallation[] getOctopusToolInstallations()
      • getOctopusToolIds

        public static java.util.List<java.lang.String> getOctopusToolIds()
      • getOctopusToolPath

        public static java.lang.String getOctopusToolPath​(java.lang.String name,
                                                          hudson.model.Node builtOn,
                                                          hudson.EnvVars env,
                                                          hudson.model.TaskListener taskListener)
      • hasAdvancedOptions

        public java.lang.Boolean hasAdvancedOptions()
      • launchOcto

        public hudson.model.Result launchOcto​(hudson.FilePath workspace,
                                              hudson.Launcher launcher,
                                              java.util.List<java.lang.String> commands,
                                              java.lang.Boolean[] masks,
                                              hudson.EnvVars environment,
                                              hudson.model.BuildListener listener)
      • getRequiredMonitorService

        public hudson.tasks.BuildStepMonitor getRequiredMonitorService()
        Specified by:
        getRequiredMonitorService in interface hudson.tasks.BuildStep
        Overrides:
        getRequiredMonitorService in class hudson.tasks.Builder
      • getExceptionMessage

        protected static java.lang.String getExceptionMessage​(java.lang.Exception ex)