From 72873ca112addb42b859e57cd63bd716b4e63af8 Mon Sep 17 00:00:00 2001 From: dany Date: Fri, 16 Sep 2022 11:22:28 +0200 Subject: [PATCH] Update 'Jenkinsfile' --- Jenkinsfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 29b1fa5..683c26d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -49,6 +49,9 @@ pipeline{ } stage('Remote SSH') { steps { + sh''' + printenv | tee env.source + ''' sshCommand remote: remote, command: '''#! /bin/bash set -e echo $WORKSPACE @@ -56,10 +59,9 @@ pipeline{ export WORKSPACE="jenkins/workspace/test" cd $WORKSPACE bash test.sh - bname=$(git rev-parse --abbrev-ref HEAD) - echo "current branche is $bname" ''' - sshCommand remote: remote, command: ''' + sshCommand remote: remote, command: '''#! /bin/bash + source env.source for i in {1..5}; do echo -n "Loop $i "; date ;