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 + ''' } } }