Automatic merge not merging file that where pushed during ci build
I am using Automatic merge build feature, however, I noticed that changes done during the build are not being merged.
During CI, I am change changing the package.json and changelog.md, committing it and pushing it via GIT normally not using any plugins or such. However i am noticed that these files are not being merged but only the files that were already present and picked by TeamCity are changed by VCS when the build started are merged.
Is there any way I can merged also files which have been modified during a CI step?
Please sign in to leave a comment.
Hi Alan,
what do you mean that you are commiting and pushing it via "GIA"?
Denis, apologies it's a typo, I meant `GIT`.
Hi Alan,
sorry that I didn't answer sooner, I had prepared an answer but apparently didn't submit it. Anyway, you mention Automatic Merge not merging the file, but then you say that you are changing, committing and pushing it yourself. Could you be more specific on the merges, commits and pushes, where and how they happen?
Basicilly, i collect the VS changes, in a step, after I have another step to transpile my TypeScript to JS and right after that I have a powershell script that generates a changelog, bumps the paxkage.json, commits and pushes everything.
The merge per see is using the Automatic Merge feature
Hi Alan,
thanks for the clarification, I wasn't properly understanding the scenario. The Automatic Merge will merge the revision that the build is started with into the designed branch, because it's the only revision the build is aware of. Not merging this specific revision would be dangerous as the VCS might have received other commits from other sources in the meantime and the final scenario might not be as expected.
What might make sense in your scenario is to have a separate build configuration that only triggers on changes of those two specific files and then that one performs the auto merge. It doesn't need to have build steps, simply pick up the new revision from the branch (I'm assuming that you will only commit the files if the build was successful), then perform the automerge.
Could you try that out?
Hi,
Thanks for the clarrification.
Yeah that will work :)
Thanks and happy new year.