How to get rid of pending changes? Follow
I have this trigger in my build configuration to trigger this build only when specific files are modified (and skip another not related to production). Build is tested and deployed to production environment. Trigger works correctly.
But what I am trying to solve are pending changes. Changes committed to VCS that are not triggered for building process and remain in interface.
Q: How to get rid these pending changes?
I can run build to remove them but by running build I do a deploy to production server, and I do not want to do this. What's the point of triggers when it is not possible to get rid of pending changes that don't match the trigger/build criteria and the build has to be started manually in order to get rid of them?
Please sign in to leave a comment.
If you don't want these changes to be detected at all in this build configuration, consider using the Checkout Rules instead: https://www.jetbrains.com/help/teamcity/vcs-checkout-rules.html
The checkout rules affect what build changes are displayed in the UI and what files are checked out for a build on the agent. If a commit does not match any of the checkout rule patterns of the build's VCS root, TeamCity will completely ignore it. Such change will not be displayed as pending and will not be able to trigger any builds in the current configuration.
thank you for your reply. I would like to use Checkout rules but I cannot, it doesn't support files, only directories. And I, as showed in screenshot, I need to ignore files (e.g. *.properties file for devel).
Is there way how to get rid of existing pending changes in gui when I do not want to build them? Do I have to leave them there? What is best practice JB recommends us for this situation?
You can actually exclude a single file using the checkout rules. I just tested it locally to make sure it works. You can't, however, include a single file, see https://youtrack.jetbrains.com/issue/TW-8415/Support-include-checkout-rules-for-a-single-file for more details. Feel to vote and leave comments.
What I did locally is used the following checkout rules:
Changes in the README.md file were not detected in the build configuration, and when I manually started a build after making the commit, TC picked the previous revision as expected. Changes in all other files are still detected with such rules.
Hi, it sounds promising, I will test it today. Thanks!
P.S. Maybe you should edit comment how checkout rules work, it is not really clear that exclude single file is allowed.
Newline-delimited set of rules in the form of +|-:VCSPath[=>AgentPath]
e.g. use -:. to exclude all, or -:repository/path to exclude only the path from checkout
or +:repository/path => another/path to map to different path.
Note: checkout rules can only be set to directories, files are not supported.
The article could be a bit misleading indeed. If I recall correctly, the reason this was not mentioned there is that exclude for a single file won't work for all supported VCS. E.g., it won't be possible to do that in SVN. But I'll check internally, and we'll think about how to improve the article.
Thank you for the feedback!