Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Jenkins testing and Gemnasium monitoring #409

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -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')
}
}
}
6 changes: 5 additions & 1 deletion bin/test_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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