Update Jenkinsfile

This commit is contained in:
Nana Janashia
2020-11-22 11:00:15 +00:00
parent e2633b0888
commit f31394abe3

5
Jenkinsfile vendored
View File

@@ -37,10 +37,9 @@ pipeline {
stage('deploy') {
steps {
script {
echo 'deploying docker image to EC2...'
def dockerCmd = "docker run -p 8080:8080 -d ${IMAGE_NAME}"
sshagent(['ec2-server-key']) {
sh "ssh -o StrictHostKeyChecking=no ec2-user@35.180.251.121 ${dockerCmd}"
sh ".test.sh"
}
}
}