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

JobDSL plugin doesn't reset customWorkspace setting

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Duplicate
    • Component/s: job-dsl-plugin
    • Labels:
      None
    • Environment:
      Jenkins ver. 1.597 installed on Windows 8.1 (local test) and Windows Server 2008 R2 (production)
    • Similar Issues:

      Description

      Use JobDSL plug in to create a job like this:

      job('testjob') {
          customWorkspace('c:\\')
      }
      

      Then delete customWorkspace and run JobDSL again:

      job('testjob') {
      }
      

      The setting in the job is still activated and points to "c:\".

        Attachments

          Issue Links

            Activity

            Hide
            kaltokri Rolf Geuenich added a comment -

            I've tried the following things, but none of them deactivated customWorkspace:

            customWorkspace()
            customWorkspace('')
            customWorkspace(false)
            

            In GitHub wiki I didn't find any solution and google search brings no answer.

            Show
            kaltokri Rolf Geuenich added a comment - I've tried the following things, but none of them deactivated customWorkspace: customWorkspace() customWorkspace('') customWorkspace( false ) In GitHub wiki I didn't find any solution and google search brings no answer.
            Hide
            daspilker Daniel Spilker added a comment -

            This is caused by another issue, JENKINS-21017. The Job DSL plugin, the CLI and the REST API all use a similar API and the problem exists for all those components and needs to be fixed in Jenkins core or the xstream library.

            Show
            daspilker Daniel Spilker added a comment - This is caused by another issue, JENKINS-21017 . The Job DSL plugin, the CLI and the REST API all use a similar API and the problem exists for all those components and needs to be fixed in Jenkins core or the xstream library.
            Hide
            daspilker Daniel Spilker added a comment -

            As a (lame) workaround, you can restart Jenkins after deleting the customWorkspace settings. Then the configuration is loaded from scratch and any runtime information is discarded.

            Show
            daspilker Daniel Spilker added a comment - As a (lame) workaround, you can restart Jenkins after deleting the customWorkspace settings. Then the configuration is loaded from scratch and any runtime information is discarded.
            Hide
            kaltokri Rolf Geuenich added a comment -

            Thank you for this information. This will help me because we need to switch some jobs and don't want to change them manually.

            Show
            kaltokri Rolf Geuenich added a comment - Thank you for this information. This will help me because we need to switch some jobs and don't want to change them manually.
            Hide
            danielbeck Daniel Beck added a comment -

            The effective "default" custom workspace is usually workspace/ followed by the project's full name. Just as the effective custom display name is the same as the project's name. Not sure whether that helps in the context of Job DSL, it's what I do for Cloudbees Template Plugin.

            Show
            danielbeck Daniel Beck added a comment - The effective "default" custom workspace is usually workspace/ followed by the project's full name . Just as the effective custom display name is the same as the project's name . Not sure whether that helps in the context of Job DSL, it's what I do for Cloudbees Template Plugin.
            Hide
            sho_nig S H added a comment -

            Any progress on this issue?

            Show
            sho_nig S H added a comment - Any progress on this issue?
            Hide
            jglick Jesse Glick added a comment -

            Verified duplicate of JENKINS-21017.

            Show
            jglick Jesse Glick added a comment - Verified duplicate of  JENKINS-21017 .

              People

              Assignee:
              daspilker Daniel Spilker
              Reporter:
              kaltokri Rolf Geuenich
              Votes:
              6 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: