-
Notifications
You must be signed in to change notification settings - Fork 54
automation scripts' use of dirname $0 doesn't work in Jenkins jobs #1512
Copy link
Copy link
Closed
Labels
bugSomething is not workingSomething is not working
Description
Describe the bug
the bash scripts that use command $(dirname $0) to derive a full path for execution does not work as desired within Jenkins job's execution frames.
In Jenkins jobs, an execution frame to run bash commands creates a temporary script in which to execute the commands. This script is unbound from the workspace, and lives on the host in /tmp/...
So $(dirname $0) always returns "/tmp", which is not the intended path wanted for these scripts:
- util/weekly_build/SpackStackBuildCache_AllSteps.sh (line 7)
- util/weekly_build/ShellSetup.sh (line 36)
- util/weekly_build/06_AppTests.sh (line 25)
To Reproduce
Run util/weekly_build/ShellSetup.sh within a Jenkins job
Expected behavior
executing any of the above scripts in a Jenkins job should find the full path of the target.
System:
Orion
Additional context
Perhaps add a top WORK_DIR global variable that can be referenced instead.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething is not workingSomething is not working