0
votes

We have a build job in Jenkins that keeps on building continuously once it is triggered manually. (there is always one new build being added to the queue when the current build starts.) There is no build trigger configured, so it should only start when triggered manually.

Some details about the job:

  • Maven2/3 build job type
  • It's a Git SCM job
  • Simple maven 3.2 project (all it does is clean compile). The project consists of 5 modules that are triggered to be build from the parent.

No additional configuration.

The Git configuration is also very simple: Git URL has been filled in, incl credentials. All other is default settings.

Version information:

  • Jenkins 1.580.3
  • Git Plugin 2.3.5
  • Git client plugin 1.16.1
  • Maven 3.2.5

config.xml

<?xml version='1.0' encoding='UTF-8'?>
<maven2-moduleset plugin="[email protected]">
  <actions/>
  <description></description>
  <logRotator class="hudson.tasks.LogRotator">
    <daysToKeep>30</daysToKeep>
    <numToKeep>20</numToKeep>
    <artifactDaysToKeep>30</artifactDaysToKeep>
    <artifactNumToKeep>5</artifactNumToKeep>
  </logRotator>
  <keepDependencies>false</keepDependencies>
  <properties>
    <jenkins.plugins.maveninfo.config.MavenInfoJobConfig plugin="[email protected]">
      <mainModulePattern></mainModulePattern>
      <dependenciesPattern></dependenciesPattern>
      <assignName>false</assignName>
      <nameTemplate></nameTemplate>
      <assignDescription>false</assignDescription>
      <descriptionTemplate></descriptionTemplate>
    </jenkins.plugins.maveninfo.config.MavenInfoJobConfig>
    <hudson.plugins.disk__usage.DiskUsageProperty plugin="[email protected]"/>
    <org.jvnet.hudson.plugins.shelveproject.ShelveProjectProperty plugin="[email protected]"/>
  </properties>
  <scm class="hudson.plugins.git.GitSCM" plugin="[email protected]">
    <configVersion>2</configVersion>
    <userRemoteConfigs>
      <hudson.plugins.git.UserRemoteConfig>
        <name>origin</name>
        <url>ssh://user@server:29418/project</url>
        <credentialsId>creds-here</credentialsId>
      </hudson.plugins.git.UserRemoteConfig>
    </userRemoteConfigs>
    <branches>
      <hudson.plugins.git.BranchSpec>
        <name>**</name>
      </hudson.plugins.git.BranchSpec>
    </branches>
    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
    <browser class="hudson.plugins.git.browser.GitWeb">
      <url></url>
    </browser>
    <submoduleCfg class="list"/>
    <extensions/>
  </scm>
  <canRoam>true</canRoam>
  <disabled>false</disabled>
  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  <jdk>Java 7 (Update 21)</jdk>
  <triggers/>
  <concurrentBuild>false</concurrentBuild>
  <rootModule>
    <groupId>com.example</groupId>
    <artifactId>artifactId</artifactId>
  </rootModule>
  <goals>clean install</goals>
  <mavenName>Maven 3.1</mavenName>
  <aggregatorStyleBuild>true</aggregatorStyleBuild>
  <incrementalBuild>false</incrementalBuild>
  <ignoreUpstremChanges>true</ignoreUpstremChanges>
  <archivingDisabled>false</archivingDisabled>
  <siteArchivingDisabled>false</siteArchivingDisabled>
  <fingerprintingDisabled>false</fingerprintingDisabled>
  <resolveDependencies>false</resolveDependencies>
  <processPlugins>false</processPlugins>
  <mavenValidationLevel>-1</mavenValidationLevel>
  <runHeadless>false</runHeadless>
  <disableTriggerDownstreamProjects>true</disableTriggerDownstreamProjects>
  <settings class="jenkins.mvn.DefaultSettingsProvider"/>
  <globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
  <reporters/>
  <publishers/>
  <buildWrappers/>
  <prebuilders/>
  <postbuilders/>
  <runPostStepsIfResult>
    <name>UNSTABLE</name>
    <ordinal>1</ordinal>
    <color>YELLOW</color>
    <completeBuild>true</completeBuild>
  </runPostStepsIfResult>
</maven2-moduleset>

Any ideas how to resolve this?

1
Can you post your job settings? It's stored as an xml in you jenkins job's directory.Brandon McKenzie
We have experienced the exact same behavior with different jobs. One was a maven project, one was a build-flow project. In both cases, the job had no triggers configured and as soon as the job starts, a new instance of the job gets placed on the build queue, resulting in endless runs. This was with Jenkins version 1.609.1and a myriad of different plugins.Kenneth Baltrinic

1 Answers

0
votes

This other (duplicate?) question suggests that this is a subtle bug in Jenkins that occurs when a configuration change is made w/o restarting Jenkins afterwards. Though we have not scientifically proven it yet, anecdotally this seems to be our experience as well. Having restarted our Jenkins service over the weekend, we are now no-longer able to reproduce the problem. Will post more here when/if the problem comes back and we are able to learn more.