What's the working directory in Jenkins after executing a shell command box?
Each build step
is a separate process that Jenkins spawns off. They don't share anything, neither current directory, nor environment variables set/changed within the build step
. Each new build step
starts by spawning a new process off the parent process (the one running Jenkins)
It's not that Jenkins "move back" to $WORKSPACE
. It's that Jenkins discards the previous session.