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

Batch Tasks invoked by a post-build action use incorrect build/workspace when using concurrent builds

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • batch-task-plugin
    • None
    • Windows Server 2003

      When batch tasks get invoked at the completion of a build (that is when the "Invoke batch tasks" post-build action is used), then each batch task uses the latest build rather than the build that invoked the task.

      For example, doing the following:
      1) Create a project and turn on concurrent building
      2) Have the project sleep as part of the main build in order to have multiple builds occur at the same time
      3) Add a batch task that echos the workspace and invoke it as a post-build action.
      4) Start 2 builds such that the second starts before the first completes

      In the console output of Build #1, it will show that it is invoking task 2-1 and Build #2 invokes task 2-2.
      Both tasks use Build #2's workspace as denoted by the naming convention 2-#.

      The expected behavior is for Build #1 to invoke task 1-1 with Build #1's workspace, and Build #2 to invoke task 2-1 with Builds #2's workspace.

      This allows concurrent building to invoke batch tasks such as cleaning a workspace as a post-build action.

            kohsuke Kohsuke Kawaguchi
            pixman20 pixman20
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: