Changes in Jenkinsfile [05c34c3:84917e2]
- File:
-
- 1 edited
-
Jenkinsfile (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Jenkinsfile
r05c34c3 r84917e2 2 2 3 3 import groovy.transform.Field 4 5 // For skipping stages6 import org.jenkinsci.plugins.pipeline.modeldefinition.Utils7 4 8 5 //=========================================================================================================== … … 85 82 //=========================================================================================================== 86 83 def clean() { 87 build_stage('Cleanup' , true) {84 build_stage('Cleanup') { 88 85 // clean the build by wipping the build directory 89 86 dir(BuildDir) { … … 95 92 //Compilation script is done here but environnement set-up and error handling is done in main loop 96 93 def checkout() { 97 build_stage('Checkout' , true) {94 build_stage('Checkout') { 98 95 //checkout the source code and clean the repo 99 96 final scmVars = checkout scm … … 106 103 107 104 def build() { 108 build_stage('Build' , true) {105 build_stage('Build') { 109 106 // Build outside of the src tree to ease cleaning 110 107 dir (BuildDir) { … … 128 125 129 126 def test() { 130 build_stage('Test: short', !Settings.RunAllTests) { 127 build_stage('Test') { 128 131 129 dir (BuildDir) { 132 130 //Run the tests from the tests directory 133 sh 'make --no-print-directory -C tests' 134 } 135 } 136 137 build_stage('Test: full', Settings.RunAllTests) { 138 dir (BuildDir) { 139 //Run the tests from the tests directory 140 sh 'make --no-print-directory -C tests timeouts="--timeout=600 --global-timeout=14400" all-tests debug=yes' 141 sh 'make --no-print-directory -C tests timeouts="--timeout=600 --global-timeout=14400" all-tests debug=no ' 131 if ( Settings.RunAllTests ) { 132 sh 'make --no-print-directory -C tests timeouts="--timeout=1200" all-tests debug=yes' 133 sh 'make --no-print-directory -C tests timeouts="--timeout=1200" all-tests debug=no ' 134 } 135 else { 136 sh 'make --no-print-directory -C tests' 137 } 142 138 } 143 139 } … … 145 141 146 142 def benchmark() { 147 build_stage('Benchmark', Settings.RunBenchmark) { 143 build_stage('Benchmark') { 144 145 if( !Settings.RunBenchmark ) return 146 148 147 dir (BuildDir) { 149 148 //Append bench results … … 154 153 155 154 def build_doc() { 156 build_stage('Documentation', Settings.BuildDocumentation) { 155 build_stage('Documentation') { 156 157 if( !Settings.BuildDocumentation ) return 158 157 159 dir ('doc/user') { 158 160 make_doc() … … 166 168 167 169 def publish() { 168 build_stage('Publish' , true) {170 build_stage('Publish') { 169 171 170 172 if( Settings.Publish && !Settings.RunBenchmark ) { echo 'No results to publish!!!' } … … 410 412 } 411 413 412 def build_stage(String name, boolean run,Closure block ) {414 def build_stage(String name, Closure block ) { 413 415 StageName = name 414 416 echo " -------- ${StageName} -------- " 415 if(run) { 416 stage(name, block) 417 } else { 418 stage(name) { Utils.markStageSkippedForConditional(STAGE_NAME) } 419 } 417 stage(name, block) 420 418 } 421 419
Note:
See TracChangeset
for help on using the changeset viewer.