storj/Jenkinsfile
Matt Robinson 0cbbc69777 Add files for testing builds in docker (#161)
* Add files for testing builds in docker

* Make tests check for redis running before trying to start redis-server, which may not exist.

* Clean redis server before any tests use it.

* Add more debugging for travis

* Explicitly requiring redis for travis
2018-07-25 17:47:02 -04:00

44 lines
711 B
Groovy

node('node') {
try {
stage('Checkout') {
checkout scm
}
stage('Build Images') {
sh 'make test-docker images'
}
stage('Deploy') {
if (env.BRANCH_NAME != 'master') {
echo 'Skipping deploy stage'
return
}
sh 'make push-images'
}
}
catch (err) {
currentBuild.result = "FAILURE"
/*
mail body: "project build error is here: ${env.BUILD_URL}" ,
from: 'build@storj.io',
replyTo: 'build@storj.io',
subject: 'project build failed',
to: "${env.CHANGE_AUTHOR_EMAIL}"
throw err
*/
}
finally {
stage('Cleanup') {
sh 'make test-docker-clean clean-images'
deleteDir()
}
}
}