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

Print DSL formatted config.xml for an existing Job

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Major Major
    • job-dsl-plugin
    • None

      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

          [JENKINS-16360] Print DSL formatted config.xml for an existing Job

          Andrew Harmel-Law created issue -

          Brantone added a comment -

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

          Brantone added a comment - +1 ... converting existing job to DSL would be great.

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

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

          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.

          Brantone added a comment - - edited

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

          Brantone added a comment - - edited That's pretty sweet but still does Groovy/DSL => XML ... rather than XML => DSL

          My bad, I misunderstood the issue.

          +1 for adding support for this.

          Christian Bremer added a comment - My bad, I misunderstood the issue. +1 for adding support for this.

          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#

          ki82 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?

          Ethan Spoelstra added a comment - ki82 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?

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

          Christian Bremer added a comment - dragon788 I have not tried the solution, feel free to check it out.
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 147178 ] New: JNJira + In-Review [ 176835 ]

          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

          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

            quidryan Justin Ryan
            andrewharmellaw Andrew Harmel-Law
            Votes:
            13 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated: