Jenkins: SCM triggering constant builds despite no change

前端 未结 5 1089
一个人的身影
一个人的身影 2021-02-02 10:55

We have a problem where despite no code changes SCM is triggering a build. SCM polls for changes every 15 minutes and should only trigger a build if changes are found.

H

5条回答
  •  后悔当初
    2021-02-02 11:24

    I ran into the same problem.

    What fixed it for me is noticing that the Git Polling Log looked like this:

    Started on [date]
    Using strategy: Default
    [poll] Last Built Revision: Revision [commit#] (origin/develop)
    [...]
    Found 12 remote heads on ssh://[...]/repo.git
    [poll] Latest remote head revision on refs/heads/feature/foo is: [commit#] - already built by 1414
    [poll] Latest remote head revision on refs/heads/feature/bar is: [commit#] - already built by 2365
    [poll] Latest remote head revision on refs/heads/feature/baz is: [commit#] - already built by 1489
    [poll] Latest remote head revision on refs/heads/feature/qux is: [commit#] - already built by 1413
    [poll] Latest remote head revision on refs/heads/develop is: [commit#] - already built by 2368
    [poll] Latest remote head revision on refs/heads/master is: [commit#]
    Done. Took 0.16 sec
    Changes found
    

    Notice that the line for master doesn't say 'already built'. I built the master branch and that fixed the problem.

提交回复
热议问题