Problem:
# jenkins shell
08:06:57 + export KEYPWD=secretPwd
08:06:57 + KEYPWD=secretPwd
原因:
By default, Jenkins launches Execute Shell script with set -x. This causes all commands to be echoed
$ man bash
-x Print commands and their arguments as they are executed.
解决方案:
#!/bin/bash +x