diff --git a/Jenkinsfile b/Jenkinsfile index 2b8d73a..aa21a93 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -52,6 +52,7 @@ pipeline{ sh''' export -p | tee env.source ''' + writeFile file: 'env.source' text:'printenv' sshCommand remote: remote, command: '''#! /bin/bash set -e echo $WORKSPACE @@ -59,9 +60,8 @@ pipeline{ export WORKSPACE="jenkins/workspace/test" cd $WORKSPACE bash test.sh - source env.source - printenv ''' + sshScript remote: remote, script: "env.source" sshCommand remote: remote, command: '''#! /bin/bash for i in {1..5}; do echo -n "Loop $i ";