Update Jenkinsfile
This commit is contained in:
5
Jenkinsfile
vendored
5
Jenkinsfile
vendored
@@ -37,10 +37,9 @@ pipeline {
|
|||||||
stage('deploy') {
|
stage('deploy') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
echo 'deploying docker image to EC2...'
|
|
||||||
def dockerCmd = "docker run -p 8080:8080 -d ${IMAGE_NAME}"
|
|
||||||
sshagent(['ec2-server-key']) {
|
sshagent(['ec2-server-key']) {
|
||||||
sh "ssh -o StrictHostKeyChecking=no ec2-user@35.180.251.121 ${dockerCmd}"
|
sh ".test.sh"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user