On the builds server I have set up TeamCity (8.1.1) so that it executes the build process if there are changes in either the master, one of the feature branches or one of the pull request branches using the branch specifier:
I have turned on the build agent option:
which clones the repository in a directory outside the build directory and then pulls from that local repository.
The build process needs access to the git repository and the master branch, even for builds of one of the feature branches or pull request branches. However TeamCity only has the branch that contains the changes in the local repository thereby making my builds fail, e.g. when the change was on the issue/mycoolissue branch then that is the only branch that exists in the git repository in the TeamCity working space.
I have tried performing a local
to get the master branch but because the local repository does not have the master branch this fails. While I could add a remote pointing to the origin (a github private repository) that would mean that I'd have to handle credentials as well and I'd rather have TeamCity take care of all of that for me.
My question is whether there is a way to tell TeamCity to just pull all the branches into both the local repository and the working repository?