Skip to content

Commit

Permalink
fixes #777, add buildkite branch for recorded runs
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-mann committed Oct 20, 2017
1 parent ede5efc commit ea7939a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/server/lib/modes/record.coffee
Expand Up @@ -23,7 +23,7 @@ logException = (err) ->

module.exports = {
getBranch: (repo) ->
for branch in ["CIRCLE_BRANCH", "TRAVIS_BRANCH", "CI_BRANCH"]
for branch in ["CIRCLE_BRANCH", "TRAVIS_BRANCH", "BUILDKITE_BRANCH", "CI_BRANCH"]
if b = process.env[branch]
return Promise.resolve(b)

Expand Down
7 changes: 7 additions & 0 deletions packages/server/test/unit/modes/record_spec.coffee
Expand Up @@ -46,6 +46,13 @@ describe "lib/modes/record", ->
record.getBranch(@repo).then (ret) ->
expect(ret).to.eq("bem/travis")

it "gets branch from process.env.BUILDKITE_BRANCH", ->
process.env.BUILDKITE_BRANCH = "bem/buildkite"
process.env.CI_BRANCH = "bem/ci"

record.getBranch(@repo).then (ret) ->
expect(ret).to.eq("bem/buildkite")

it "gets branch from process.env.CI_BRANCH", ->
process.env.CI_BRANCH = "bem/ci"

Expand Down

0 comments on commit ea7939a

Please sign in to comment.