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

CLI update-job and POSTing config.xml cannot remove properties

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The custom workspace of a Jenkins job cannot be removed by the CLI using update-job.

      Steps to reproduce:
      1. Have a job with a custom workspace.
      2. Remove the custom workspace using the Jenkins java CLI (having a second job without the custom workspace and doing <cli> -get-job <second job> | <cli> update-job <job> is how we encountered this problem).
      3. Note that the config.xml of the job no longer references a custom workspace.
      4. Open the job in the Web GUI. Note that the custom workspace is there, and a save of the job without doing any updates will put the custom workspace configuration back into the config.xml file for the job.

      Bottom line - to remove the custom workspace, one either needs to do it via the web GUI, or do a restart of the Jenkins instance after doing it via the CLI.

      Side note: the " and some other characters are save differently when updating a job via the CLI vs. the Web GUI.

      Example: double quotes " will be changed to '"' in config.xml through CLI method.

        Attachments

          Issue Links

            Activity

            royzeng Roy Zeng created issue -
            esinsag Sagi Sinai-Glazer made changes -
            Field Original Value New Value
            Component/s cli [ 15624 ]
            Component/s additional-identities [ 17451 ]
            Labels gui jenkins
            jglick Jesse Glick made changes -
            Component/s core [ 15593 ]
            Component/s cli [ 15624 ]
            Labels gui jenkins cli custom-workspace
            danielbeck Daniel Beck made changes -
            Link This issue is duplicated by JENKINS-24657 [ JENKINS-24657 ]
            danielbeck Daniel Beck made changes -
            Affects Version/s current [ 10162 ]
            Environment Red Hat Enterprise Linux Server release 6.4 (Santiago)
            Virtual Machine
            Summary Jenkins CLI update-job misses custom workspace deletion Jenkins CLI update-job and POSTing config.xml cannot remove properties
            danielbeck Daniel Beck made changes -
            Link This issue is duplicated by JENKINS-23291 [ JENKINS-23291 ]
            daspilker Daniel Spilker made changes -
            Link This issue is blocking JENKINS-26825 [ JENKINS-26825 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "Stack Overflow question (Web Link)" [ 12105 ]
            jglick Jesse Glick made changes -
            Labels cli custom-workspace cli custom-workspace xstream
            jglick Jesse Glick made changes -
            URL http://stackoverflow.com/questions/20668266/xstream-null-out-fields-not-mentioned-in-xml-during-in-place-unmarshal
            Priority Minor [ 4 ] Major [ 3 ]
            Summary Jenkins CLI update-job and POSTing config.xml cannot remove properties CLI update-job and POSTing config.xml cannot remove properties
            daspilker Daniel Spilker made changes -
            Link This issue is blocking JENKINS-30548 [ JENKINS-30548 ]
            mjdetullio Matthew DeTullio made changes -
            Link This issue is related to JENKINS-36512 [ JENKINS-36512 ]
            mjdetullio Matthew DeTullio made changes -
            Link This issue is related to JENKINS-36512 [ JENKINS-36512 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 152858 ] JNJira + In-Review [ 178344 ]
            daspilker Daniel Spilker made changes -
            Link This issue is blocking JENKINS-39917 [ JENKINS-39917 ]
            stephenconnolly Stephen Connolly made changes -
            Remote Link This issue links to "PR#2736 (Web Link)" [ 15389 ]
            stephenconnolly Stephen Connolly made changes -
            Assignee Stephen Connolly [ stephenconnolly ]
            stephenconnolly Stephen Connolly made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            stephenconnolly Stephen Connolly made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            allanlewis Allan Lewis made changes -
            Description The custom workspace of a Jenkins job cannot be removed by the CLI using update-job.

            Steps to reproduce:
            1. Have a job with a custom workspace.
            2. Remove the custom workspace using the Jenkins java CLI (having a second job without the custom workspace and doing <cli> -get-job <second job> | <cli> update-job <job> is how we encountered this problem).
            3. Note that the config.xml of the job no longer references a custom workspace.
            4. Open the job in the Web GUI. Note that the custom workspace is there, and a save of the job without doing any updates will put the custom workspace configuration back into the config.xml file for the job.

            Bottom line - to remove the custom workspace, one either needs to do it via the web GUI, or do a restart of the Jenkins instance after doing it via the CLI.

            Side note: the &quot; and some other characters are save differently when updating a job via the CLI vs. the Web GUI.

            Example: double quotes " will be changed to '&quot;' in config.xml through CLI method.
            The custom workspace of a Jenkins job cannot be removed by the CLI using {{update-job}}.

            Steps to reproduce:
             1. Have a job with a custom workspace.
             2. Remove the custom workspace using the Jenkins java CLI (having a second job without the custom workspace and doing {{<cli> -get-job <second job> | <cli> update-job <job>}} is how we encountered this problem).
             3. Note that the {{config.xml}} of the job no longer references a custom workspace.
             4. Open the job in the Web GUI. Note that the custom workspace is there, and a save of the job without doing any updates will put the custom workspace configuration back into the config.xml file for the job.

            Bottom line - to remove the custom workspace, one either needs to do it via the web GUI, or do a restart of the Jenkins instance after doing it via the CLI.

            Side note: the " and some other characters are save differently when updating a job via the CLI vs. the Web GUI.

            Example: double quotes " will be changed to '"' in {{config.xml}} through CLI method.
            daspilker Daniel Spilker made changes -
            Link This issue blocks JENKINS-47528 [ JENKINS-47528 ]
            cloudbees CloudBees Inc. made changes -
            Remote Link This issue links to "CloudBees Internal OSS-261 (Web Link)" [ 18930 ]
            jglick Jesse Glick made changes -
            Assignee Stephen Connolly [ stephenconnolly ] Jesse Glick [ jglick ]
            jglick Jesse Glick made changes -
            Status In Review [ 10005 ] In Progress [ 3 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "PR 3196 (Web Link)" [ 19367 ]
            jglick Jesse Glick made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            jglick Jesse Glick made changes -
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Resolved [ 5 ]

              People

              Assignee:
              jglick Jesse Glick
              Reporter:
              royzeng Roy Zeng
              Votes:
              16 Vote for this issue
              Watchers:
              15 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: