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

      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?

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

              Created:
              Updated:
              Resolved: