Pergunta

In my project I have 4 different web-sites who are sharing most of the code, with the only exception of the web-site itself and a class library for each website.

The source code is divided into 4 folders containing a load of smaller projects each. These folders represent DDD layers (Infrastructure, Domain, Application, UI). In addition we have a fifth folder containing the tests which are also split by the targeting layer.

Since the websites have very similar build configurations, I used a commong Build Configuration template ad-hoc customized with some parameters.

One of these customization would be the VCS Trigger rules, which can be summarized in this way: - trigger a build for each website on a commit in Infrastructure, Domain, Application and Tests folders - trigger a build for each website on a commit in the Inf, Domain, App folders in Tests - trigger a build for a website on a commit into their website folder and its class library.

This is the rules i wrote

-:.
+:Infrastructure
+:Tests\Infrastructure
+:Domain
+:Tests\Domain
+:Application
+:Tests\Application
+:%WebProjectPath%
+:%WebProjectLibPath%

but apparently the parameters are not evaluated. Is there any way to achieve the desired behavior?

Foi útil?

Solução

The parameters are supported in VCS triggers.

The problem I had is that those triggers are case-sensitive. so a filter pointing to "UI\PublicWeb" wasn't trigger if the commit was issued in the folder "Ui\PublicWeb".

In addition, if a parameter is empty, the resulting trigger rule will be something like "+:" which will allow every commit to trigger a build. In this case, it's better to mention a non-existing folder rather than letting the system to trigger an undesired build.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top