Strange GitSCM behaviour

Skip to first unread message

Jun 17, 2021, 10:17:23 AMJun 17
to Jenkins Users
I have a pipeline to build the git product, which uses the 'master' and 'maint' branches. 'master' is used for new releases, like 2.32.0, while 'maint' is used for 2.32.1. My pipeline refers to both branches for polling. The problem is that the job keeps rerunning with the change log showing nothing. The starting snippet is:

pipeline {
    agent any
    options {
        buildDiscarder(logRotator(numToKeepStr: '5'))
    triggers {
        pollSCM('H H H * *')
    stages {
        stage('checkout') {
            steps {
                checkout([$class: 'GitSCM',
                changelog: true,
                poll: true,
                branches: [[name: 'maint'],[name: 'master']],
                extensions: [
                    [$class: 'CleanBeforeCheckout'],
                        [$class: 'SubmoduleOption', disableSubmodules: false, parentCredentials: true,
                                recursiveSubmodules: true, reference: '', trackingSubmodules: false]],
                doGenerateSubmoduleConfigurations: false, extensions: [
                    [$class: 'CleanCheckout'],
                    [$class: 'CloneOption', timeout: 120, shallow: true],
                    [$class: 'CheckoutOption', timeout: 120],
                userRemoteConfigs: [[url: '']]])

Once the builds start, multiple queue up until I kill them. After everything is in a quiet state with no jobs queued, the system goes back to an idle state, but if I leave it alone, I could get 10-20 jobs queued. What I have suspected is that the git build/test takes about 3 days - it's a very busy and not so fast system, so it seems like the poll interval is not taking into account that there is already a job being built for the triggering commit. This also happens on other long-running jobs.

I'm perplexed as to why the rerun is happening without new commits being pushed to those branches. Currently on Jenkins 2.281, with GitSCM at 4.6.0 and Git Client at 3.6.0. We are using git 2.32.0 on the NonStop server. This is a standalone configuration. No agents.

Any wisdom on what to look for as a potential cause would be appreciated.

Reply all
Reply to author
0 new messages