From eab77292e99865bbdf312a4864b4e7333685479c Mon Sep 17 00:00:00 2001 From: dany Date: Mon, 1 Aug 2022 11:31:29 +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 | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 228e7a7..0b88018 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -28,19 +28,23 @@ pipeline{ { stage('Test') { - sh ''' - printenv; - echo $WORKSPACE; - ls -al $WORKSPACE; - find /var/jenkins_home -name "Jenkinsfile"; - ''' + steps { + sh ''' + printenv; + echo $WORKSPACE; + ls -al $WORKSPACE; + find /var/jenkins_home -name "Jenkinsfile"; + ''' + } } stage('Remote SSH') { - sshCommand remote: remote, command: ''' - cd $(dirname $(find ~/jenkins/workspace/ant-http@script -name "Jenkinsfile")); - bash test.sh; - ''' - sshCommand remote: remote, command: "for i in {1..5}; do echo -n \"Loop \$i \"; date ; sleep 1; done" + steps { + sshCommand remote: remote, command: ''' + cd $(dirname $(find ~/jenkins/workspace/ant-http@script -name "Jenkinsfile")); + bash test.sh; + ''' + sshCommand remote: remote, command: "for i in {1..5}; do echo -n \"Loop \$i \"; date ; sleep 1; done" + } } } }