Update Jenkinsfile
This commit is contained in:
7
Jenkinsfile
vendored
7
Jenkinsfile
vendored
@@ -1,3 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
|
||||
pipeline {
|
||||
agent any
|
||||
stages {
|
||||
@@ -18,7 +20,10 @@ pipeline {
|
||||
stage('deploy') {
|
||||
steps {
|
||||
script {
|
||||
echo "Deploying the application..."
|
||||
def dockerCmd = 'docker run -p 3080:3080 -d nanajanashia/demo-app:1.0'
|
||||
sshagent(['ec2-server-key']) {
|
||||
sh "ssh -o StrictHostKeyChecking=no ec2-user@35.180.251.121 ${dockerCmd}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user