From 4d982aa5af09f36ddcd9bac725f9182e595a80c1 Mon Sep 17 00:00:00 2001 From: Gregory Hendrickson Date: Fri, 9 Jun 2023 16:38:29 -0700 Subject: [PATCH] s --- Jenkinsfile | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index dbe2aa1..6536389 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -34,19 +34,26 @@ pipeline { remote.host = '172.16.11.90' remote.user = userName remote.password = password - - writeFile file: 'run-pull-deploy.sh', text: ''' + + sshCommand remote: remote, command: ''' docker pull aisthanestha/docker-test-image:latest docker stop docker-test-image docker rm docker-test-image docker run -d --name docker-test-image -p 8082:80 aisthanestha/docker-test-image:latest ''' - // Transfer the script file to the remote host - sshPut remote: remote, from: 'run-pull-deploy.sh', into: '~/run-pull-deploy.sh' + // writeFile file: 'run-pull-deploy.sh', text: ''' + // docker pull aisthanestha/docker-test-image:latest + // docker stop docker-test-image + // docker rm docker-test-image + // docker run -d --name docker-test-image -p 8082:80 aisthanestha/docker-test-image:latest + // ''' - // Execute the script file on the remote host - sshCommand remote: remote, command: 'chmod +x ~/run-pull-deploy.sh && ~/run-pull-deploy.sh' + // Transfer the script file to the remote host + // sshPut remote: remote, from: 'run-pull-deploy.sh', into: '~/run-pull-deploy.sh' + + // // Execute the script file on the remote host + // sshCommand remote: remote, command: 'chmod +x ~/run-pull-deploy.sh && ~/run-pull-deploy.sh' } } }