Skip to content

Commit

Permalink
Update Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Tynab authored Jun 21, 2023
1 parent 7500b38 commit 3fbca8b
Showing 1 changed file with 5 additions and 30 deletions.
35 changes: 5 additions & 30 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,39 +1,14 @@
def gv

pipeline {
agent any

stages {
stage('init') {
steps {
script {
echo "Initializing Groovy Script..."
gv = load "script.groovy"
}
}
}
stage('build') {
steps {
script {
echo "Build Docker Image with Dockerfile..."
gv.buildImage()
}
}
}
stage('push') {
steps {
script {
echo "Pushing Docker Image to Docker Hub Repo..."
gv.pushImage()
}
}
}
stage('deploy') {
stage('Build') {
steps {
script {
echo "Deploying the application to EC2..."
gv.deployImage()
def img = 'httpd:2.4-alpine'
docker.image(img).run('-d -p 80:80')
}
}
}
}
}
}

0 comments on commit 3fbca8b

Please sign in to comment.