You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GitVersion should be able to use Buildkite environment variables to detect the current branch rather than doing some extra checkouts to get out of a detached HEAD state.
Detailed Description
Add a new Buildkite class that extends the BuildAgentBase class. This would allow GitVersion to work more seamlessly when running on a Buildkite agent. Implementation would roughly be:
CanApplyToCurrentContext() would check that the $BUILDKITE environment variable is set to true
GetCurrentBranch() would return the value that the BUILDKITE_BRANCH environment variable is set to
Could also be nice to have GitVersion set version info via Buildkite's meta-data - but I'm not sure how good of an idea it is to have GitVersion exec another process...Besides you can always just call it yourself somewhere in your build pipeline like so:
GitVersion should be able to use Buildkite environment variables to detect the current branch rather than doing some extra checkouts to get out of a detached HEAD state.
Detailed Description
Add a new Buildkite class that extends the
BuildAgentBase
class. This would allow GitVersion to work more seamlessly when running on a Buildkite agent. Implementation would roughly be:CanApplyToCurrentContext()
would check that the$BUILDKITE
environment variable is set totrue
GetCurrentBranch()
would return the value that theBUILDKITE_BRANCH
environment variable is set toc.f. Buildkite Environment Variables
Could also be nice to have GitVersion set version info via Buildkite's meta-data - but I'm not sure how good of an idea it is to have GitVersion exec another process...Besides you can always just call it yourself somewhere in your build pipeline like so:
Context
By default a Buildkite agent checks out a branch in detached HEAD state. It's possible to work around it via doing this at start of every build:
Would be nice for GitVersion to automatically detect the branch name via the built-in
$BUILDKITE_BRANCH
environment variable.Possible Implementation
Have a branch ready to PR here: aidenhaak@f9492d6 🙂
The text was updated successfully, but these errors were encountered: