0

I'm using TeamCity plugin with IntelliJ and working with the following workflow:

https://confluence.jetbrains.com/display/TCD10/Pre-Tested+%28Delayed%29+Commit

My concern is if this process can be automated in a manner that the last step which says "commit my local patch if the build succeeded" and the step will be done on the TeamCity side and not on my local laptop.

Can I add some extra step in the build that says "If the build succeeded commit this patch to SVN" (from the TeamCity server)

It just feels like the wrong way that the server needs to keep a connection with my laptop until the end of the build.

It causes a lot of commit failures due to network glitches, authentication failures, files with other revision etc.

picciano
  • 22,341
  • 9
  • 69
  • 82
hagai
  • 424
  • 1
  • 7
  • 13

1 Answers1

2

This set up is not possible, as TeamCity is not aware of your local version control credentials and settings, that will be used during commit from the IDE.

Nikita Skvortsov
  • 4,768
  • 24
  • 37
  • Do you aware of other CI tools that allow this behavior? – hagai Jan 21 '18 at 12:41
  • 1
    @hagai no, unfortunately. Allowing a CI server to commit files on your behalf is a questionalbe decision in general due to multiple reasons: security, environment consistency and working copy update state. Imagine a TeamCity commiting 35 files on your behalf. You will not be happy to update your working copy afterwards – Nikita Skvortsov Jan 21 '18 at 17:09
  • I agree that security here can be an issue.I don't know what is the issue with "TeamCity can commit many files", What is the difference if some other developer does the same? I end up with the same status - outdated repo that needs to pull the new changes. Anyway I'm talking here on a team repo, so obviously commits will continue to come on daily basis. – hagai Jan 22 '18 at 23:17
  • 1
    @hagai I mean, if TeamCity commits your own changes, you will have a big conflict with next update, as SVN will attempt to apply a patch with changes to a working copy that already contains this patch uncommitted – Nikita Skvortsov Jan 23 '18 at 07:14
  • I get your point, I'm wondering if there is a way to commit the files locally and then push the changes in teamcity only if build is successful.It might suitable only for GIT repos. – hagai Jan 23 '18 at 19:37
  • 1
    @hagai this setup was described in another stackoverflow answer here: https://stackoverflow.com/a/12484596/295582 – Nikita Skvortsov Jan 24 '18 at 07:20