Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
Description
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
Path:
src/main/java/org/jenkinsci/plugins/postbuildscript/service/ScriptExecutor.java
http://jenkins-ci.org/commit/postbuildscript-plugin/71e3782ea4222a62203ab3813edce50880189694
Log:
JENKINS-19873Batch or a shell script files to execute doesn't run with arguments