mirror of
https://github.com/ghndrx/docker-test-image.git
synced 2026-02-10 06:45:05 +00:00
s
This commit is contained in:
19
Jenkinsfile
vendored
19
Jenkinsfile
vendored
@@ -34,19 +34,26 @@ pipeline {
|
|||||||
remote.host = '172.16.11.90'
|
remote.host = '172.16.11.90'
|
||||||
remote.user = userName
|
remote.user = userName
|
||||||
remote.password = password
|
remote.password = password
|
||||||
|
|
||||||
writeFile file: 'run-pull-deploy.sh', text: '''
|
sshCommand remote: remote, command: '''
|
||||||
docker pull aisthanestha/docker-test-image:latest
|
docker pull aisthanestha/docker-test-image:latest
|
||||||
docker stop docker-test-image
|
docker stop docker-test-image
|
||||||
docker rm docker-test-image
|
docker rm docker-test-image
|
||||||
docker run -d --name docker-test-image -p 8082:80 aisthanestha/docker-test-image:latest
|
docker run -d --name docker-test-image -p 8082:80 aisthanestha/docker-test-image:latest
|
||||||
'''
|
'''
|
||||||
|
|
||||||
// Transfer the script file to the remote host
|
// writeFile file: 'run-pull-deploy.sh', text: '''
|
||||||
sshPut remote: remote, from: 'run-pull-deploy.sh', into: '~/run-pull-deploy.sh'
|
// 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
|
// Transfer the script file to the remote host
|
||||||
sshCommand remote: remote, command: 'chmod +x ~/run-pull-deploy.sh && ~/run-pull-deploy.sh'
|
// 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'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user