Add Jenkinsfile

This commit is contained in:
Benjamin Tan 2025-12-15 17:16:00 +00:00
parent a10a9c61ba
commit 8e4f5f89b0

44
Jenkinsfile vendored Normal file
View file

@ -0,0 +1,44 @@
pipeline {
agent docker { image 'python:alpine3.22' }
stages {
stage('Pre-build') {
steps {
sh 'python3 -m venv venv'
sh 'source venv/bin/activate'
sh 'pip3 --version'
sh 'pip install -r requirements.txt'
}
}
stage('Test') {
steps {
sh 'pytest test_app.py'
}
}
stage('Containerization') {
steps {
sh 'echo Docker Build Image..'
sh 'echo Docker Tag Image....'
sh 'echo Docker Push Image......'
}
}
stage('Run-and-test') {
steps {
sh 'python app.py &'
sh
}
}
stage('Integration Testing') {
steps {
sh "sleep 10s"
sh 'echo Testing using cURL commands......'
}
}
}
tools {
maven 'M398'
}
}