Mise à jour de 'Jenkinsfile'

This commit is contained in:
dany 2022-08-01 11:19:01 +02:00
parent ad41a12b46
commit 73dc00cbf1

17
Jenkinsfile vendored
View File

@ -1,4 +1,4 @@
node { pipline{
def remote = [:] def remote = [:]
remote.name = 'workstation' remote.name = 'workstation'
remote.host = 'workstation' remote.host = 'workstation'
@ -9,13 +9,18 @@ node {
remote.logLevel = 'INFO' remote.logLevel = 'INFO'
stage('Test') 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') { stage('Remote SSH') {
sshCommand remote: remote, command: '\ sshCommand remote: remote, command: '''
cd $(dirname $(find ~/jenkins/workspace/ant-http@script -name "Jenkinsfile")); \ cd $(dirname $(find ~/jenkins/workspace/ant-http@script -name "Jenkinsfile"));
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"
} }
} }