Mise à jour de 'Jenkinsfile'

This commit is contained in:
dany 2022-08-01 11:31:29 +02:00
parent 35623c8ab6
commit eab77292e9

26
Jenkinsfile vendored
View File

@ -28,19 +28,23 @@ pipeline{
{ {
stage('Test') stage('Test')
{ {
sh ''' steps {
printenv; sh '''
echo $WORKSPACE; printenv;
ls -al $WORKSPACE; echo $WORKSPACE;
find /var/jenkins_home -name "Jenkinsfile"; ls -al $WORKSPACE;
''' find /var/jenkins_home -name "Jenkinsfile";
'''
}
} }
stage('Remote SSH') { stage('Remote SSH') {
sshCommand remote: remote, command: ''' steps {
cd $(dirname $(find ~/jenkins/workspace/ant-http@script -name "Jenkinsfile")); sshCommand remote: remote, command: '''
bash test.sh; 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" '''
sshCommand remote: remote, command: "for i in {1..5}; do echo -n \"Loop \$i \"; date ; sleep 1; done"
}
} }
} }
} }