Changeset 298581c for Jenkinsfile
- Timestamp:
- May 9, 2017, 1:56:38 PM (6 years ago)
- Branches:
- aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 6182039
- Parents:
- c10ee66 (diff), f408e1a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Jenkinsfile
rc10ee66 r298581c 28 28 wrap([$class: 'TimestamperBuildWrapper']) { 29 29 30 //Prevent the build from exceeding 60 minutes 31 timeout(60) { 32 33 notify_server() 34 35 prepare_build() 36 37 checkout() 38 39 build() 40 41 test() 42 43 benchmark() 44 45 clean() 46 47 build_doc() 48 49 publish() 50 51 notify_server() 52 } 30 notify_server() 31 32 prepare_build() 33 34 checkout() 35 36 build() 37 38 test() 39 40 benchmark() 41 42 clean() 43 44 build_doc() 45 46 publish() 47 48 notify_server() 53 49 } 54 50 } … … 89 85 def collect_git_info() { 90 86 87 checkout scm 88 91 89 //create the temporary output directory in case it doesn't already exist 92 90 def out_dir = pwd tmp: true … … 95 93 //parse git logs to find what changed 96 94 gitRefName = env.BRANCH_NAME 97 dir("../${gitRefName}@script") { 98 sh "git reflog > ${out_dir}/GIT_COMMIT" 99 } 95 sh "git reflog > ${out_dir}/GIT_COMMIT" 100 96 git_reflog = readFile("${out_dir}/GIT_COMMIT") 101 97 gitRefOldValue = (git_reflog =~ /moving from (.+) to (.+)/)[0][1] … … 170 166 } 171 167 172 def build_stage(String name ) {168 def build_stage(String name, Closure block ) { 173 169 stage_name = name 174 stage name170 stage(name, block) 175 171 } 176 172 … … 245 241 //Compilation script is done here but environnement set-up and error handling is done in main loop 246 242 def checkout() { 247 build_stage 'Checkout'243 build_stage('Checkout') { 248 244 //checkout the source code and clean the repo 249 245 checkout scm … … 254 250 //Reset the git repo so no local changes persist 255 251 sh 'git reset --hard' 252 } 256 253 } 257 254 258 255 def build() { 259 build_stage 'Build'256 build_stage('Build') { 260 257 261 258 def install_dir = pwd tmp: true … … 269 266 //Compile the project 270 267 sh 'make -j 8 --no-print-directory V=0 install' 268 } 271 269 } 272 270 273 271 def test() { 274 build_stage 'Test'272 build_stage('Test') { 275 273 276 274 //Run the tests from the tests directory … … 282 280 sh 'make -C src/tests' 283 281 } 282 } 284 283 } 285 284 286 285 def benchmark() { 287 build_stage 'Benchmark'286 build_stage('Benchmark') { 288 287 289 288 if( !do_benchmark ) return … … 294 293 //Append bench results 295 294 sh 'make -C src/benchmark --no-print-directory csv-data >> bench.csv' 295 } 296 296 } 297 297 298 298 def clean() { 299 build_stage 'Cleanup'299 build_stage('Cleanup') { 300 300 301 301 //do a maintainer-clean to make sure we need to remake from scratch 302 302 sh 'make maintainer-clean > /dev/null' 303 } 303 304 } 304 305 305 306 def build_doc() { 306 build_stage 'Documentation'307 build_stage('Documentation') { 307 308 308 309 if( !do_doc ) return … … 315 316 make_doc() 316 317 } 318 } 317 319 } 318 320 319 321 def publish() { 320 build_stage 'Publish'322 build_stage('Publish') { 321 323 322 324 if( !do_publish ) return … … 324 326 //Then publish the results 325 327 sh 'curl --silent --data @bench.csv http://plg2:8082/jenkins/publish > /dev/null || true' 328 } 326 329 } 327 330
Note: See TracChangeset
for help on using the changeset viewer.