Update Jenkinsfile

This commit is contained in:
Nana Janashia
2020-11-18 12:44:07 +00:00
parent 6a2de89154
commit 5ee75f88dd

13
Jenkinsfile vendored
View File

@@ -1,3 +1,5 @@
#!/usr/bin/env groovy
pipeline {
agent any
stages {
@@ -10,17 +12,20 @@ pipeline {
}
stage('build') {
steps {
script {
echo "Building the application..."
script {
echo "Building the application..."
}
}
}
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}"
}
}
}
}
}
}
}