diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..dd87dfe6 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,27 @@ +#!/usr/bin/env groovy + +properties(defaultVars.projectProperties) + +node { + checkout scm + + stage('Test') { + try { + cancelBuildsOfSameJob() + notifyBuild('STARTED', '#app-log-autotune') + ansiColor('xterm') { + withVoxOpsSSHKeyPath { + sh "./bin/test_docker_build.sh" + if (env.BRANCH_NAME == 'master') { + pushGemnasiumUpdate() + } + } + } + } catch (e) { + currentBuild.result = "FAILED" + throw e + } finally { + notifyBuild(currentBuild.result, '#app-log-autotune') + } + } +} diff --git a/bin/test_run.sh b/bin/test_run.sh index 3524917e..772effb0 100755 --- a/bin/test_run.sh +++ b/bin/test_run.sh @@ -5,8 +5,12 @@ rm -Rf Gemfile.lock .bundle bundle install --path vendor/bundle --no-deployment --no-color export RAILS_ENV=test -bundle exec rake db:reset +bundle exec rake db:reset bundle exec rake test +# TODO: should we also do these? +# npm install +# npm test + rm -f ./log/*.log rm -rf ./working