Simple 'checkout scm' with polling defined will always detect changes even when there are no changes. May be related to the added complexity from multiple repositories being polled (since the example job definition uses a global pipeline library).
More complicated checkout does not have the same issue.
Steps I took to duplicate the problem:
- Copy JDK 8 tar file into my public_html/jdk directory
- Copy the jenkins-bugs repo into a local bare repo for faster cloning later
- Clone, build, and run the docker instance
- Connect a web browser to that docker instance (http://localhost:8080)
- Open the "Bugs - Pipeline Checks" folder
- Open the "jenkins-bugs" multi-branch pipeline job
- Click the "Scan Multibranch Pipeline" link and then the "Run Now" link to start branch indexing
- Confirm the
JENKINS-43687job runs successfully
- Commit a change to the
JENKINS-43687branch, and push the change
- Wait 7 minutes while watching the git polling log, confirm the job runs without a change, if the simple checkout scm is used, and does not run without changes if the more complex checkout is used