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