Skip to content

Build service

Tom Birras edited this page Dec 1, 2020 · 2 revisions

This service handles all kinds of requests regarding Bamboo builds that are part of every plan.
The following functions are available:

GetAllBuilds()

Gets all builds of all plans.

Optional request parameter Description
WithMaxResult(int maxResult) Limits the maximum amount of returned results
StartAtIndex(int startIndex) Starting index of result list (zero-based)
OnlyFailedBuilds() Include only failed builds
OnlySuccessfulBuilds() Include only successful builds
OnlyUncompletedBuilds() Include only uncompleted builds
OnlyWithIssues(string[] jiraIssues) Include only builds that have these Jira issues assigned
OnlyWithLabels(string[] labels) Include only builds that have these labels added
IncludeBuildInformation() Includes detailed information to every build

GetBuildsOfPlan(string projectKey, string planKey)

Gets all builds of a given plan.

projectKey - Unique key that identifies the project
planKey - Unique key that identifies the plan

Optional request parameter Description
WithMaxResult(int maxResult) Limits the maximum amount of returned results
StartAtIndex(int startIndex) Starting index of result list (zero-based)
OnlyFailedBuilds() Include only failed builds
OnlySuccessfulBuilds() Include only successful builds
OnlyUncompletedBuilds() Include only uncompleted builds
OnlyWithIssues(string[] jiraIssues) Include only builds that have these Jira issues assigned
OnlyWithLabels(string[] labels) Include only builds that have these labels added
IncludeBuildInformation() Includes detailed information to every build

GetInformationOfLatestBuild(string projectKey, string planKey)

Gets detailed information of the latest build of a given plan.

projectKey - Unique key that identifies the project
planKey - Unique key that identifies the plan

Optional request parameter Description
IncludeBuildInformation() Includes detailed information to the build

GetInformationOfBuild(string projectKey, string planKey, uint buildNumber)

Gets detailed information of a specific build of a given plan.

projectKey - Unique key that identifies the project
planKey - Unique key that identifies the plan
buildNumber - Number of the build

Optional request parameter Description
IncludeBuildInformation() Includes detailed information to the build

GetCommentsOfBuild(string projectKey, string planKey, uint buildNumber)

Gets all comments of a specific build.

projectKey - Unique key that identifies the project
planKey - Unique key that identifies the plan
buildNumber - Number of the build

AddCommentToBuild(string projectKey, string planKey, uint buildNumber, string comment)

Adds a comment to the specific build.

projectKey - Unique key that identifies the project
planKey - Unique key that identifies the plan
buildNumber - Number of the build
comment - Comment which should be added

GetLabelsOfBuild(string projectKey, string planKey, uint buildNumber)

Gets all labels of a specific build.

projectKey - Unique key that identifies the project
planKey - Unique key that identifies the plan
buildNumber - Number of the build

AddLabelToBuild(string projectKey, string planKey, uint buildNumber, string label)

Adds a label to the specific build.

projectKey - Unique key that identifies the project
planKey - Unique key that identifies the plan
buildNumber - Number of the build
label - Label which should be added

DeleteLabelOfBuild(string projectKey, string planKey, uint buildNumber, string label)

Deletes a label from the specific build.

projectKey - Unique key that identifies the project
planKey - Unique key that identifies the plan
buildNumber - Number of the build
label - Label which should be removed