githubpropertiesteamcitypushgit-commit

Is it possible to push changes to a VCS root in Team City?


As the title says,

I am currently running a build in Team City where the VCS root is pointing to a github repo. I would like to run this build where it also updates property files within my github repo. I have only found ways to publish artifacts to Team City, but has anyone been able to commit and push from Team City to their VCS root?

Thank you very much in advance.


Solution

  • If you choose VCS checkout mode: Automatically on agent (if supported by VCS roots) in the Version Control Settings of your project you will be able to run git command inside your build.

    So in the last build step you can just add a git push origin your_branch and TeamCity will push the changes inside your VCS root.