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

Updating a workflow overwrites existing jobs participating to the workflow


    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Jenkins 1.539, Template-workflows 1.2 running on Ubuntu 12.04 LTS, Java 1.6.0_26

      Here is a setup to reproduce the problem:
      Create a free-style job, with some useful setup: template-job

      • declare it as a building block of the "test-workflow1" workflows

      Create a free-style job, without any useful setup (it will be associated to an existing job, it is just a placeholder): template-dependency

      • declare it as a building block of the "test-workflow1" workflow

      Create a free-style job named "jobA", and configure some stuff.

      Create a "Template Workflow Job" named "MyWorkflows".
      Create a workflow named "jobB" based on "test-workflow1", with template-dependency=jobA and template-job=jobB, check "Allow the Use of Existing Jobs"

      Check jobB: ok
      Check jobA: ok

      Click on jobB inside MyWorkflows, click update.
      Check jobB: ok
      Check jobA: everything has been replaced by the content of the placeholder job "template-dependency"

      PS: Basically I experienced this problem with a more complex setup where I have one workflow for each project I work on.
      As most of these projects have dependencies on the others, I use some "placeholder" template jobs to inject references to upstream projects belonging to other worflows (and that have already been generated).
      The problem is that the upstream projects generated by other worflows get erased when I update their direct downstream workflow.
      So, currently, in order to fix that I need to update the whole hierarchy starting from the downstream-most projects to the upstream-most projects, which is a real pain and makes this plugin lose most of its interest (if each workflow has to work in isolation from the other workflows and projects, it greatly limits what can be done).

      I think it used to work fine with an older Jenkins version, but at some point, I noticed this problem. So it might have been around not since the beginning but only for a few revisions.

            Unassigned Unassigned
            fractule Frederic Chateau
            1 Vote for this issue
            2 Start watching this issue