Skip to content
Permalink
Browse files
add redis to jenkinsfile
  • Loading branch information
soperd committed Nov 11, 2018
1 parent 4565b28 commit f074b3d0e7edb2c984e7525f17083dc666838377
Showing 1 changed file with 9 additions and 6 deletions.
@@ -2,12 +2,15 @@ node {
checkout scm

stage('Build and Test') {
docker.image('python:3.5').inside("-e HOME=${env.WORKSPACE}") {
withCredentials([file(credentialsId: 'ChatbotConfig',
variable: 'FILE')]) {
sh 'mv $FILE config.json'
sh 'pip install --user -r requirements.txt'
sh 'python -m unittest discover -p "*_test.py"'
docker.image('redis:alpine').withRun { c ->
docker.image('python:3.5').inside(
"-e HOME=${env.WORKSPACE} --network container:${c.id}") {
withCredentials([file(credentialsId: 'ChatbotConfig',
variable: 'FILE')]) {
sh 'mv $FILE config.json'
sh 'pip install --user -r requirements.txt'
sh 'python -m unittest discover -p "*_test.py"'
}
}
}
}

0 comments on commit f074b3d

Please sign in to comment.