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

Jenkins promoted builds plugin wrecks job configuration respectively fails on updating

      I have noticed from beginning a weird behaviour with the promoted builds plugin.
      A job configuration can be made as long as there is no promoted builds plugin configured.
      Any changes made after the plugin is active/configured will result in a "Error - Failed to create".

      In newer Jenkins versions do the changes in the job config simply not take place. The config file is completely wrecked in case you use an older version of Jenkins.
      The config files for the promote plugin remain intact. Rebuilding the job configuration and activating the promote plugin will not lead to a reuse of the old promote config files. The inteface behaves like it is first time you use it. Saving will then overwrite the old configuration.

      Only ways to make changes later on are either to deactivate the promote plugin, make the changes and save and then rebuild the promote plugins configuration from scratch or by making the changes with an text editor and reload the jenkins configuration.

      I have made some research and noticed that the content of text fields in the job configuration are terminated with a
      This terminator is removed entirely after the promote plugin is active. I have no proof but I think this is somehow related. The terminator is present until the passage comes that configures the promote plugin. Everything past the passage is not terminated.

      So in other words. Tasks have the terminator, build steps not

          [JENKINS-10459] Jenkins promoted builds plugin wrecks job configuration respectively fails on updating

          Jan Seidel added a comment -

          This bug still persists and I have had some private mails where people quizzed me how a workaround looks like.
          Wouzld be nice if someone at least would take a look at this ticket .

          Jan Seidel added a comment - This bug still persists and I have had some private mails where people quizzed me how a workaround looks like. Wouzld be nice if someone at least would take a look at this ticket .

          Jan Seidel added a comment -

          Hi, sorry for this brute force assignment :/
          This ticket is idling around unassigned for almost a year and it seems that this is a general issue that should be checked.
          I am advancing to a private supporter to help people to find a workaround.

          Take care
          Jan

          Jan Seidel added a comment - Hi, sorry for this brute force assignment :/ This ticket is idling around unassigned for almost a year and it seems that this is a general issue that should be checked. I am advancing to a private supporter to help people to find a workaround. Take care Jan

          Martin E added a comment -

          Hi Jan,

          I had the same issue. In my case, reason was that there were subdirectories in the job's "promotions" directory without a "config.xml" file (left-overs of a previous renaming of a promotion).
          As soon as I deleted these directories on the filesystem, configuration did work again...

          HTH
          Martin

          Martin E added a comment - Hi Jan, I had the same issue. In my case, reason was that there were subdirectories in the job's "promotions" directory without a "config.xml" file (left-overs of a previous renaming of a promotion). As soon as I deleted these directories on the filesystem, configuration did work again... HTH Martin

          Jan Seidel added a comment -

          Hi Martin,

          sorry for the late reply.
          I didn't have the time to test your solution until now.
          It works again.
          After skimming ~180 job folder did I in fact find some empty promotion folder which even had no relation to the bogus jobs.
          After I removed them went everything back to normal

          Cheers
          Jan

          Jan Seidel added a comment - Hi Martin, sorry for the late reply. I didn't have the time to test your solution until now. It works again. After skimming ~180 job folder did I in fact find some empty promotion folder which even had no relation to the bogus jobs. After I removed them went everything back to normal Cheers Jan

          Jan Seidel added a comment -

          some empty promotion folders in other jobs did cause the issue.
          Removing them solves the weird behaviour

          Jan Seidel added a comment - some empty promotion folders in other jobs did cause the issue. Removing them solves the weird behaviour

            petehayes Peter Hayes
            kopfwunde Jan Seidel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: