Mise à jour de 'Jenkinsfile'

This commit is contained in:
dany 2022-08-01 11:57:13 +02:00
parent 86564d6dca
commit a491c73aca

19
Jenkinsfile vendored
View File

@ -31,23 +31,30 @@ pipeline{
{ {
steps { steps {
sh ''' sh '''
printenv; printenv
echo $WORKSPACE; echo $WORKSPACE
ls -al $WORKSPACE; ls -al $WORKSPACE
find /var/jenkins_home -name "Jenkinsfile"; find /var/jenkins_home -name "Jenkinsfile"
''' '''
} }
} }
stage('Remote SSH') { stage('Remote SSH') {
steps { steps {
sshCommand remote: remote, command: ''' sshCommand remote: remote, command: '''
set -e
echo $WORKSPACE echo $WORKSPACE
pwd pwd
export WORKSPACE="~/jenkins/workspace/ant-http" export WORKSPACE="jenkins/workspace/ant-http"
cd $WORKSPACE cd $WORKSPACE
bash test.sh 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
'''
} }
} }
} }