one of more fnished build triggers is ignored
Hello,
I wanted to ask what can I do about my problem:
I have a build_configuration_AB. This build has 2 triggers: 1) Finished_succesfull_build_A and 2) Finished_succesfull_build_B. The problem occurs when both builds finish in similar time (example: build_A finishes at 12:00 am and build_B finishes 5 mins later at 12:05) then the latter trigger will be ignored and build_configuration_AB will run only once. Is there anything I can do to force build_configuration_AB to run ALWAYS after EVERY finished build trigger?
Thank you in advance for any help,
K
Please sign in to leave a comment.
Hi Kat,
This is going to depend slightly on the configuration of the triggers and dependencies if you have them set up.
I suspect that your AB configuration takes longer than 5 minutes, and what is probably happening is that it's added to the queue while the previous one is still running or queued, then teamcity considers both being the same and reuses the already running one instead of adding a new one.
If you have snapshot dependencies configured, you can set them to always run a new build, check the options for a "Suitable build" on our builds, that will give you a hint on when teamcity optimizes the queue and reuses builds. If your builds don't fit in there, please report back to dig deeper into the issue.
Hello Denis,
thank you very much for your response. I do not have snapshot dependencies configured because I do not need any artifacts from any of dependency builds. I am afraid that if I add snapshot depependencies: A and B, the build AB will wait for both dependencies (A and B) instead (A or B)....
I could have had 2 AB builds - AB_one will run when A is finished (with snapshot dependency on A), AB_two would run when B is finished (with B as snapshot dependency). The idea was to optimise this and having one AB running after A OR B is finished (but EVERY time one of them is finished).
I am not sure if my explanation is enough,
please, let me know,
have a nice day,
K.
Hi Kat,
Yes, I understand your scenario, thanks for the extra explanation. There are still several possibilities. First, you can simply create a template out of AB, and set two separate build configurations that inherit from that template, one for A and another for B. While initially this might seem a bit more complex, it usually improves readability on AB, as it allows to understand whether it's failed through A or B. If we had more info on what AB does, and why it has to be run after A or B, we might be able to suggest other options, but as of now, the template + 2 build configs that inherit with separate snapshot dependencies look like the best option
Hello Denis,
Thank you for your answer. Unfortunatelly I cannot implement template solution. Build A - downloads artifacts from Artifactory repository A, Build B - downloads artifacts from Artifactory repository B (TC builds are triggered if there is a change in these repos). Build AB builds using artifacts B OR A. That is why it hast to run after EVERY A or B run. We will have more repositories that will trigger AB (in the future ABCDE..etc) build on TeamCity that is why I have to stick to a demand on having this build running....
K.