Currently POSTing new job creates it, but it's not possible to update configuration (config.xml). That would eliminate any needed changes through UI.

          [JENKINS-7946] API: update job

          iElectric created issue -

          This is probably an old issue.
          As far as I can tell you can update an issue by posting to /job/

          {jobname}

          /config.xml with the config.xml int the body.

          There still is a problem: when you GET the job config and then POST it back you would expect it to be a no-op =>

          curl http://myjenkins/job/myjob/config.xml -o myjob-config.xml
          curl -XPOST http://myjenkins/job/myjob/config.xml -d @myjob-config.xml

          However this operation strips newlines, breaking shell steps:
          <hudson.tasks.Shell>
          <command>echo "one"
          echo "two"
          echo "three"</command>
          </hudson.tasks.Shell>

          becomes

          <hudson.tasks.Shell> <command>echo oneecho twoecho three</command> </hudson.tasks.Shell>

          (in fact the entire config.xml ends up on a single line).

          Karel Vervaeke added a comment - This is probably an old issue. As far as I can tell you can update an issue by posting to /job/ {jobname} /config.xml with the config.xml int the body. There still is a problem: when you GET the job config and then POST it back you would expect it to be a no-op => curl http://myjenkins/job/myjob/config.xml -o myjob-config.xml curl -XPOST http://myjenkins/job/myjob/config.xml -d @myjob-config.xml However this operation strips newlines, breaking shell steps: <hudson.tasks.Shell> <command>echo "one" echo "two" echo "three"</command> </hudson.tasks.Shell> becomes <hudson.tasks.Shell> <command>echo oneecho twoecho three</command> </hudson.tasks.Shell> (in fact the entire config.xml ends up on a single line).
          Karel Vervaeke made changes -
          Labels New: API REST XML cdata idempotence whitespace

          Oleg Nenashev added a comment -

          Fixed in newer versions

          Oleg Nenashev added a comment - Fixed in newer versions
          Oleg Nenashev made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 138049 ] New: JNJira + In-Review [ 187814 ]

            Unassigned Unassigned
            ielectric iElectric
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: