Invoking properties / promotions / promotion twice results in inconsistent configuration

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      When creating jobs via DSL we run them though a chain of decorators, relying heavily on the intelligent append/replace behavior of dsl elements.

      This works fine e.g. for the archiveArtifacts publisher.

      However when one invokes the promotion call twice like this:

                  job.with {
                              properties{
                                          promotions {
                                                  promotion {
                                                          name "First promotion"
      //...
                                                  }
                                          }
                              } 
                  }
      
                  job.with {              
                              properties{
                                          promotions {
                                                  promotion {
                                                          name "Second promotion"
      //...
                                                  }
                                          }
                              }                 
                   }       
      

       
      The result is:

      • if one views the web ui confiuguration form only the "Second promotion" is displayed
      • if one views the Promotion Status (buildUrl/promotion/) for the build or for the whole job only the "First promotion" is displayed
      • there are two "Promotion Status" links in the job sidebar and two badges (or how you call that) on the job status page
      • there is only a single "Promotion Status" link and badge on the build status page

            Assignee:
            Unassigned
            Reporter:
            Jakub Bochenski
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: