123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- #!groovy
- // StarPU --- Runtime system for heterogeneous multicore architectures.
- //
- // Copyright (C) 2018 CNRS
- //
- // StarPU is free software; you can redistribute it and/or modify
- // it under the terms of the GNU Lesser General Public License as published by
- // the Free Software Foundation; either version 2.1 of the License, or (at
- // your option) any later version.
- //
- // StarPU is distributed in the hope that it will be useful, but
- // WITHOUT ANY WARRANTY; without even the implied warranty of
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- //
- // See the GNU Lesser General Public License in COPYING.LGPL for more details.
- //
- def statusHasChanged = false
- pipeline
- {
- agent none
- // Trigger the build
- triggers
- {
- // Poll gforge explicitly every hour
- pollSCM('00 * * * *')
- }
- stages
- {
- stage('Tarball')
- {
- steps
- {
- node('autotools')
- {
- checkout scm
- sh 'contrib/ci.inria.fr/job-0-tarball.sh'
- script
- {
- env.tarballgz = sh (script: 'ls *.tar.gz', returnStdout: true).trim()
- }
- stash includes: "${env.tarballgz}", name: 'tarballgz'
- stash includes: "starpu.pdf", name: 'doc'
- stash includes: "starpu_dev.pdf", name: 'doc_dev'
- // Stash those scripts because they are not in make dist
- dir('contrib/ci.inria.fr')
- {
- stash includes: "job-1-check-windows.sh", name: 'script-windows-check'
- }
- archiveArtifacts artifacts: "${env.tarballgz},starpu.pdf,starpu_dev.pdf", fingerprint: true, onlyIfSuccessful: true
- deleteDir()
- }
- }
- }
- stage('Check')
- {
- steps
- {
- script
- {
- labelToSelect = 'windows'
- listOfNodeNames = jenkins.model.Jenkins.instance.nodes.collect
- {
- node -> node.getLabelString().contains(labelToSelect) ? node.name : null
- }
- listOfNodeNames.removeAll(Collections.singleton(null))
- def p = listOfNodeNames.collectEntries
- {
- [ (it):
- {
- node(it)
- {
- dir('check-windows')
- {
- unstash 'tarballgz'
- unstash 'script-windows-check'
- sh 'sh ./job-1-check-windows.sh'
- deleteDir()
- }
- }
- }
- ]}
- parallel p;
- }
- }
- }
- }
- // post
- // {
- // // hooks are called in order: always, changed, aborted, failure, success, unstable
- // changed
- // {
- // echo "Build status has changed."
- // script
- // {
- //
- // statusHasChanged = true
- // }
- // }
- // success
- // {
- // echo "Build success."
- // // email when changed to success
- // script
- // {
- // if (statusHasChanged)
- // {
- // emailext(body: '${DEFAULT_CONTENT}',
- // subject: '${DEFAULT_SUBJECT}',
- // replyTo: '$DEFAULT_REPLYTO',
- // to: '$DEFAULT_RECIPIENTS',
- // recipientProviders: [[$class: 'CulpritsRecipientProvider'],[$class: 'RequesterRecipientProvider']])
- // }
- // }
- // }
- // failure
- // {
- // echo "Build failure."
- // // always email on failure
- // emailext(body: '${DEFAULT_CONTENT}',
- // subject: '${DEFAULT_SUBJECT}',
- // replyTo: '$DEFAULT_REPLYTO',
- // to: '$DEFAULT_RECIPIENTS',
- // recipientProviders: [[$class: 'CulpritsRecipientProvider'],[$class: 'RequesterRecipientProvider']])
- // }
- // }
- }
|