Initial commit: Hello Devops CI/CD

This commit is contained in:
2025-12-31 19:20:52 +07:00
commit 7afe6a20dd
3 changed files with 35 additions and 0 deletions

22
Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,22 @@
pipeline {
agent any
stages {
stage('Build Docker Image') {
steps {
sh 'docker build -t hello-devops .'
}
}
stage('Deploy Container') {
steps {
sh '''
docker stop hello-devops || true
docker rm hello-devops || true
docker run -d --name hello-devops -p 5000:80 hello-devops
'''
}
}
}
}