I recently rewrite bash execution command into Jenkins pipeline. The old code is like
... source environment.sh //Build //Test ...
Now I use pi
If someone want to execute the script with source only solution is to change "Shell executable" to bash in ->Manage Jenkins->Configure System