|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.command.Command com.atlassian.bamboo.builder.AbstractBuilder
TaskType
@Deprecated public abstract class AbstractBuilder
Common builder functionality.
Field Summary | |
---|---|
static java.lang.String |
BUILD_FAILED_MARKER
Deprecated. |
static java.lang.String |
BUILD_SUCCESSFUL_MARKER
Deprecated. |
protected BuildDirectoryManager |
buildDirectoryManager
Deprecated. |
protected static java.lang.String |
DEFAULT_TEST_REPORTS_XML
Deprecated. |
protected ErrorUpdateHandler |
errorUpdateHandler
Deprecated. |
protected static int |
FIND_FAILURE_MESSAGE_IN_LAST
Deprecated. |
protected static int |
FIND_SUCCESS_MESSAGE_IN_LAST
Deprecated. Bamboo will look at this constant to find how far back in the logs to look for a successful message |
static java.lang.String |
PARAM_BUILD_LABEL
Deprecated. |
static java.lang.String |
PARAM_BUILDJDK
Deprecated. |
static java.lang.String |
PARAM_ENV_VAR
Deprecated. |
static java.lang.String |
PARAM_HASTESTS
Deprecated. |
static java.lang.String |
PARAM_HOME
Deprecated. |
static java.lang.String |
PARAM_PROJECT_FILE
Deprecated. |
static java.lang.String |
PARAM_TEST_RESULTS_DIRECTORY
Deprecated. |
static java.lang.String |
PARAM_WORKING_SUB_DIR
Deprecated. |
protected static boolean |
SEARCH_BUILD_SUCCESS_FAIL_MESSAGE_EVERYWHERE
Deprecated. |
protected TemplateRenderer |
templateRenderer
Deprecated. |
Fields inherited from class com.atlassian.bamboo.command.Command |
---|
buildLoggerManager, customVariableContext |
Fields inherited from interface com.atlassian.bamboo.builder.Builder |
---|
CAPABILITY_BUILDER_PREFIX, CAPABILITY_BUILDER_TYPE |
Constructor Summary | |
---|---|
protected |
AbstractBuilder()
Deprecated. |
Method Summary | |
---|---|
void |
collateTestResults(BuildIdentifier buildIdentifier,
CurrentBuildResult buildResult,
BuildLogger buildLogger)
Deprecated. |
java.util.Map<java.lang.String,java.lang.String> |
customiseLabelTypeMap(java.util.Map<java.lang.String,java.lang.String> labelTypeMap)
Deprecated. Allows the builder to add extra label -> builder type key mappings |
void |
customizeBuildRequirements(PlanKey planKey,
BuildConfiguration buildConfiguration,
RequirementSet requirementSet)
Deprecated. Extension point for adding/customizing requirements when editing a build's builder configuration. |
void |
executeBuild(BuildContext buildContext,
ReadOnlyCapabilitySet capabilitySet)
Deprecated. Runs the build, and updates the build results in the build context. |
java.io.File |
getBuildDir()
Deprecated. Location of build directory |
BuildDirectoryManager |
getBuildDirectoryManager()
Deprecated. |
java.lang.String |
getBuildJdk()
Deprecated. Provide the UI form with the JDK the build needs to be built on |
java.lang.String |
getCapabilityPrefix()
Deprecated. Returns capability prefix of a builder ("system.builder. |
java.lang.String |
getCompleteKey()
Deprecated. Returns the full plugin descriptor key |
java.lang.String |
getEditHtml(BuildConfiguration buildConfiguration,
Plan plan)
Deprecated. Returns HTML that represents the form fragment for editing the repository. |
java.lang.String |
getEnvironmentVariables()
Deprecated. Provides the ui form with the build's system environment variables |
protected FilteredMap<java.lang.String> |
getFilteredParams()
Deprecated. |
java.util.Map<java.lang.String,java.lang.String> |
getFullParams()
Deprecated. Gets the full params that's used to persist. |
java.lang.String |
getKey()
Deprecated. Returns the short simple key for this builder (e.g. |
java.lang.String |
getKeyPrefix()
Deprecated. |
java.lang.String |
getLabel()
Deprecated. What is the label used to getPrettyPrint this item in the GUI? |
java.lang.String |
getPath(ReadOnlyCapabilitySet capabilitySet)
Deprecated. The home path of the builder's command line |
java.lang.String |
getPathHelp()
Deprecated. Return text that will appear as a description under a chosen builder in the "Add Capability" screen |
java.lang.String |
getProjectFile()
Deprecated. Return the project file path relative to the working subdirectory |
java.lang.String |
getSubstitutedEnvironmentVariables()
Deprecated. |
protected java.util.Map<java.lang.String,java.lang.Object> |
getTemplateContext()
Deprecated. |
java.lang.String |
getTestChecked()
Deprecated. Informs the UI if the build is testless. |
java.lang.String |
getTestResultsDirectory()
Deprecated. What are the build's junit test results stored? Can be a comma separated list |
java.lang.String |
getViewHtml(Plan plan)
Deprecated. Returns the HTML that represents the view of the repository configuration |
java.io.File |
getWorkingDirectory()
Deprecated. Get the location of the build file (includes the working sub directory of if it exists) |
java.lang.String |
getWorkingSubDirectory()
Deprecated. Return the optional working subdirectory |
boolean |
hasPassed(int returnCode,
int buildNumber,
java.lang.String planKey)
Deprecated. Determines based on the return code and/or logs whether the build has passed. |
boolean |
hasTests()
Deprecated. Does the build have any tests to be included in the build results web pages? |
void |
init(com.atlassian.plugin.ModuleDescriptor moduleDescriptor)
Deprecated. Initialises the Plugin with the plugin module descriptor |
boolean |
isJdkValid()
Deprecated. |
boolean |
isLabelPathMapConfigurable()
Deprecated. Returns true if the Builder can have its LabelPathMap configurable. |
protected boolean |
outputEndsWith(int positionFromEnd,
java.lang.String expectedText,
java.lang.String planKey,
int buildNumber)
Deprecated. since 3.1 please use ContentMatchingInterceptor |
void |
populateBuildErrors(CurrentBuildResult buildResult,
java.util.List<java.lang.String> errorOutput,
java.lang.String planKey,
int buildNumber)
Deprecated. An extension point for implementors to modify the Error Summary |
void |
prepareConfigObject(BuildConfiguration buildConfiguration)
Deprecated. Do any preprocessing work before validation occurs. |
protected void |
removeAllSystemJdkRequirements(RequirementSet requirementSet)
Deprecated. |
void |
removeBuildRequirements(PlanKey planKey,
BuildConfiguration buildConfiguration,
RequirementSet requirementSet)
Deprecated. Extension point for removing requirements when given plugin is excluded from build's builder configuration. |
CurrentBuildResult |
runBuild(BuildContext buildContext,
ReadOnlyCapabilitySet capabilitySet)
Deprecated. |
void |
setAdministrationConfiguration(AdministrationConfiguration administrationConfiguration)
Deprecated. |
void |
setBuildDir(java.io.File buildDirectory)
Deprecated. Where is the build file file? |
void |
setBuildDirectoryManager(BuildDirectoryManager buildDirectoryManager)
Deprecated. |
void |
setBuildJdk(java.lang.String buildJdk)
Deprecated. Define the JDK the build needs to be built on. |
void |
setBuildLogFileAccessorFactory(BuildLogFileAccessorFactory buildLogFileAccessorFactory)
Deprecated. |
void |
setEnvironmentVariables(java.lang.String envVars)
Deprecated. Define the system environment variabled required to build the build. |
void |
setErrorUpdateHandler(ErrorUpdateHandler errorUpdateHandler)
Deprecated. |
void |
setHasTests(boolean hasTests)
Deprecated. Does the build have any tests to be included in the build results web pages? |
void |
setJdkManager(JdkManager jdkManager)
Deprecated. |
void |
setKey(java.lang.String key)
Deprecated. |
void |
setLabel(java.lang.String label)
Deprecated. Sets the label being used by the builder |
void |
setParams(FilteredMap filteredParams)
Deprecated. Updates the current builder object with |
void |
setProjectFile(java.lang.String projectFile)
Deprecated. Specify project file path relative to the working subdirectory. |
void |
setTemplateRenderer(TemplateRenderer templateRenderer)
Deprecated. |
void |
setTestChecked(java.lang.String enabled)
Deprecated. The user has selected that the build has tests (via a checkbox) |
void |
setTestResultsDirectory(java.lang.String testResultDirectory)
Deprecated. Let the builder specify the location of the build's test result files. |
void |
setWorkingSubDirectory(java.lang.String workingSubDirectory)
Deprecated. Specify the working sub directory |
java.lang.String |
toString()
Deprecated. Default toString simply displays the name so they can be slotted into drop down lists and such like. |
protected abstract ErrorCollection |
validate(FilteredMap<java.lang.String> filteredParams)
Deprecated. |
ErrorCollection |
validate(ReadOnlyCapabilitySet capabilities)
Deprecated. Validate the Builder's current internal settings are still valid |
Methods inherited from class com.atlassian.bamboo.command.Command |
---|
decorateCommandLine, executeCommand, getBuildLoggerManager, getCommandArguments, getCommandExecutable, getCommandLine, getCustomEnvironmentVars, getEnvironmentSetting, getSubstitutedCommandLine, isWindowsPlatform, setBuildLoggerManager, setCustomVariableContext, setPluginAccessor |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.atlassian.bamboo.builder.Builder |
---|
addDefaultLabelPathMaps, getName, isPathValid |
Methods inherited from interface com.atlassian.bamboo.v2.build.BuildConfigurationAwarePlugin |
---|
addDefaultValues, validate |
Field Detail |
---|
protected static final java.lang.String DEFAULT_TEST_REPORTS_XML
public static final java.lang.String PARAM_BUILD_LABEL
public static final java.lang.String PARAM_HASTESTS
public static final java.lang.String PARAM_TEST_RESULTS_DIRECTORY
public static final java.lang.String PARAM_BUILDJDK
public static final java.lang.String PARAM_HOME
public static final java.lang.String PARAM_WORKING_SUB_DIR
public static final java.lang.String PARAM_PROJECT_FILE
public static final java.lang.String PARAM_ENV_VAR
protected static final int FIND_SUCCESS_MESSAGE_IN_LAST
protected static final int FIND_FAILURE_MESSAGE_IN_LAST
public static final java.lang.String BUILD_SUCCESSFUL_MARKER
public static final java.lang.String BUILD_FAILED_MARKER
protected static final boolean SEARCH_BUILD_SUCCESS_FAIL_MESSAGE_EVERYWHERE
protected transient TemplateRenderer templateRenderer
protected transient ErrorUpdateHandler errorUpdateHandler
protected transient BuildDirectoryManager buildDirectoryManager
Constructor Detail |
---|
protected AbstractBuilder()
Method Detail |
---|
public void setAdministrationConfiguration(AdministrationConfiguration administrationConfiguration)
public void setTemplateRenderer(TemplateRenderer templateRenderer)
public void setErrorUpdateHandler(ErrorUpdateHandler errorUpdateHandler)
public void init(@NotNull com.atlassian.plugin.ModuleDescriptor moduleDescriptor)
InitablePluginModule
init
in interface InitablePluginModule
moduleDescriptor
- Plugin module descriptor@NotNull public java.lang.String getKey()
Builder
getKey
in interface Builder
public void setKey(@NotNull java.lang.String key)
public java.lang.String getKeyPrefix()
public java.lang.String getCapabilityPrefix()
@NotNull public java.lang.String getCompleteKey()
Builder
getCompleteKey
in interface Builder
@Nullable public java.lang.String getPath(ReadOnlyCapabilitySet capabilitySet)
Builder
getPath
in interface Builder
@NotNull public java.lang.String getEditHtml(@NotNull BuildConfiguration buildConfiguration, @NotNull Plan plan)
RenderableBuildConfiguration
getEditHtml
in interface RenderableBuildConfiguration
buildConfiguration
- BuildConfiguration
for which edit HTML has to be rendered.plan
- Plan
for which edit HTML has to be rendered. May be null during creation phase of plan.
public void prepareConfigObject(@NotNull BuildConfiguration buildConfiguration)
BuildConfigurationAwarePlugin
prepareConfigObject
in interface BuildConfigurationAwarePlugin
buildConfiguration
- - @NotNullpublic void customizeBuildRequirements(@NotNull PlanKey planKey, @NotNull BuildConfiguration buildConfiguration, @NotNull RequirementSet requirementSet)
ConfigurablePlugin
customizeBuildRequirements
in interface ConfigurablePlugin
planKey
- key of Plan
for which requirements has to be removed.buildConfiguration
- source of information for customizing build requirementsrequirementSet
- requirements to be customizedpublic void removeBuildRequirements(@NotNull PlanKey planKey, @NotNull BuildConfiguration buildConfiguration, @NotNull RequirementSet requirementSet)
ConfigurablePlugin
removeBuildRequirements
in interface ConfigurablePlugin
planKey
- key of Plan
for which requirements has to be removed.buildConfiguration
- source of information for customizing build requirementsrequirementSet
- requirements to be customizedprotected void removeAllSystemJdkRequirements(@NotNull RequirementSet requirementSet)
public boolean isLabelPathMapConfigurable()
Builder
LabelPathMap
configurable. If it can't be, it won't be displayed
on the ConfigureBuilder page.
isLabelPathMapConfigurable
in interface Builder
LabelPathMap
is configurablepublic java.util.Map<java.lang.String,java.lang.String> customiseLabelTypeMap(java.util.Map<java.lang.String,java.lang.String> labelTypeMap)
Builder
customiseLabelTypeMap
in interface Builder
labelTypeMap
- may be nullprotected java.util.Map<java.lang.String,java.lang.Object> getTemplateContext()
public void executeBuild(@NotNull BuildContext buildContext, ReadOnlyCapabilitySet capabilitySet) throws java.lang.InterruptedException, RepositoryException
BuilderV2
executeBuild
in interface BuilderV2
java.lang.InterruptedException
RepositoryException
public CurrentBuildResult runBuild(@NotNull BuildContext buildContext, @NotNull ReadOnlyCapabilitySet capabilitySet) throws java.lang.InterruptedException
java.lang.InterruptedException
public void populateBuildErrors(CurrentBuildResult buildResult, java.util.List<java.lang.String> errorOutput, java.lang.String planKey, int buildNumber)
populateBuildErrors
in interface BuilderV2
buildResult
- - CurrentBuildResult
representing the results of the current builderrorOutput
- - ErrorLogEntry
objects representing the current std error outputpublic void collateTestResults(BuildIdentifier buildIdentifier, CurrentBuildResult buildResult, BuildLogger buildLogger) throws java.lang.InterruptedException
java.lang.InterruptedException
public boolean hasPassed(int returnCode, int buildNumber, java.lang.String planKey)
BuilderV2
hasPassed
in interface BuilderV2
returnCode
- return code from build execution commandplanKey
- @return true if build has passedpublic void setBuildDir(java.io.File buildDirectory)
buildDirectory
- The directory containing the build filepublic java.io.File getBuildDir()
public java.io.File getWorkingDirectory()
getWorkingDirectory
in class Command
@NotNull public java.lang.String getLabel()
getLabel
in interface Builder
public void setLabel(@NotNull java.lang.String label)
Builder
setLabel
in interface Builder
public java.lang.String getTestResultsDirectory()
public void setTestResultsDirectory(java.lang.String testResultDirectory)
testResultDirectory
- The location of the junit test result xml filespublic java.lang.String getWorkingSubDirectory()
public void setWorkingSubDirectory(java.lang.String workingSubDirectory)
workingSubDirectory
- Working subdirectory relative to build rootpublic java.lang.String getProjectFile()
public void setProjectFile(java.lang.String projectFile)
projectFile
- project file path relative to the working subdirectorypublic java.lang.String toString()
toString
in class java.lang.Object
public boolean hasTests()
hasTests
in interface Builder
public void setHasTests(boolean hasTests)
hasTests
- True if the build should have tests.public void setTestChecked(java.lang.String enabled)
enabled
- set to "on" by the webwork frameworkpublic java.lang.String getTestChecked()
public void setEnvironmentVariables(java.lang.String envVars)
MutableEnvironmentVariablesAwareBuilder
setEnvironmentVariables
in interface MutableEnvironmentVariablesAwareBuilder
envVars
- The paramspublic java.lang.String getEnvironmentVariables()
EnvironmentVariablesAwareBuilder
getEnvironmentVariables
in interface EnvironmentVariablesAwareBuilder
@Nullable public java.lang.String getSubstitutedEnvironmentVariables()
@Nullable public java.lang.String getBuildJdk()
getBuildJdk
in interface Builder
public void setBuildJdk(@NotNull java.lang.String buildJdk)
setBuildJdk
in interface Builder
buildJdk
- The JAVA_HOME JDKpublic boolean isJdkValid()
@Deprecated protected boolean outputEndsWith(int positionFromEnd, java.lang.String expectedText, java.lang.String planKey, int buildNumber)
ContentMatchingInterceptor
positionFromEnd
- The expectedText should be wihtin positionFromEnd lines of the end of the output. If 0
the text will not be looked through at all, if -1 the entire text will be searchedexpectedText
- The text to look forplanKey
- The key for the build to check outputbuildNumber
- The build number to chek the output of
public void setParams(@NotNull FilteredMap filteredParams)
Builder
setParams
in interface Builder
filteredParams
- - Filtered Map with the prefix builder key stripped out@NotNull public ErrorCollection validate(ReadOnlyCapabilitySet capabilities)
Builder
validate
in interface Builder
protected abstract ErrorCollection validate(FilteredMap<java.lang.String> filteredParams)
@NotNull public java.util.Map<java.lang.String,java.lang.String> getFullParams()
Builder
getFullParams
in interface Builder
protected FilteredMap<java.lang.String> getFilteredParams()
@NotNull public java.lang.String getViewHtml(@NotNull Plan plan)
RenderableBuildConfiguration
getViewHtml
in interface RenderableBuildConfiguration
@NotNull public java.lang.String getPathHelp()
getPathHelp
in interface Builder
public BuildDirectoryManager getBuildDirectoryManager()
public void setBuildDirectoryManager(BuildDirectoryManager buildDirectoryManager)
public void setJdkManager(JdkManager jdkManager)
public void setBuildLogFileAccessorFactory(BuildLogFileAccessorFactory buildLogFileAccessorFactory)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |