This documentation relates to an earlier version of Bamboo.
View

Unknown macro: {spacejump}

or visit the current documentation home.

The following methods allow you to interact with Bamboo's build results. The following methods require authentication and actions/results will be restricted by the user's permissions.


Add Comment To Build Result

Adds a comment to the given build result

Arguments:

Parameter Name

Description

auth

Authentication token retrieved via the login method.

buildKey

Key representing the build plan.

buildNumber

The build number you wish to add the comment to.

content

The comment to add. Remember to ensure it is escaped correctly

URL:

/api/rest/addCommentToBuildResults.action

Example:

/api/rest/addCommentToBuildResults.action?auth=YOwcnQHh5q&buildKey=MYPROJECT-TRUNK&buildNumber=109&content=my%20comment

Successful Response

<response/>

Add Label To Build Result

Adds a label to the given build result

Arguments:

Parameter Name

Description

auth

Authentication token retrieved via the login method.

buildKey

Key representing the build plan.

buildNumber

The build number you wish to add the label to.

label

The label to add

URL:

/api/rest/addLabelToBuildResults.action

Example:

/api/rest/addLabelToBuildResults.action?auth=YOwcnQHh5q&buildKey=MYPROJECT-TRUNK&buildNumber=109&label=myLabel

Successful Response

<response/>

Get Build Result Details

Returns more specific information about a particular build result

Arguments:

Parameter Name

Description

auth

Authentication token retrieved via the login method

buildKey

Key representing the build plan

buildNumber

Number identifying the build result to retrieve

URL:

/api/rest/getBuildResultsDetails.action

Example:

/api/rest/getBuildResultsDetails.action?auth=YOwcnQHh5q&buildKey=MYPROJECT-TRUNK&buildNumber=109

Successful Response

<response vcsRevisionKey="75149">
    <commits>
	 <commit author="bob" date="2009-02-18T17:22:38+1100">
		<comment>
                     Fixing annoying bug with Command Executer
		</comment>
		<files>
		     <file name="/trunk/components/bamboo-core/src/main/java/com/atlassian/bamboo/command/Command.java"
                          revision="75149"/>
		</files>
		</commit>
	</commits>
	<failedTests>
		<testResult testClass="com.atlassian.bamboo.builder.coverage.CloverReportParserTest"
                        testMethod="testExtractsProjectCoveragePercentage" duration="0.195">
		     <errors>
			    <error>
				org.dom4j.DocumentException: null Nested exception: null
					at org.dom4j.io.SAXReader.read(SAXReader.java:358)
					at org.dom4j.io.SAXReader.read(SAXReader.java:261)
			    </error>
		     </errors>
		</testResult>
	</failedTests>
	<successfulTests>
		<testResult testClass="com.atlassian.bamboo.rest.GetRecentlyCompletedBuildResultsForBuildTest"
                        testMethod="testExecutesNormally" duration="0.002">
                </testResult>
	        <testResult testClass="com.atlassian.bamboo.util.HtmlUtilsTest"
                        testMethod="testPreformattedTextMupltipleSpaces" duration="0.002">
                </testResult>
	</successfulTests>
</response>

Element

Description

Value Range

vcsRevisionKey

The revision built in this builds

Dependent on vcs system e.g svn uses numbering system, CVS uses dates

commits

List of commits included in this build

 

commit

Represents an individual change included in this build

 

commit: author

The author that committed the change

Author name as provided by the vcs system

commit: date

Timestamp of when the change was committed

String representation of the data provided by the vcs system

comment

Any comment provided along with the commit

Freeform content.

files

List of files changed in the commit

 

file

Represents and individual file changed as part of the commit

 

file: name

The name of the file

Full path of file as provided by the vcs system

file: revision

The revision of the individual file

Depends on the vcs system, can be numeric, can be date, can be the same as the vcsRevision

failedTests

Lists any tests that failed as part of this build

 

successfulTests

Lists any tests that passed in this build

 

testResult

Represents an individual test

 

testResult: testClass

The class name of the test

Fully qualified class name

testResult: testMethod

The method name of the test

Unchanged method name

testResult: duration

How long it took the test to execute

Duration in seconds

errors

List of errors generated by the test

 

error

Error output of an individual error

Freeform content

  • No labels