Update 'Jenkinsfile'

This commit is contained in:
dany 2022-09-16 13:04:57 +02:00
parent 487e0d5b57
commit c0f3030190

4
Jenkinsfile vendored
View File

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