-
Notifications
You must be signed in to change notification settings - Fork 653
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 build agent for BitBucket Pipelines #3069
Add build agent for BitBucket Pipelines #3069
Conversation
@davidkeaveny great that you add BitBucket Pipelines support, can you also add a test here https://github.com/GitTools/GitVersion/blob/support/5.x/src/GitVersion.App.Tests/PullRequestInBuildAgentTest.cs |
@arturcic I've added the test to the requested test fixture, and it passes (assuming I'm using it correctly!). How would I go about doing an end-to-end test? With BitBucket Cloud, build steps run in containers, so I have to install GitVersion as a global tool before running it; I can't just copy a build from my local PC to an on-premise build server. |
@davidkeaveny to have this PR ready to be merged we also need the docs to be updated - can you add a page here as well https://github.com/GitTools/GitVersion/tree/support/5.x/docs/input/docs/reference/build-servers ? |
When this PR is merged we can prepare a new build as there are already some new code to be released |
I've added initial documentation for using the CLI tool; I haven't documented the use of the Docker image yet because I haven't had a chance to try it out yet. |
@davidkeaveny, where we would like BitBucket Pipelines support documented is on Build Servers. |
00261df
to
b6ccb39
Compare
Co-authored-by: Gary Ewan Park <gep13@gep13.co.uk>
…be more in line with other build agents
…t' into feature/add-bitbucket-build-agent
Sorry @gep13 , I can't see what the requested change is. |
The requested/suggested changes from me was the slight change to wording in the markdown file, and the removal of the RedirectFrom. Both of these look to have been taken care of. The remaining item would be the decision between |
I would say |
Thank you @davidkeaveny for your contribution! |
Merge pull request #3069 from davidkeaveny/feature/add-bitbucket-build-agent Add build agent for BitBucket Pipelines
Is it possible to publish pre-release versions, so that I can test this on my BitBucket Pipelines? If not, is there any particular schedule that GitVersion is working on for a next release? |
There are some PR @asbjornu is working on, so whenever he says he's done we can release. |
🎉 This issue has been resolved in version 5.10.0 🎉 Your GitReleaseManager bot 📦🚀 |
Description
Added a build agent that supports Atlassian's BitBucket Pipelines. It follows a similar pattern to the GitHub Actions build agent, in that it writes out the output from GitVersion to a file which can then be imported into Pipelines.
Related Issue
#3057
Motivation and Context
At present, GitVersion cannot generate version numbers when executed in BitBucket Pipelines on branches that are not
develop
ormain\master
(see related issue). By creating a specific build agent, I am hoping to fix this issue.How Has This Been Tested?
I have created a set of unit tests in the GitVersion.Core.Tests project in the BuildAgents folder.
The build agent can be run from the command line by setting the environment variable
BITBUCKET_WORKSPACE
to any non-empty value, andBITBUCKET_BRANCH
to the branch being built (these values are set automatically by the BitBucket Pipeline).e.g.
In addition to writing the output to the screen, a file
gitversion.env
will be created; in BitBucket Pipelines, this file would then be imported to add the new environment variables.Testing on the build server will require a new NuGet package containing the updated GitVersion.
Checklist: