Changeset 620dd2b for Jenkinsfile
- Timestamp:
- May 8, 2017, 11:43:27 AM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, 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:
- f408e1a
- Parents:
- 7c0ef42
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Jenkinsfile
r7c0ef42 r620dd2b 97 97 //parse git logs to find what changed 98 98 gitRefName = env.BRANCH_NAME 99 // dir("../${gitRefName}@script") {100 99 sh "git reflog > ${out_dir}/GIT_COMMIT" 101 // }102 100 git_reflog = readFile("${out_dir}/GIT_COMMIT") 103 101 gitRefOldValue = (git_reflog =~ /moving from (.+) to (.+)/)[0][1] … … 172 170 } 173 171 174 def build_stage(String name ) {172 def build_stage(String name, Closure block ) { 175 173 stage_name = name 176 stage name174 stage(name, block) 177 175 } 178 176 … … 247 245 //Compilation script is done here but environnement set-up and error handling is done in main loop 248 246 def checkout() { 249 build_stage 'Checkout'247 build_stage('Checkout') { 250 248 //checkout the source code and clean the repo 251 249 checkout scm … … 256 254 //Reset the git repo so no local changes persist 257 255 sh 'git reset --hard' 256 } 258 257 } 259 258 260 259 def build() { 261 build_stage 'Build'260 build_stage('Build') { 262 261 263 262 def install_dir = pwd tmp: true … … 271 270 //Compile the project 272 271 sh 'make -j 8 --no-print-directory V=0 install' 272 } 273 273 } 274 274 275 275 def test() { 276 build_stage 'Test'276 build_stage('Test') { 277 277 278 278 //Run the tests from the tests directory … … 284 284 sh 'make -C src/tests' 285 285 } 286 } 286 287 } 287 288 288 289 def benchmark() { 289 build_stage 'Benchmark'290 build_stage('Benchmark') { 290 291 291 292 if( !do_benchmark ) return … … 296 297 //Append bench results 297 298 sh 'make -C src/benchmark --no-print-directory csv-data >> bench.csv' 299 } 298 300 } 299 301 300 302 def clean() { 301 build_stage 'Cleanup'303 build_stage('Cleanup') { 302 304 303 305 //do a maintainer-clean to make sure we need to remake from scratch 304 306 sh 'make maintainer-clean > /dev/null' 307 } 305 308 } 306 309 307 310 def build_doc() { 308 build_stage 'Documentation'311 build_stage('Documentation') { 309 312 310 313 if( !do_doc ) return … … 317 320 make_doc() 318 321 } 322 } 319 323 } 320 324 321 325 def publish() { 322 build_stage 'Publish'326 build_stage('Publish') { 323 327 324 328 if( !do_publish ) return … … 326 330 //Then publish the results 327 331 sh 'curl --silent --data @bench.csv http://plg2:8082/jenkins/publish > /dev/null || true' 332 } 328 333 } 329 334
Note: See TracChangeset
for help on using the changeset viewer.