Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for builds within Bamboo Server #1015

Merged
merged 1 commit into from
Nov 30, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/app/FakeLib/BuildServerHelper.fs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ type BuildServer =
| Travis
| AppVeyor
| GitLabCI
| Bamboo
| LocalBuild

/// The trace mode option.
Expand All @@ -30,6 +31,15 @@ let localBuildLabel = "LocalBuild"
/// This output file can be specified by using the *logfile* build parameter.
let mutable xmlOutputFile = getBuildParamOrDefault "logfile" "./output/Results.xml"

/// Build number retrieved from Bamboo
/// [omit]
let bambooBuildNumber = environVar "BAMBOO_BUILDNUMBER"

/// Checks if we are on Bamboo
/// [omit]
let isBambooBuild =
isNotNullOrEmpty bambooBuildNumber

/// Checks if we are on Team Foundation
/// [omit]
let isTFBuild =
Expand Down Expand Up @@ -77,6 +87,7 @@ let buildServer =
elif not (isNullOrEmpty appVeyorBuildVersion) then AppVeyor
elif isGitlabCI then GitLabCI
elif isTFBuild then TeamFoundation
elif isBambooBuild then Bamboo
else LocalBuild

/// The current build version as detected from the current build server.
Expand All @@ -90,6 +101,7 @@ let buildVersion =
| AppVeyor -> getVersion appVeyorBuildVersion
| GitLabCI -> getVersion gitlabCIBuildNumber
| TeamFoundation -> getVersion tfBuildNumber
| Bamboo -> getVersion bambooBuildNumber
| LocalBuild -> getVersion localBuildLabel

/// Is true when the current build is a local build.
Expand Down