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

GitVersion doesn't detect pull requests for Buildkite #3012

Closed
santhonisz opened this issue Feb 24, 2022 · 1 comment · Fixed by #3013
Closed

GitVersion doesn't detect pull requests for Buildkite #3012

santhonisz opened this issue Feb 24, 2022 · 1 comment · Fixed by #3013
Labels
Milestone

Comments

@santhonisz
Copy link
Contributor

santhonisz commented Feb 24, 2022

Since GitVersion 5.8.2, support for running in Buildkite has been added. However when running GitVersion for pull requests in Buildkite, the returned version strings do not match the expected format.

Expected Behavior

The format of the returned variables e.g. SemVer should match the respective pull-request branch configuration as per the documentation.

For example if we had a repo that where main was currently on version 6.9.0, we would expect to see a version number on PRs such as "SemVer": "6.10.0-PullRequest022.1"

Actual Behavior

The format of the returned variables match the branch configuration of feature branches e.g. "SemVer": "6.10.0-foo.1"

Possible Fix

The problem is likely that for pull requests the BUILDKITE_BRANCH env var value references the head i.e. source branch of the PR. I assume this causes the regex pattern on the branch configuration to not match.

Steps to Reproduce

Follow the instructions as per the GitVersion documentation example, but run it for a PR.

Context

This creates a difference when running in Buildkite compared to our other CI systems (including TeamCity).

Your Environment

  • Version Used: 5.8.2
  • Operating System and version: Windows 10/ Windows Server 2019
@santhonisz santhonisz added the bug label Feb 24, 2022
@arturcic arturcic added this to the 5.x milestone Feb 24, 2022
@arturcic arturcic modified the milestones: 5.x, 5.8.3 Mar 5, 2022
@github-actions
Copy link

github-actions bot commented Mar 5, 2022

🎉 This issue has been resolved in version 5.8.3 🎉
The release is available on:

Your GitReleaseManager bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants