From a491c73aca354ca57c8af848366353b036fc8be5 Mon Sep 17 00:00:00 2001 From: dany Date: Mon, 1 Aug 2022 11:57:13 +0200 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Jenkinsfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b7cc7d6..b98d175 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -31,23 +31,30 @@ pipeline{ { steps { sh ''' - printenv; - echo $WORKSPACE; - ls -al $WORKSPACE; - find /var/jenkins_home -name "Jenkinsfile"; + printenv + echo $WORKSPACE + ls -al $WORKSPACE + find /var/jenkins_home -name "Jenkinsfile" ''' } } stage('Remote SSH') { steps { sshCommand remote: remote, command: ''' + set -e echo $WORKSPACE pwd - export WORKSPACE="~/jenkins/workspace/ant-http" + export WORKSPACE="jenkins/workspace/ant-http" cd $WORKSPACE bash test.sh ''' - sshCommand remote: remote, command: "for i in {1..5}; do echo -n \"Loop \$i \"; date ; sleep 1; done" + sshCommand remote: remote, command: ''' + for i in {1..5}; do + echo -n "Loop $i "; + date ; + sleep 1; + done + ''' } } }