Can TeamCity push successful builds to a git repository?
I cannot see a specific build step in TeamCity to do this.
I use the version 7.1.1 of TeamCity
Thanks, Henrik
UPDATE:
Ok thanks for your answer, I find it a bit complicated. I found out that I can simply push back tags on successful builds to my global repository from which TeamCity fetches data for the build. I can pull changes from it and see whether the last commits were successful.
I would be happy if TeamCity provided a simple option for this kind of workflow!
It would be awesome if every developer could just pull from a repo that is only updated when the build is successful, or am I wrong here?
Edit → Verify → Commit Unlike the standard scenario (edit, commit, verify), TeamCity's Pre-tested Commit feature allows you to remotely verify your changes BEFORE committing them to the VCS. If your changes pass, TeamCity (in cooperation with your IDE) AUTOMATICALLY commits them to Version Control.
In the command line, navigate to the root directory of your project. Initialize the local directory as a Git repository. To create a repository for your project on GitHub, use the gh repo create subcommand. When prompted, select Push an existing local repository to GitHub and enter the desired name for your repository.
You can have TeamCity execute a shell script that subsequently calls git push
(with appropriate arguments, e.g. git push <repository>
to push to a different repository). Do make sure that git
doesn't need interactive authentication for the push operation.
A related example (deploy to Heroku using a git push
) can be found here: http://blog.carbonfive.com/2010/08/06/deploying-to-heroku-from-teamcity/.
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