Changes in Jenkinsfile [27474a7:6bde81d]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Jenkinsfile
r27474a7 r6bde81d 277 277 //Use the current directory as the installation target so nothing escapes the sandbox 278 278 //Also specify the compiler by hand 279 sh "${srcdir}/configure CXX=${compiler.cpp_cc} ${architecture} --with-backend-compiler=${compiler.cfa_cc} --enable-silent-rules --quiet" 279 targets="" 280 if(do_alltests) { 281 targets="--with-target-hosts='host:debug,host:nodebug'" 282 } else { 283 targets="--with-target-hosts='host:debug'" 284 } 285 286 sh "${srcdir}/configure CXX=${compiler.cpp_cc} ${architecture} ${targets} --with-backend-compiler=${compiler.cfa_cc} --quiet" 280 287 281 288 //Compile the project … … 291 298 //Run the tests from the tests directory 292 299 if ( do_alltests ) { 293 sh 'make --no-print-directory -C src/tests all-tests debug=yes'294 sh 'make --no-print-directory -C src/tests all-tests debug=no '300 sh 'make --no-print-directory -C tests all-tests debug=yes' 301 sh 'make --no-print-directory -C tests all-tests debug=no ' 295 302 } 296 303 else { 297 sh 'make --no-print-directory -C src/tests'304 sh 'make --no-print-directory -C tests' 298 305 } 299 306 } … … 308 315 dir (builddir) { 309 316 //Append bench results 310 sh "make --no-print-directory -C src/benchmark jenkins githash=${gitRefNewValue} arch=${arch_name} | tee ${srcdir}/bench.json"317 sh "make --no-print-directory -C benchmark jenkins githash=${gitRefNewValue} arch=${arch_name} | tee ${srcdir}/bench.json" 311 318 } 312 319 } … … 341 348 //Routine responsible of sending the email notification once the build is completed 342 349 //=========================================================================================================== 350 def gitBranchUpdate(String gitRefOldValue, String gitRefNewValue) { 351 def update = "" 352 sh "git rev-list ${gitRefOldValue}..${gitRefNewValue} > GIT_LOG"; 353 readFile('GIT_LOG').eachLine { rev -> 354 sh "git cat-file -t ${rev} > GIT_TYPE" 355 def type = readFile('GIT_TYPE') 356 357 update += " via ${rev} (${type})\n" 358 } 359 def rev = gitRefOldValue 360 sh "git cat-file -t ${rev} > GIT_TYPE" 361 def type = readFile('GIT_TYPE') 362 363 update += " from ${rev} (${type})\n" 364 return update 365 366 def output=readFile('result').trim() 367 echo "output=$output"; 368 } 369 343 370 //Standard build email notification 344 371 def email(String status, boolean log, boolean bIsSandbox) { … … 349 376 def gitLog = 'Error retrieving git logs' 350 377 def gitDiff = 'Error retrieving git diff' 378 def gitUpdate = 'Error retrieving update' 351 379 352 380 try { 381 gitUpdate = gitBranchUpdate(gitRefOldValue, gitRefNewValue) 353 382 354 383 sh "git rev-list --format=short ${gitRefOldValue}...${gitRefNewValue} > GIT_LOG" … … 358 387 gitDiff = readFile('GIT_DIFF') 359 388 } 360 catch (Exception error) {} 389 catch (Exception error) { 390 echo error.toString() 391 echo error.getMessage() 392 } 361 393 362 394 def email_subject = "[${project_name} git][BUILD# ${env.BUILD_NUMBER} - ${status}] - branch ${env.BRANCH_NAME}" … … 367 399 368 400 The branch ${env.BRANCH_NAME} has been updated. 369 via ${gitRefOldValue} (commit) 370 from ${gitRefNewValue} (commit) 401 ${gitUpdate} 371 402 372 403 Check console output at ${env.BUILD_URL} to view the results.
Note: See TracChangeset
for help on using the changeset viewer.