com.atlassian.bamboo.plugins.labeller
Class BuildLabeller

java.lang.Object
  extended by com.atlassian.bamboo.v2.build.BaseConfigurablePlugin
      extended by com.atlassian.bamboo.plugins.labeller.BuildLabeller
All Implemented Interfaces:
CustomPostBuildCompletedAction, InitablePluginModule, BambooPluginModule, ConfigurablePlugin, BuildTask, java.util.concurrent.Callable<BuildContext>

public class BuildLabeller
extends BaseConfigurablePlugin
implements CustomPostBuildCompletedAction


Field Summary
 
Fields inherited from class com.atlassian.bamboo.v2.build.BaseConfigurablePlugin
moduleDescriptor, templateRenderer
 
Constructor Summary
BuildLabeller()
           
 
Method Summary
 BuildContext call()
          This action will run after a build has completed.
protected  BuildLogFileAccessor getBuildLogFileAccessor(java.lang.String planKey, int buildNumber)
           
 LabelManager getLabelManager()
           
 void init(BuildContext buildContext)
           
 void setBuildLogFileAccessorFactory(BuildLogFileAccessorFactory buildLogFileAccessorFactory)
           
 void setBuildManager(BuildManager buildManager)
           
 void setLabelManager(LabelManager labelManager)
           
 void setVariableSubstitutionBean(VariableSubstitutionBean variableSubstitutionBean)
           
 ErrorCollection validate(BuildConfiguration buildConfiguration)
          This method is used to validate a build configuration for a build plan

This is used if the CustomBuildCompleteAction needs to have configuration stored against the build plan.

 
Methods inherited from class com.atlassian.bamboo.v2.build.BaseConfigurablePlugin
addDefaultValues, customizeBuildRequirements, getEditHtml, getViewHtml, init, populateContextForEdit, populateContextForView, prepareConfigObject, removeBuildRequirements, setTemplateRenderer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildLabeller

public BuildLabeller()
Method Detail

init

public void init(@NotNull
                 BuildContext buildContext)
Specified by:
init in interface BuildTask

call

@NotNull
public BuildContext call()
                  throws java.lang.InterruptedException,
                         java.lang.Exception
This action will run after a build has completed.

The build will be tagged with a specified set of labels if the logs matches the specified regex pattern.

Specified by:
call in interface BuildTask
Specified by:
call in interface java.util.concurrent.Callable<BuildContext>
Throws:
java.lang.InterruptedException - if the calling Thread has been interrupted.
java.lang.Exception - A general exception that will be handled.

validate

@NotNull
public ErrorCollection validate(@NotNull
                                        BuildConfiguration buildConfiguration)
This method is used to validate a build configuration for a build plan

This is used if the CustomBuildCompleteAction needs to have configuration stored against the build plan.

Specified by:
validate in interface ConfigurablePlugin
Overrides:
validate in class BaseConfigurablePlugin
Parameters:
buildConfiguration - Build configuration object
Returns:
Collections of errors found during validation

getLabelManager

public LabelManager getLabelManager()

setLabelManager

public void setLabelManager(LabelManager labelManager)

getBuildLogFileAccessor

protected BuildLogFileAccessor getBuildLogFileAccessor(java.lang.String planKey,
                                                       int buildNumber)

setBuildLogFileAccessorFactory

public void setBuildLogFileAccessorFactory(BuildLogFileAccessorFactory buildLogFileAccessorFactory)

setVariableSubstitutionBean

public void setVariableSubstitutionBean(VariableSubstitutionBean variableSubstitutionBean)

setBuildManager

public void setBuildManager(BuildManager buildManager)


Copyright © 2010 Atlassian. All Rights Reserved.