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

Post-build Actions --> Execute a set of scripts --> Batch or a shell script files to execute doesn't run with arguments

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      1) Post-build ActionsExecute a set of scriptsBatch or a shell script files to executeFile script path: $JENKINS_HOME/bin/testscript $BUILD_ID

      ... isn't found (due to the argument, see 2) below). Quoting the complete command line with "..." doesn't help.

      From the log:

      ...
      [PostBuildScript] - Execution post build scripts.
      [PostBuildScript] - [Error] - Problems occurs: The script file path '/var/lib/jenkins/bin/testscript 2013-10-03_19-00-03' doesn't exist.
      Build step 'Execute a set of scripts' changed build result to FAILURE
      ...

      2) If you specify no argument the script is executed, but its content is printed in its entirety before execution.

      From the log:

      ...
      [PostBuildScript] - Execution post build scripts.
      [PostBuildScript] - Resolving environment variables for the script content.
      [PostBuildScript] - Evaluating the script: 
       
      # This is a test script
      
      set -x
      echo   "Running testscript..."
      
      [workspace] $ /bin/sh -xe /tmp/hudson9078512228524920920.sh
      + set -x
      + echo Running testscript...
      Running testscript...
      ...

      3) Minor: "... a ... file*s* ..." isn't proper English, is it?

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Daniel Heid
          Path:
          src/main/java/org/jenkinsci/plugins/postbuildscript/service/ScriptExecutor.java
          http://jenkins-ci.org/commit/postbuildscript-plugin/71e3782ea4222a62203ab3813edce50880189694
          Log:
          JENKINS-19873 Batch or a shell script files to execute doesn't run with arguments

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Heid Path: src/main/java/org/jenkinsci/plugins/postbuildscript/service/ScriptExecutor.java http://jenkins-ci.org/commit/postbuildscript-plugin/71e3782ea4222a62203ab3813edce50880189694 Log: JENKINS-19873 Batch or a shell script files to execute doesn't run with arguments
          Hide
          dheid Daniel Heid added a comment -

          Will be fixed by pull request https://github.com/jenkinsci/postbuildscript-plugin/pull/15

          Please leave a comment for it and vote for the pull request.

          Show
          dheid Daniel Heid added a comment - Will be fixed by pull request https://github.com/jenkinsci/postbuildscript-plugin/pull/15 Please leave a comment for it and vote for the pull request.

            People

            • Assignee:
              gbois Gregory Boissinot
              Reporter:
              geri Gerold Broser
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: