I have a git repo which contains a single .Net solution with several web applications (public site, internal site, public services) and a shared class library project. I want to deploy some of the projects based on the changes that were made. For example if I fixed a bug in public site I want to only deploy that site, if I fixed bug in public site and api I want to deploy both of them and so on. I can achieve it by creating different build configurations and using trigger rule and filter by Ant_like_wildcard folder path and deploy corresponding project.
The tricky case in when I make a change only in a shared class library but in any of the web apps. In that case I have the following options:
- Make a dummy change in the web apps which must be deployed
- Include web projects which must be deployed in commit message and use VCS_comment_regexp for filtering triggers
Parse git commit message, set parameters using setParameter in build script and use those parameters in following steps.
I don't like any of the options because they seem hacky. Is there any better option for this case?