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

Archiving Maven artifacts fails if jenkins-cli is used to modify job config while job is running

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • maven-plugin
    • None
    • Jenkins version: 1.572
      OS: debian wheezy x64
      maven-plugin: 2.5

      Steps to reproduce:-
      1) Run a job which uses the maven plugin and has a "Deploy artifacts to maven repository" Post-build step
      2) while the job is running use the jenkins-cli update-job command to change the job configuration (the configuration doesn't need to actually change. Calling update-job with the same config will also trigger the problem)

      When Jenkins attempts to deploy the artifacts it will give the error:

      Archiving artifacts
      [ERROR] No artifacts are recorded. Is this a Maven project?
      

      What seems to be happening is that the api call causes the cache in the AbstractLazyLoadRunMap for the module to get reloaded from disk. Meaning that the build number check in MavenModuleSetBuild (line 486) actually looks at the last completed build, rather than the currently executing build and therefore returns false.

          [JENKINS-24204] Archiving Maven artifacts fails if jenkins-cli is used to modify job config while job is running

          There are no comments yet on this issue.

            Unassigned Unassigned
            giannioneill Gianni O'Neill
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: