Update Jenkinsfile
This commit is contained in:
13
Jenkinsfile
vendored
13
Jenkinsfile
vendored
@@ -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}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user