From 73dc00cbf11e7d9cb3f4ff303a31d5f9c40ff3a8 Mon Sep 17 00:00:00 2001 From: dany Date: Mon, 1 Aug 2022 11:19:01 +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, 12 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0900f28..a8b8bd2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,4 +1,4 @@ -node { +pipline{ def remote = [:] remote.name = 'workstation' remote.host = 'workstation' @@ -9,13 +9,18 @@ node { remote.logLevel = 'INFO' stage('Test') { - sh 'printenv; echo $WORKSPACE; ls -al $WORKSPACE; find /var/jenkins_home -name "test.sh";' + 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: ''' + 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" } -} \ No newline at end of file +}