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