File tree 3 files changed +25
-0
lines changed
3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ /// Contains code to configure FAKE for Bitbucket Pipelines integration
2
+ module Fake.BitbucketPipelines
3
+
4
+ /// Bitbucket Pipelines environment variables as [described](https://confluence.atlassian.com/bitbucket/environment-variables-in-bitbucket-pipelines-794502608.html)
5
+ type BitbucketPipelinesEnvironment =
6
+
7
+ /// The commit hash of a commit that kicked off the build
8
+ static member Commit = environVar " BITBUCKET_COMMIT"
9
+
10
+ /// The branch on which the build was kicked off. This value is only available on branches.
11
+ static member Branch = environVar " BITBUCKET_BRANCH"
12
+
13
+ /// The tag of a commit that kicked off the build. This value is only available on tags.
14
+ static member Tag = environVar " BITBUCKET_TAG"
15
+
16
+ /// The URL-friendly version of a repository name.
17
+ static member RepoSlug = environVar " BITBUCKET_REPO_SLUG"
18
+
19
+ /// The name of the account in which the repository lives
20
+ static member RepoOwner = environVar " BITBUCKET_REPO_OWNER"
21
+
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ type BuildServer =
12
12
| AppVeyor
13
13
| GitLabCI
14
14
| Bamboo
15
+ | BitbucketPipelines
15
16
| LocalBuild
16
17
17
18
/// The trace mode option.
@@ -88,6 +89,7 @@ let buildServer =
88
89
elif isGitlabCI then GitLabCI
89
90
elif isTFBuild then TeamFoundation
90
91
elif isBambooBuild then Bamboo
92
+ elif hasBuildParam " BITBUCKET_COMMIT" then BitbucketPipelines
91
93
else LocalBuild
92
94
93
95
/// The current build version as detected from the current build server.
@@ -103,6 +105,7 @@ let buildVersion =
103
105
| TeamFoundation -> getVersion tfBuildNumber
104
106
| Bamboo -> getVersion bambooBuildNumber
105
107
| LocalBuild -> getVersion localBuildLabel
108
+ | BitbucketPipelines -> getVersion " "
106
109
107
110
/// Is true when the current build is a local build.
108
111
let isLocalBuild = LocalBuild = buildServer
Original file line number Diff line number Diff line change 61
61
<Compile Include =" ProcessHelper.fs" />
62
62
<Compile Include =" NpmHelper.fs" />
63
63
<Compile Include =" AppVeyor.fs" />
64
+ <Compile Include =" BitbucketPipelines.fs" />
64
65
<Compile Include =" TaskRunnerHelper.fs" />
65
66
<Compile Include =" Globbing\Globbing.fs" />
66
67
<Compile Include =" Globbing\FileSystem.fs" />
You can’t perform that action at this time.
0 commit comments