Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Build condition - If changes found in referenced repositories or last build failed #4276

majstorski ·


We have a configuration which is scheduled, and it have build conditions like this:

If all specified criterias are satisfied

  1. If changes found in referenced repositories or last build failed
  2. If specified variable evaluates to true

Configuration triggers on time every 10 minutes, have taking a snapshot from Perforce referenced repo and on last step - trigger it self.

Seems like it got triggered if there is no changes on referenced repo in snapshot, but cant find reason.
Beside, configuration have inherited repositories from Parent and we have beside that similar one on same level of this which actually works fine, which is wierd.

Can you give some hint where to take a look?

Seems like everything on both configuration is same....

QB version which we use is 10.0.21.

Thanks in advance.

  • replies 11
  • views 901
  • stars 0
robinshen ADMIN ·

For the new build which is not expecting to be triggered, please check the changes tab to see if there are actual changes there. Also make sure you do not have any custom script changing build revision of referenced repositories in the problematic configuration.

majstorski ·

Hi Robinsen,

Where I can find this changes tab?

For referenced repo, i have checked, and seems that nothing change this repo revision...

Strange thing as well is that in previous version of QB (8.0.20), both of those configs works as intended and when we shift to new one, one of this is not right.

As I saw in Pipeline, it actually trigger multiple times on same change. Screenshot is in attachment auto trigger.png.
Thanks a lot in advance.

majstorski ·

Beside that, we have a strange behavior when configuration is triggered manually - it has been triggered with scheduler also, so we have here two builds running...

robinshen ADMIN ·

Please see below screenshot on how to check changes of a build:

Screen Shot 2020-09-22 at 7.20.47 AM.png

Even if build has been generated for a particular revision, it can be generated again if requested manually. As manual build by default bypasses build condition check.

majstorski ·

Hi Robinsen,

Ok, for Manual trigger understand, and in that case it should be triggered, but I have checked Scheduler one which shouldn't be,
and seems like there is no changes:

robinshen ADMIN ·

Does audit log of the configuration have any clue? Maybe it is triggered via RESTful request, or by some other configurations?

majstorski ·

Unfortunately, no. we have triggered this build once by sheduler, and ones by rest, and it is keep triggering because latest step of this confoguration is trigger for it self.

I have found one issue: respect build condition was not checked, so I will see how it goes and come back to you.

Beside that, is there some way to skip scheduler trigger if configuration is already triggered from REST?

Thanks in advance.

robinshen ADMIN ·

Build condition will serve the purpose not firing unnecessary builds. It is normally set to only build when there are changes in the repository. When a build is requested via RESTful api, subsequent scheduled builds should not be triggered if the build condition is respected and there are no changes in repository since last build.

majstorski ·

Oki, thanks a lot for clarifying, it seems that now it is fine on our side.

Sibmo ·

Where did you define to respect build condition ?

robinshen ADMIN ·

To respect build condition:

  1. When build is triggered manually, edit "pre-queue script" of the configuration to use below value:

  2. When build is requested via restful api, make sure the build request object contains below element and the value is set to true

  3. When build is triggered via "trigger other build" step, make sure to tick the option "respect build condition" when define the step