|
||||||||||
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 com.atlassian.bamboo.plugins.builder.php.AbstractPhpUnitBuilder
public abstract class AbstractPhpUnitBuilder
This class provides a PHPUnit version of Builder
.
Field Summary | |
---|---|
protected java.lang.String |
arguments
|
protected static java.lang.String |
BUILD_SUCCESSFUL_MARKER
|
protected java.lang.String |
coverageHtmlDirectory
|
protected boolean |
coverageHtmlEnabled
|
protected boolean |
logXmlEnabled
|
protected java.lang.String |
logXmlFile
|
protected java.lang.String |
options
|
static java.lang.String |
PATHHELP
|
Fields inherited from class com.atlassian.bamboo.builder.AbstractBuilder |
---|
BUILD_FAILED_MARKER, buildDirectoryManager, DEFAULT_TEST_REPORTS_XML, errorUpdateHandler, FIND_FAILURE_MESSAGE_IN_LAST, FIND_SUCCESS_MESSAGE_IN_LAST, PARAM_BUILD_LABEL, PARAM_BUILDJDK, PARAM_ENV_VAR, PARAM_HASTESTS, PARAM_HOME, PARAM_PROJECT_FILE, PARAM_TEST_RESULTS_DIRECTORY, PARAM_WORKING_SUB_DIR, SEARCH_BUILD_SUCCESS_FAIL_MESSAGE_EVERYWHERE, templateRenderer |
Fields inherited from class com.atlassian.bamboo.command.Command |
---|
buildLoggerManager, CBD_BUILD_COMMANDLINE, substitutionBean |
Fields inherited from interface com.atlassian.bamboo.builder.Builder |
---|
CAPABILITY_BUILDER_PREFIX, CAPABILITY_BUILDER_TYPE |
Constructor Summary | |
---|---|
AbstractPhpUnitBuilder()
|
Method Summary | |
---|---|
void |
addDefaultValues(BuildConfiguration configuration)
Extension point for adding default values to the form for BuildConfigurationAwarePlugin.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan) |
int |
executeCommand(BuildContext buildContext,
CommandExecuteStreamHandler commandExecuteStreamHandler,
java.lang.String extraEnvironmentVariables,
java.lang.String javaHome,
ReadOnlyCapabilitySet capabilitySet)
Check if output directories for PHPUnit are created. |
java.io.File |
findPhpUnitExecutable()
Find PHPUnit executable in system paths |
java.lang.String |
getArguments()
|
java.lang.String[] |
getCommandArguments(ReadOnlyCapabilitySet capabilitySet)
What are the arguments for the command line to execute |
java.lang.String |
getCommandExecutable(ReadOnlyCapabilitySet capabilitySet)
What is the executable for the command line to execute |
java.lang.String |
getCoverageHtmlDirectory()
|
protected java.lang.String[] |
getCustomEnvironmentVars(ReadOnlyCapabilitySet capabilitySet)
|
java.util.Map<java.lang.String,java.lang.String> |
getFullParams()
Gets the full params that's used to persist. |
java.lang.String |
getLogXmlFile()
|
protected abstract java.lang.String |
getLogXmlOption()
|
java.lang.String |
getPathHelp()
Help text for the builder type |
java.lang.String |
getPhpUnitVersion(java.lang.String phpUnitPath)
Parse output of "phpunit --version" |
java.lang.String |
getTestResultsDirectory()
What are the build's junit test results stored? Can be a comma separated list |
boolean |
hasPassed(int returnCode,
int buildNumber,
java.lang.String planKey)
Determines based on the return code and/or logs whether the build has passed. |
boolean |
hasTests()
Does the build have any tests to be included in the build results web pages? |
boolean |
isCoverageHtmlEnabled()
|
boolean |
isLogXmlEnabled()
|
boolean |
isPathValid(java.lang.String path)
Check for a full path to phpunit script |
void |
setArguments(java.lang.String arguments)
|
void |
setCoverageHtmlDirectory(java.lang.String coverageHtmlDirectory)
|
void |
setCoverageHtmlEnabled(boolean coverageHtmlEnabled)
|
void |
setLogXmlEnabled(boolean logXmlEnabled)
|
void |
setLogXmlFile(java.lang.String logXmlFile)
|
void |
setParams(FilteredMap filteredBuilderParams)
Updates the current builder object with |
ErrorCollection |
validate(BuildConfiguration buildConfiguration)
Validates the properties in the BuildConfiguration object. |
ErrorCollection |
validate(FilteredMap filteredParams)
Validate that the goal has been defined |
Methods inherited from class com.atlassian.bamboo.command.Command |
---|
decorateCommandLine, getBuildLoggerManager, getCommandLine, getEnvironmentSetting, getSubstitutedCommandLine, getVariableSubstitutionBean, isWindowsPlatform, setBuildLoggerManager, setPluginAccessor, setVariableSubstitutionBean |
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 |
Field Detail |
---|
public static final java.lang.String PATHHELP
protected static final java.lang.String BUILD_SUCCESSFUL_MARKER
protected java.lang.String arguments
protected boolean logXmlEnabled
protected java.lang.String logXmlFile
protected boolean coverageHtmlEnabled
protected java.lang.String coverageHtmlDirectory
protected java.lang.String options
Constructor Detail |
---|
public AbstractPhpUnitBuilder()
Method Detail |
---|
@NotNull protected abstract java.lang.String getLogXmlOption()
@NotNull public java.lang.String getCommandExecutable(ReadOnlyCapabilitySet capabilitySet)
getCommandExecutable
in class Command
capabilitySet
- - for the current context
@NotNull public java.lang.String[] getCommandArguments(ReadOnlyCapabilitySet capabilitySet)
getCommandArguments
in class Command
capabilitySet
- - for the current context
public ErrorCollection validate(FilteredMap filteredParams)
validate
in class AbstractBuilder
@NotNull public ErrorCollection validate(@NotNull BuildConfiguration buildConfiguration)
BuildConfigurationAwarePlugin
BuildConfiguration
object. The name of the properties match those passed
in through the form fragments in BuildConfigurationAwarePlugin.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)
template.
buildConfiguration
- - @NotNull
ErrorCollection
keyed by the field name. @NotNullpublic void addDefaultValues(@NotNull BuildConfiguration configuration)
BuildConfigurationAwarePlugin
BuildConfigurationAwarePlugin.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)
configuration
- - @NotNull@Nullable public java.io.File findPhpUnitExecutable()
@Nullable public java.lang.String getPhpUnitVersion(@NotNull java.lang.String phpUnitPath)
phpUnitPath
- path to phpunit script
public boolean hasPassed(int returnCode, int buildNumber, java.lang.String planKey)
BuilderV2
hasPassed
in interface BuilderV2
hasPassed
in class AbstractBuilder
returnCode
- return code from build execution commandplanKey
- @return true if build has passedpublic void setParams(@NotNull FilteredMap filteredBuilderParams)
Builder
setParams
in interface Builder
setParams
in class AbstractBuilder
filteredBuilderParams
- - Filtered Map with the prefix builder key stripped out@NotNull public java.util.Map<java.lang.String,java.lang.String> getFullParams()
Builder
getFullParams
in interface Builder
getFullParams
in class AbstractBuilder
public int executeCommand(@NotNull BuildContext buildContext, @NotNull CommandExecuteStreamHandler commandExecuteStreamHandler, java.lang.String extraEnvironmentVariables, java.lang.String javaHome, ReadOnlyCapabilitySet capabilitySet) throws CommandException
executeCommand
in class Command
buildContext
- The BuildContext for the current buildcommandExecuteStreamHandler
- Stream Handler for the output of the execute commandextraEnvironmentVariables
- environment variable additional to those already in the env (e.g provided by the user via UI)javaHome
- The java home value for this commandcapabilitySet
- Capability set
CommandException
public boolean hasTests()
AbstractBuilder
hasTests
in interface Builder
hasTests
in class AbstractBuilder
public java.lang.String getTestResultsDirectory()
AbstractBuilder
getTestResultsDirectory
in class AbstractBuilder
public boolean isPathValid(java.lang.String path)
protected java.lang.String[] getCustomEnvironmentVars(ReadOnlyCapabilitySet capabilitySet)
getCustomEnvironmentVars
in class Command
@NotNull public java.lang.String getPathHelp()
Builder
getPathHelp
in interface Builder
getPathHelp
in class AbstractBuilder
public void setArguments(java.lang.String arguments)
public java.lang.String getArguments()
public boolean isLogXmlEnabled()
public void setLogXmlEnabled(boolean logXmlEnabled)
public java.lang.String getLogXmlFile()
public void setLogXmlFile(java.lang.String logXmlFile)
public boolean isCoverageHtmlEnabled()
public void setCoverageHtmlEnabled(boolean coverageHtmlEnabled)
public java.lang.String getCoverageHtmlDirectory()
public void setCoverageHtmlDirectory(java.lang.String coverageHtmlDirectory)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |