1
0
Fork 0
EnglishPal/Jenkinsfile

35 lines
1.0 KiB
Plaintext
Raw Normal View History

2021-05-29 18:28:38 +08:00
pipeline {
agent any
stages {
2021-06-08 20:44:58 +08:00
stage('MakeDatabasefile') {
steps {
sh 'touch ./app/static/wordfreqapp.db && rm -f ./app/static/wordfreqapp.db'
sh 'cat ./app/static/wordfreqapp.sql | sqlite3 ./app/static/wordfreqapp.db'
}
}
2021-05-29 18:28:38 +08:00
stage('BuildIt') {
steps {
echo 'Building..'
2021-06-08 20:44:58 +08:00
sh 'sudo docker build -t englishpal .'
sh 'sudo docker stop $(docker ps -aq)'
sh 'sudo docker run -d -p 5000:80 -v /var/lib/jenkins/workspace/EnglishPal_Pipeline_master/app/static/frequency:/app/static/frequency -t englishpal'
2021-05-29 18:28:38 +08:00
}
}
stage('TestIt') {
steps {
echo 'Testing..'
2021-06-08 20:44:58 +08:00
sh 'sudo docker run -d -p 4444:4444 selenium/standalone-chrome'
sh 'pip3 install pytest -U -q'
sh 'pip3 install selenium -U -q'
2021-06-09 21:39:13 +08:00
sh 'pytest -v -s --html=EnglishPalTestReport.html ./app/test'
2021-06-08 20:44:58 +08:00
}
}
stage('DeployIt') {
steps {
echo 'Deploying (TBD)'
2021-05-29 18:28:38 +08:00
}
}
}
}