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

Print DSL formatted config.xml for an existing Job

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Reading and translating the config.xml of a desired project isn't exactly easy. It'd be pretty straightforward to print the config.xml for a job in the DSL format. I'm thinking a button on the left of a Job, which registers itself as a URL (common Jenkins practice).

      Comments from original Github Issue

      andrewharmellaw commented 8 months ago
      Simple and easy and expected is good, at least for a starter. I'd go with this as you propose for R1

        Attachments

          Activity

          Hide
          brantone Brantone added a comment -

          +1 ... converting existing job to DSL would be great.

          Show
          brantone Brantone added a comment - +1 ... converting existing job to DSL would be great.
          Hide
          ki82 Christian Bremer added a comment -

          http://job-dsl.herokuapp.com/ ?

          We also generate all config.xml in gradle by executing javaposse.jobdsl.Run and passing in our dsl files.

          Show
          ki82 Christian Bremer added a comment - http://job-dsl.herokuapp.com/ ? We also generate all config.xml in gradle by executing javaposse.jobdsl.Run and passing in our dsl files.
          Hide
          brantone Brantone added a comment - - edited

          That's pretty sweet but still does Groovy/DSL => XML ... rather than XML => DSL

          Show
          brantone Brantone added a comment - - edited That's pretty sweet but still does Groovy/DSL => XML ... rather than XML => DSL
          Hide
          ki82 Christian Bremer added a comment -

          My bad, I misunderstood the issue.

          +1 for adding support for this.

          Show
          ki82 Christian Bremer added a comment - My bad, I misunderstood the issue. +1 for adding support for this.
          Show
          ki82 Christian Bremer added a comment - 300$ is up for grabs for solving this issue at: https://freedomsponsors.org/issue/622/print-dsl-formatted-configxml-for-an-existing-job?alert=SPONSOR#
          Hide
          dragon788 Ethan Spoelstra added a comment -

          Christian Bremer It appears someone recently submitted a solution for this (after it expired). Is there code working or have you not had a chance to check?

          Show
          dragon788 Ethan Spoelstra added a comment - Christian Bremer It appears someone recently submitted a solution for this (after it expired). Is there code working or have you not had a chance to check?
          Hide
          ki82 Christian Bremer added a comment -

          Ethan Spoelstra I have not tried the solution, feel free to check it out.

          Show
          ki82 Christian Bremer added a comment - Ethan Spoelstra I have not tried the solution, feel free to check it out.
          Hide
          visualphoenix Raymond Barbiero added a comment -

          Wasn't too bad to implement. Works for the 350 jobs I have access to so far. https://github.com/visualphoenix/jenkins-xml-to-jobdsl

          Show
          visualphoenix Raymond Barbiero added a comment - Wasn't too bad to implement. Works for the 350 jobs I have access to so far. https://github.com/visualphoenix/jenkins-xml-to-jobdsl

            People

            • Assignee:
              quidryan Justin Ryan
              Reporter:
              andrewharmellaw Andrew Harmel-Law
            • Votes:
              11 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

              • Created:
                Updated: