Create Jenkinsfile

This commit is contained in:
Suraj kumar 2024-12-08 18:46:41 +05:30 committed by GitHub
parent 97181fdaa5
commit 8879187940
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

24
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,24 @@
pipeline {
agent any
stages {
stage('Clone Repository') {
steps {
git 'https://github.com/docker/getting-started-app.git'
}
}
stage('Build Docker Image') {
steps {
script {
sh 'docker build -t todo-app .'
}
}
}
stage('Run Docker Container') {
steps {
script {
sh 'docker run -d -p 3000:3000 todo-app'
}
}
}
}
}