Well to me, "has completed a build" meant "at least once in its existence". But then again, re-reading the documentation, the fact that the server does not have the status for the project is more like "recently built" and not "success/failed/exception".
Maybe it's because my native language is not English, but it was not clear enough to me what "state" meant. On 20 août, 15:34, Benjamin Baumann <[email protected]> wrote: > Hi, > > Did you think the documentation is not explicit enough : > "The Project Trigger is used to trigger a build when the specified dependent > project has completed its build" > "Whenever it detects that the dependent project has completed a build, the > Project Trigger will fire. The Project Trigger can be configured to fire > when the dependent project build succeeded, failed or threw an exception" > (Fromhttp://confluence.public.thoughtworks.org/display/CCNET/Project+Trigger) > > I cannot see a reference in the doc to a build triggering according to > another Project's state. Where do you read it? > > WIth kind regards, > Benjamin Baumann > > 2010/8/20 OBones <[email protected]> > > > Ok, here are a few little experiments. > > Let's start with this configuration: > > > <project name="B"> > > </project> > > > <project name="U"> > > <triggers> > > <projectTrigger project="B"> > > <triggerFirstTime>False</triggerFirstTime> > > <innerTrigger type="intervalTrigger" seconds="11" > > buildCondition="ForceBuild" name="Multi: Project: internal every 11 > > seconds" /> > > </projectTrigger> > > </triggers> > > </project> > > > Once the configuration is reloaded, the status of B is "unknown", > > which means U will never trigger. This is fine. > > Force the build for B. Once it completes, the build for U gets > > triggered and completes as well. > > After this, every 10 seconds, you see a line in the server log that > > says the state of B is success. But this does not trigger the build > > for U. > > Make a change to the configuration file (add a space) to force the > > server reloading it. > > After 10 seconds, you start seeing the same message as before about B > > status being success. And yet, it does not trigger the build for U. > > If you force B again, U will be triggered as well. > > Try the same with triggerFirstTime set to True and you'll see it does > > not make a difference (why is this property there then?) > > > So there is an undocumented behavior that means the project trigger > > only triggers if the linked project has been built between the two > > checks > > > This might explain why my schedule trigger did not work as project B > > quite probably was not built between the moment I loaded the > > configuration and the scheduled time. > > > I think it would be worth mentioning this in the documentation so that > > other people do not get confused the first time they use project > > triggers. > > > Regards > > Olivier > > > On 20 août, 11:18, OBones <[email protected]> wrote: > > > I thought that triggerStatus was Success by default, at least that's > > > what the doc says. > > > As to "ForceBuild", I actually want project U to run if it has > > > modifications of its own so I believe this is ok if I leave > > > IfModificationExists > > > > I'll fiddle around to see if I can get it to work, but this trigger > > > problem seems quite mysterious to me. > > > > The extra --> was from me commenting out the multiTrigger in my > > > production config ;-) > > > > On 19 août, 17:58, Benjamin Baumann <[email protected]> wrote: > > > > > Hello, > > > > > I think you should change your project trigger configuration to > > > > > <projectTrigger project="B"> > > > > <triggerFirstTime>False</triggerFirstTime> > > > > * <triggerStatus>Success</triggerStatus>* > > > > <innerTrigger type="intervalTrigger" seconds="1800" > > buildCondition="* > > > > ForceBuild*" /> > > > > </projectTrigger> > > > > > The first change will only launch the project U build if the project B > > build > > > > has been successful. > > > > The second change will force the build of project U when project B has > > been > > > > built. With your previous configuration, U would be built if B has been > > > > built AND if there was changes in U source control > > (IfModificationExists). > > > > > As for the multitrigger, I think it's OK. By the way, there were extra > > "-->" > > > > in the configuration you posted. > > > > > Hope this helps, > > > > Benjamin Baumann > > > > > 2010/8/19 OBones <[email protected]> > > > > > > Hello, > > > > > > I want to trigger project U when it is 21:00 weekdays but only if > > > > > project B was successful during its last run. > > > > > Reading the documentation, I thought I could do this with a > > > > > multiTrigger for project U: > > > > > > <multiTrigger operator="And"> > > > > > <triggers> > > > > > <projectTrigger project="B"> > > > > > <triggerFirstTime>False</triggerFirstTime> > > > > > <innerTrigger type="intervalTrigger" seconds="1800" > > > > > buildCondition="IfModificationExists" /> > > > > > </projectTrigger>--> > > > > > <scheduleTrigger time="21:00"> > > > > > <weekDays> > > > > > <weekDay>Monday</weekDay> > > > > > <weekDay>Tuesday</weekDay> > > > > > <weekDay>Wednesday</weekDay> > > > > > <weekDay>Thursday</weekDay> > > > > > <weekDay>Friday</weekDay> > > > > > </weekDays> > > > > > </scheduleTrigger> > > > > > </triggers> > > > > > </multiTrigger> > > > > > > Unfortunately this did not work and the build was not triggered last > > > > > night. > > > > > I set triggerFirstTime to false because according to the > > > > > documentation, the first time the internal trigger triggers is not > > > > > reliable. > > > > > Could it be this value that is preventing the build from running > > > > > altogether? > > > > > Or am I doing something wrong? > > > > > > Regards > > > > > Olivier
