Skip to content

Instantly share code, notes, and snippets.

@ndevenish
Created May 8, 2018 09:50
Show Gist options
  • Save ndevenish/4e20596cd914b4c87dbc3b42d5099e16 to your computer and use it in GitHub Desktop.
Save ndevenish/4e20596cd914b4c87dbc3b42d5099e16 to your computer and use it in GitHub Desktop.
Dials JenkinsFile
pipeline {
agent { label "centos6" }
stages {
// Prepare the workspace by copying artifacts, updating repositories etc
stage('Prepare') {
}
stage('Bootstrap') {
when {
expression {
!fileExists("base/.done")
}
}
steps {
deleteDir()
checkout([$class: 'GitSCM', branches: [[name: '*/master']],
doGenerateSubmoduleConfigurations: false,
extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'modules/cctbx_project']],
submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/cctbx/cctbx_project.git']]])
sh "ln -s modules/cctbx_project/libtbx/auto_build/bootstrap.py ."
sh "python bootstrap.py --builder=dials update hot"
sh "python bootstrap.py --builder=dials base"
}
post {
failure {
archiveArtifacts 'base_tmp/*_log'
}
success {
sh "touch base/.done"
}
}
}
stage('Build') {
steps {
checkout([$class: 'GitSCM', branches: [[name: '*/master']],
doGenerateSubmoduleConfigurations: false,
extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'modules/cctbx_project']],
submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/cctbx/cctbx_project.git']]])
checkout([$class: 'GitSCM', branches: [[name: '*/master']],
doGenerateSubmoduleConfigurations: false,
extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'modules/dials']],
submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/dials/dials.git']]])
sh "python bootstrap.py --builder=dials build"
}
}
stage('Test'){
steps {
dir(pwd(tmp: true)) {
dir('_tests') {
// deleteDir()
sh '${WORKSPACE}/build/bin/libtbx.run_tests_parallel nproc=3 module=libtbx module=scitbx module=cctbx module=iotbx module=rstbx module=dxtbx module=dials module=xia2 output_junit_xml=True || true'
junit 'output.xml'
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment