Added jenkinsfile
This commit is contained in:
20
jenkinsfile
Normal file
20
jenkinsfile
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
pipeline {
|
||||||
|
agent { label 'jenkins-agent' }
|
||||||
|
stages {
|
||||||
|
stage('Build') {
|
||||||
|
steps {
|
||||||
|
sh 'docker-compose build'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Test') {
|
||||||
|
steps {
|
||||||
|
sh 'docker-compose run --rm app python -m pytest'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Deploy') {
|
||||||
|
steps {
|
||||||
|
sh 'docker-compose up -d'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user