Status: Closed (View Workflow)
1) Post-build Actions → Execute a set of scripts → Batch or a shell script files to execute → File 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?
Code changed in jenkins
User: Daniel Heid
JENKINS-19873 Batch or a shell script files to execute doesn't run with arguments
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.