Last active
February 28, 2018 17:57
-
-
Save rmyers/d3273569b11d89083ea93032f50e7705 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def checkoutPR () { | |
checkout([ | |
$class: 'GitSCM', | |
branches: [[name: 'master']], | |
extensions: [ | |
[$class: 'CheckoutOption'], | |
[$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: true] | |
], | |
userRemoteConfigs: [[ | |
url: 'https://github.com/racker/reach', | |
name: 'origin', | |
refspec: '+refs/pull/*:refs/remotes/origin/pr/*', | |
credentialsId: 'github-service-account' | |
]] | |
]) | |
} | |
def run() { | |
stage('Checkout PR') { | |
node() { | |
checkoutPR() | |
stash excludes: 'docker/**', includes: '**', name: 'checkout' | |
} | |
} | |
parallel( | |
python: { | |
stage('Python') { | |
node('python') { | |
unstash 'checkout' | |
ansiColor('xterm') { | |
withPythonEnv('python'){ | |
pysh 'make pipinstall' | |
// TODO(rmyers): Fix lint errors in ruby | |
// sh 'cd qetest/pinot/spec && bundle exec rubocop' | |
// Override the local settings | |
sh 'cp cloudkick/webapp/jenkins_settings.py cloudkick/webapp/local_settings.py' | |
pysh 'make pep8' | |
pysh 'make pyflakes' | |
pysh 'make pyimports' | |
pysh 'make unit_tests' | |
// fire up cassandra and sleep a little | |
sh 'cassandra && sleep 5' | |
pysh 'make ci_python_integration' | |
} | |
} | |
} | |
} | |
}, | |
javascript: { | |
stage('Javascript') { | |
node('node') { | |
unstash 'checkout' | |
ansiColor('xterm') { | |
sh 'make yarninstall' | |
sh 'make js_lint' | |
sh 'make ci_js_unit' | |
sh 'make ci_js_integration' | |
// TODO(rmyers): Fix the js_compile on RSI | |
// sh 'make js_compile' | |
// stash (the compiled assets) | |
} | |
} | |
} | |
} | |
) | |
stage('Create Dist') { | |
node() { | |
// unstash the checkout | |
// unstash the compiled assets | |
// tar them up and create a dist (bash only!!!!) | |
echo 'Nothing to see here' | |
} | |
} | |
} | |
return this; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment