This commit is contained in:
Gregory Hendrickson
2023-06-09 14:33:30 -07:00
parent bb9ecc6caf
commit 83d45cf3a6

31
Jenkinsfile vendored
View File

@@ -5,6 +5,7 @@ pipeline{
environment {
DOCKERHUB_CREDENTIALS=credentials('dockerhub-cred')
}
stages {
stage('Build') {
steps {
@@ -35,22 +36,22 @@ pipeline{
// }
// }
// }
stage('Pull and Deploy')
steps {
// Send commands to remote Docker host via SSH
script {
sshCommand remote: [
credentialsId: 'SSH_CREDENTIALS',
host: '172.16.11.90',
username: '172.16.11.90'
], 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 aisthanestha/docker-test-image:latest
'''
}
stage('Pull and Deploy')
steps {
// Send commands to remote Docker host via SSH
script {
sshCommand remote: [
credentialsId: 'SSH_CREDENTIALS',
host: '172.16.11.90',
username: '172.16.11.90'
], 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 aisthanestha/docker-test-image:latest
'''
}
}
post {
always {