Is there a way to specify which SVN revision to checkout in a TeamCity build?
If I attempt to change the SVN URL to include the revision using the @ notation, eg.
svn+ssh://svn/some/url@1234
then I get an error ("Unknown path kind").
I've searched all TeamCity documentation and can find nothing appropriate.
The background to this question is that I would like to run tests on a particular revision that for some reason was not done in the past (eg. the URL was not in TeamCity at the time).
VCS checkout rules allow you to check out a part of the configured VCS root and to map directories from the version control to subdirectories in the build checkout directory on a build agent.
The build checkout directory is a directory on the TeamCity agent machine where all the sources of all builds are checked out into. If you use the agent-side checkout mode, the build agent checks out the sources into this directory before the build.
Yes, just hit the ellipses next to the "Run" button to trigger a custom build and choose the revision from the "Last change to include" list in the resultant screen. BUT - you can only choose from revisions which the build has previously run.
Unfortunately the only other option is to create a separate VCS root against a tag of the revision you want to run to do this. Not elegant, but it works.
For git, there is this solution. I'm not sure how it will work for svn.
There is a way to have TeamCity list all branches in the 'custom build' dialog (the one you open by clicking the elipsis ... next to the Run button), including ones that haven't been built yet.
To show the branches, go to your VCS root, and set a branch specification. For git, it will be something like:
+:refs/heads/*
The star *
here is a placeholder for what to show in the branches dropdown.
Note that this may cause your configurations to build on all branches automatically - so you may want to update the build triggers.
See the docs about feature branches for more.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With