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