Currently control files are generated in a subdirectory of the workspace. This is causing various issues because some build steps are not expecting these extra files which are internal to Jenkins.

      These could be generated instead in a temporary directory or in a specific subfolder of the slave root instead.

          [JENKINS-27152] Store sh control files outside of workspace

          jglick the bat 'cd .. && git clean -fdx' was required for previous versions where the control files were in the current working directory. The 1.8 update broke compatibility with that workaround because the control files moved from the CWD to the parent directory which moved them back to where they can't be. With version 1.8 the bat 'git clean -fdx' is what is needed now.

          This incompatibility means that the change to the Jenkinsfile needs to be back-ported to all affected versions before they can build a new build successfully, however doing so immediately would trigger maintenance builds unnecessarily (Multi-Branch Pipeline Job) - which makes this incompatibility annoying.

          And thanks for the long explanation!

          Ing. Christoph Obexer added a comment - jglick the bat 'cd .. && git clean -fdx' was required for previous versions where the control files were in the current working directory. The 1.8 update broke compatibility with that workaround because the control files moved from the CWD to the parent directory which moved them back to where they can't be. With version 1.8 the bat 'git clean -fdx' is what is needed now. This incompatibility means that the change to the Jenkinsfile needs to be back-ported to all affected versions before they can build a new build successfully, however doing so immediately would trigger maintenance builds unnecessarily (Multi-Branch Pipeline Job) - which makes this incompatibility annoying. And thanks for the long explanation!

          Jesse Glick added a comment -

          until the core API gets into a reasonable LTS version

          Sadly according to #jenkins-meeting it just missed making it into the next line (danielbeck & kohsuke chose 1.651), so will have to wait for a 2.0 dep I guess.

          It may be convenient to have a pipeline step "createTempFile()".

          pwd tmp: true
          

          This incompatibility means that the change to the Jenkinsfile needs to be back-ported to all affected versions before they can build a new build successfully, however doing so immediately would trigger maintenance builds unnecessarily […] which makes this incompatibility annoying.

          Sorry. Do not see an easy way around that.

          Jesse Glick added a comment - until the core API gets into a reasonable LTS version Sadly according to #jenkins-meeting it just missed making it into the next line ( danielbeck & kohsuke chose 1.651), so will have to wait for a 2.0 dep I guess. It may be convenient to have a pipeline step " createTempFile() ". pwd tmp: true This incompatibility means that the change to the Jenkinsfile needs to be back-ported to all affected versions before they can build a new build successfully, however doing so immediately would trigger maintenance builds unnecessarily […] which makes this incompatibility annoying. Sorry. Do not see an easy way around that.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/org/jenkinsci/plugins/configfiles/buildwrapper/ManagedFileUtil.java
          http://jenkins-ci.org/commit/config-file-provider-plugin/eb67346e042b09a535ca7e343a5e563706a19e79
          Log:
          JENKINS-27152 Use a temporary directory for managed files near the workspace.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/org/jenkinsci/plugins/configfiles/buildwrapper/ManagedFileUtil.java http://jenkins-ci.org/commit/config-file-provider-plugin/eb67346e042b09a535ca7e343a5e563706a19e79 Log: JENKINS-27152 Use a temporary directory for managed files near the workspace.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/PwdStepTest.java
          http://jenkins-ci.org/commit/workflow-support-plugin/88b7a89577178ad99f718b7e08d73750378f3d98
          Log:
          JENKINS-27152 Option for pwd step to return temp directory.
          Originally-Committed-As: 8c74333321f007e829b2a9581af643b792ef47a6

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/PwdStepTest.java http://jenkins-ci.org/commit/workflow-support-plugin/88b7a89577178ad99f718b7e08d73750378f3d98 Log: JENKINS-27152 Option for pwd step to return temp directory. Originally-Committed-As: 8c74333321f007e829b2a9581af643b792ef47a6

          Code changed in jenkins
          User: Jesse Glick
          Path:
          aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/PwdStepTest.java
          basic-steps/src/main/java/org/jenkinsci/plugins/workflow/steps/PwdStep.java
          basic-steps/src/main/resources/org/jenkinsci/plugins/workflow/steps/PwdStep/config.jelly
          basic-steps/src/main/resources/org/jenkinsci/plugins/workflow/steps/PwdStep/help-tmp.html
          http://jenkins-ci.org/commit/workflow-basic-steps-plugin/ad40c7688bac0e9f3405d17eea0013800ecbe6d8
          Log:
          JENKINS-27152 Option for pwd step to return temp directory.
          Originally-Committed-As: 8c74333321f007e829b2a9581af643b792ef47a6

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/PwdStepTest.java basic-steps/src/main/java/org/jenkinsci/plugins/workflow/steps/PwdStep.java basic-steps/src/main/resources/org/jenkinsci/plugins/workflow/steps/PwdStep/config.jelly basic-steps/src/main/resources/org/jenkinsci/plugins/workflow/steps/PwdStep/help-tmp.html http://jenkins-ci.org/commit/workflow-basic-steps-plugin/ad40c7688bac0e9f3405d17eea0013800ecbe6d8 Log: JENKINS-27152 Option for pwd step to return temp directory. Originally-Committed-As: 8c74333321f007e829b2a9581af643b792ef47a6

          Code changed in jenkins
          User: Jesse Glick
          Path:
          aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/PwdStepTest.java
          http://jenkins-ci.org/commit/pipeline-build-step-plugin/65490d1e880eafd7bd9f07e00b41ac6edd5e4cab
          Log:
          JENKINS-27152 Option for pwd step to return temp directory.
          Originally-Committed-As: 8c74333321f007e829b2a9581af643b792ef47a6

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/PwdStepTest.java http://jenkins-ci.org/commit/pipeline-build-step-plugin/65490d1e880eafd7bd9f07e00b41ac6edd5e4cab Log: JENKINS-27152 Option for pwd step to return temp directory. Originally-Committed-As: 8c74333321f007e829b2a9581af643b792ef47a6

          Code changed in jenkins
          User: Jesse Glick
          Path:
          aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/PwdStepTest.java
          http://jenkins-ci.org/commit/pipeline-input-step-plugin/bc8f08b30e54645269b2ab4af07cddfd34b31e7a
          Log:
          JENKINS-27152 Option for pwd step to return temp directory.
          Originally-Committed-As: 8c74333321f007e829b2a9581af643b792ef47a6

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/PwdStepTest.java http://jenkins-ci.org/commit/pipeline-input-step-plugin/bc8f08b30e54645269b2ab4af07cddfd34b31e7a Log: JENKINS-27152 Option for pwd step to return temp directory. Originally-Committed-As: 8c74333321f007e829b2a9581af643b792ef47a6

          Code changed in jenkins
          User: Jesse Glick
          Path:
          aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/PwdStepTest.java
          http://jenkins-ci.org/commit/pipeline-stage-step-plugin/d6dbe7480cab9cb96dd584c2066de164ba36c868
          Log:
          JENKINS-27152 Option for pwd step to return temp directory.
          Originally-Committed-As: 8c74333321f007e829b2a9581af643b792ef47a6

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/PwdStepTest.java http://jenkins-ci.org/commit/pipeline-stage-step-plugin/d6dbe7480cab9cb96dd584c2066de164ba36c868 Log: JENKINS-27152 Option for pwd step to return temp directory. Originally-Committed-As: 8c74333321f007e829b2a9581af643b792ef47a6

          Code changed in jenkins
          User: Jesse Glick
          Path:
          aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/PwdStepTest.java
          http://jenkins-ci.org/commit/workflow-multibranch-plugin/7e4f7eff243617c192afebeb9914144435d30ecb
          Log:
          JENKINS-27152 Option for pwd step to return temp directory.
          Originally-Committed-As: 8c74333321f007e829b2a9581af643b792ef47a6

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/PwdStepTest.java http://jenkins-ci.org/commit/workflow-multibranch-plugin/7e4f7eff243617c192afebeb9914144435d30ecb Log: JENKINS-27152 Option for pwd step to return temp directory. Originally-Committed-As: 8c74333321f007e829b2a9581af643b792ef47a6

          Code changed in jenkins
          User: Jesse Glick
          Path:
          aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/PwdStepTest.java
          http://jenkins-ci.org/commit/workflow-cps-plugin/db56cffc53abb11bb7d1ea869dac3c8055cb0458
          Log:
          JENKINS-27152 Option for pwd step to return temp directory.
          Originally-Committed-As: 8c74333321f007e829b2a9581af643b792ef47a6

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/PwdStepTest.java http://jenkins-ci.org/commit/workflow-cps-plugin/db56cffc53abb11bb7d1ea869dac3c8055cb0458 Log: JENKINS-27152 Option for pwd step to return temp directory. Originally-Committed-As: 8c74333321f007e829b2a9581af643b792ef47a6

            jglick Jesse Glick
            vlatombe Vincent Latombe
            Votes:
            7 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: