Class DeploymentNotifier
- java.lang.Object
-
- hudson.tasks.BuildStepCompatibilityLayer
-
- hudson.tasks.Publisher
-
- hudson.tasks.Notifier
-
- com.atlassian.bitbucket.jenkins.internal.deployments.DeploymentNotifier
-
- All Implemented Interfaces:
DeploymentStep
,ExtensionPoint
,Describable<Publisher>
,BuildStep
,SimpleBuildStep
public class DeploymentNotifier extends Notifier implements SimpleBuildStep, DeploymentStep
Step for configuring deployment notification in freestyle jobs.- Since:
- 3.1.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DeploymentNotifier.DescriptorImpl
-
Nested classes/interfaces inherited from class hudson.tasks.Publisher
Publisher.DescriptorExtensionListImpl
-
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherList
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Nested classes/interfaces inherited from interface jenkins.tasks.SimpleBuildStep
SimpleBuildStep.LastBuildAction, SimpleBuildStep.LastBuildActionFactory
-
-
Field Summary
-
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
-
Constructor Summary
Constructors Constructor Description DeploymentNotifier(String environmentName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DeploymentNotifier.DescriptorImpl
descriptor()
BitbucketDeploymentEnvironment
getEnvironment(Run<?,?> run, TaskListener listener)
Generates aBitbucketDeploymentEnvironment
from the various components.String
getEnvironmentKey()
Used to populate theenvironmentKey
field in the UIString
getEnvironmentName()
Used to populate theenvironmentName
field in the UI.String
getEnvironmentType()
Used to populate theenvironmentType
field in the UIString
getEnvironmentUrl()
Used to populate theenvironmentUrl
field in the UIvoid
perform(Run<?,?> run, FilePath workspace, Launcher launcher, TaskListener listener)
void
setEnvironmentKey(String environmentKey)
void
setEnvironmentType(String environmentType)
void
setEnvironmentUrl(String environmentUrl)
-
Methods inherited from class hudson.tasks.Notifier
getDescriptor
-
Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, needsToRunAfterFinalized, prebuild
-
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectActions, perform, perform, prebuild
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, getRequiredMonitorService, perform, prebuild
-
Methods inherited from interface jenkins.tasks.SimpleBuildStep
perform, perform, requiresWorkspace
-
-
-
-
Constructor Detail
-
DeploymentNotifier
@DataBoundConstructor public DeploymentNotifier(@CheckForNull String environmentName)
-
-
Method Detail
-
descriptor
public DeploymentNotifier.DescriptorImpl descriptor()
-
getEnvironmentKey
public String getEnvironmentKey()
Used to populate theenvironmentKey
field in the UI- Specified by:
getEnvironmentKey
in interfaceDeploymentStep
- Returns:
- the configured or generated environment key
-
setEnvironmentKey
@DataBoundSetter public void setEnvironmentKey(@CheckForNull String environmentKey)
-
getEnvironmentName
@CheckForNull public String getEnvironmentName()
Description copied from interface:DeploymentStep
Used to populate theenvironmentName
field in the UI.- Specified by:
getEnvironmentName
in interfaceDeploymentStep
- Returns:
- the configured environment name or
null
if not configured
-
getEnvironmentType
@CheckForNull public String getEnvironmentType()
Used to populate theenvironmentType
field in the UI- Specified by:
getEnvironmentType
in interfaceDeploymentStep
- Returns:
- the configured
Enum.name()
ornull
if not configured
-
setEnvironmentType
@DataBoundSetter public void setEnvironmentType(@CheckForNull String environmentType)
-
getEnvironmentUrl
@CheckForNull public String getEnvironmentUrl()
Used to populate theenvironmentUrl
field in the UI- Specified by:
getEnvironmentUrl
in interfaceDeploymentStep
- Returns:
- the configured environment url or
null
if not configured
-
setEnvironmentUrl
@DataBoundSetter public void setEnvironmentUrl(@CheckForNull String environmentUrl)
-
perform
public void perform(Run<?,?> run, FilePath workspace, Launcher launcher, TaskListener listener) throws InterruptedException, IOException
- Specified by:
perform
in interfaceSimpleBuildStep
- Throws:
InterruptedException
IOException
-
getEnvironment
public BitbucketDeploymentEnvironment getEnvironment(Run<?,?> run, TaskListener listener)
Description copied from interface:DeploymentStep
Generates aBitbucketDeploymentEnvironment
from the various components.- Specified by:
getEnvironment
in interfaceDeploymentStep
- Parameters:
run
- the run that is performing the deploymentslistener
- theTaskListener
- Returns:
- the configured
BitbucketDeploymentEnvironment
-
-