com.atlassian.bamboo.plugins.buildnumberstamper
Class BuildNumberStamper

java.lang.Object
  extended by com.atlassian.bamboo.plugins.buildnumberstamper.BuildNumberStamper
All Implemented Interfaces:
CustomPreBuildAction, BambooPluginModule, AgentBuildTask, BuildTask, java.util.concurrent.Callable<BuildContext>

public class BuildNumberStamper
extends java.lang.Object
implements CustomPreBuildAction

This class generates a file containing the number of the build.


Field Summary
static java.lang.String BUILD_STAMP_FILENAME
           
 
Constructor Summary
BuildNumberStamper()
           
 
Method Summary
 BuildContext call()
          Places a file containing the build number in the source code directory for the build/plan contained in the build context
 void init(BuildContext buildContext)
           
 ErrorCollection validate(BuildConfiguration config)
          Validate the build configuration when trying to save configuration for the Build This is used if the CustomPreBuildAction needs to have configuration stored against the build plan.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUILD_STAMP_FILENAME

public static final java.lang.String BUILD_STAMP_FILENAME
See Also:
Constant Field Values
Constructor Detail

BuildNumberStamper

public BuildNumberStamper()
Method Detail

init

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

validate

public ErrorCollection validate(BuildConfiguration config)
Description copied from interface: CustomPreBuildAction
Validate the build configuration when trying to save configuration for the Build This is used if the CustomPreBuildAction needs to have configuration stored against the build plan.

Specified by:
validate in interface CustomPreBuildAction
Returns:

call

@NotNull
public BuildContext call()
                  throws java.lang.Exception
Places a file containing the build number in the source code directory for the build/plan contained in the build context

Specified by:
call in interface BuildTask
Specified by:
call in interface java.util.concurrent.Callable<BuildContext>
Returns:
Build Context as it exists on initiation of the class (i.e no changes are made)
Throws:
java.lang.Exception
java.lang.InterruptedException - if the calling Thread has been interrupted.


Copyright © 2011 Atlassian. All Rights Reserved.