2👍
✅
Yes, shell script is good. There are plugins for other types of scripting, for example Python, if that’s how you roll.
There is also the Copy Artifact Plugin, which you may find helpful.
Workspace is accessed via %WORKSPACE% or $WORKSPACE.
Source:stackexchange.com