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.

multiple repositories change detection #4246

CaoFangyuan ·

Hi,

I have two repository defined in settings/Repository, like repository A and repository B, what I want to do is when repository B changes, then clone repository A and after A has been cloned, I have one script will clone B automatically. But the real case is actually only A repository changes will trigger this build, not repository B as I expect. Any idea for this? Just wonder how quick build know which repository change if I have multiple repositories defined.

Thanks.

  • replies 3
  • views 1331
  • stars 0
robinshen ADMIN ·

By default QB will fire new build whenever there are changes in both A or B. To only monitor A's change, please edit build condition of the configuration to use below script:

groovy:
return repositories.get("A").changed
CaoFangyuan ·

Hi robin,
Is the string in get() the repository name defined in Repositories? If yes, I tried, but seems didn't work when I change A master branch.

robinshen ADMIN ·

Yes, repo name should be used here. Also make sure that:

  1. The configuration is scheduled appropriately. The build condition is only checked when scheduled time reaches
  2. Repo "A" is configured to detect from master branch (specified via the branch field of repo definition).