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

Unable to use default rake on Windows with certain JREs

    Details

    • Similar Issues:

      Description

      Create a job with a rake step that is to use the default rake installation and then run the job on a Windows agent that has one of the affected JREs in use. The job will fail with:

      [workspace] $ rake.bat
      '"C:\path\to\Jenkins\jobs\jobName\workspace\ruby.exe"' is not recognized as an internal or external command,
      operable program or batch file.
      Build step 'Invoke Rake' marked build as failure
      

      This appears to be caused by JDK-8016721 : (process) Behavior of %~dp0 in .cmd and .bat scripts has changed whereby affected JRE versions try to create a sub-process with:

      cmd  /c ""rake.bat""
      

      ...instead of:

      cmd  /c rake.bat
      

      ...as previous versions of the JRE used to.

      When configuring a non-default rake installation, the path to the batch file will be absolute and this seems to not break rake.bat.

        Attachments

          Activity

          Hide
          oli_at_jsi Olivier Dagenais added a comment -

          I have submitted pull request #13 to fix this issue.

          Show
          oli_at_jsi Olivier Dagenais added a comment - I have submitted pull request #13 to fix this issue.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Olivier Dagenais
          Path:
          src/main/java/hudson/plugins/rake/Rake.java
          http://jenkins-ci.org/commit/rake-plugin/e7ec392e8d793325596332cb1d3e6420299de746
          Log:
          Add work-around for JRE bug, fixes JENKINS-18822.

          A nice side-effect is the absolute path to the [default] rake executable
          that was used will now be logged.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Dagenais Path: src/main/java/hudson/plugins/rake/Rake.java http://jenkins-ci.org/commit/rake-plugin/e7ec392e8d793325596332cb1d3e6420299de746 Log: Add work-around for JRE bug, fixes JENKINS-18822 . A nice side-effect is the absolute path to the [default] rake executable that was used will now be logged.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: olivierdagenais
          Path:
          pom.xml
          src/main/java/hudson/plugins/rake/Rake.java
          src/main/java/hudson/plugins/rake/Util.java
          src/test/java/hudson/plugins/rake/TestUtil.java
          http://jenkins-ci.org/commit/rake-plugin/7dc5389ecdf732bc2d880daae51f604553321e7a
          Log:
          Merge pull request #13 from olivierdagenais/JENKINS-18822

          Fix JENKINS-18822

          Compare: https://github.com/jenkinsci/rake-plugin/compare/da1deaf56acf...7dc5389ecdf7

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: olivierdagenais Path: pom.xml src/main/java/hudson/plugins/rake/Rake.java src/main/java/hudson/plugins/rake/Util.java src/test/java/hudson/plugins/rake/TestUtil.java http://jenkins-ci.org/commit/rake-plugin/7dc5389ecdf732bc2d880daae51f604553321e7a Log: Merge pull request #13 from olivierdagenais/ JENKINS-18822 Fix JENKINS-18822 Compare: https://github.com/jenkinsci/rake-plugin/compare/da1deaf56acf...7dc5389ecdf7
          Hide
          oli_at_jsi Olivier Dagenais added a comment -

          Fixed in release 1.7.8.

          Show
          oli_at_jsi Olivier Dagenais added a comment - Fixed in release 1.7.8 .

            People

            • Assignee:
              oli_at_jsi Olivier Dagenais
              Reporter:
              oli_at_jsi Olivier Dagenais
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: