Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-44343

Inverse build strategy is building when there are no changes on a branch

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • git-plugin
    • None
    • Jenkins 2.59
      Git plugin: 3.3.0

      I setup a job to build feature branches and skip the master branch. I do this by specifying "*/master" as the branch to build and then inverse as the choosing strategy. I have the job setup to poll SCM every 15 minutes (I don't have access to change the hooks).

      When I push changes to a branch other than master, the job does as expected and builds the branch. However when I push changes to master, the job runs and builds the last branch it built. I left this overnight and have a build every 15 minutes of the same commit.

          [JENKINS-44343] Inverse build strategy is building when there are no changes on a branch

          jpschewe added a comment -

          Upon further inspection of my configuration I found that I had an error in the job configuration causing the job to run too often. All appears to be working now.

          jpschewe added a comment - Upon further inspection of my configuration I found that I had an error in the job configuration causing the job to run too often. All appears to be working now.

          jpschewe added a comment -

          I thought it was fixed, but it's not. I'm stilling seeing extra builds happening. Here's a copy of my git polling log. You can see there are changes on master, but not on any other branch. The job is setup to build all branches except master.

           

          Started on Aug 3, 2017 10:14:00 AM
          Using strategy: Inverse
          [poll] Last Built Revision: Revision YYYYYYYY (origin/issues/foo)
          {{using GIT_SSH to set credentials }}
          {{ > git ls-remote -h XXXXXXX # timeout=10}}
          Found 3 remote heads on XXXXXXXX
          [poll] Latest remote head revision on refs/heads/master is: ZZZZZZ
          Done. Took 0.22 sec
          Changes found

           

          jpschewe added a comment - I thought it was fixed, but it's not. I'm stilling seeing extra builds happening. Here's a copy of my git polling log. You can see there are changes on master, but not on any other branch. The job is setup to build all branches except master.   Started on Aug 3, 2017 10:14:00 AM Using strategy: Inverse [poll] Last Built Revision: Revision YYYYYYYY (origin/issues/foo) {{using GIT_SSH to set credentials }} {{ > git ls-remote -h XXXXXXX # timeout=10}} Found 3 remote heads on XXXXXXXX [poll] Latest remote head revision on refs/heads/master is: ZZZZZZ Done. Took 0.22 sec Changes found  

            Unassigned Unassigned
            jpschewe jpschewe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: