#!groovy pipeline { agent none stages { stage('Tarball') { steps { node('autotools') { checkout scm sh 'contrib/ci.inria.fr/job-0-tarball.sh' script { env.tarballgz = sh (script: 'ls build/*.tar.gz', returnStdout: true).trim() } stash includes: "${env.tarballgz}", name: 'tarballgz' stash includes: "starpu.pdf", name: 'doc' // Stash those scripts because they are not in make dist dir('contrib/ci.inria.fr') { stash includes: "job-1-check.sh", name: 'script-unix-check' } archiveArtifacts artifacts: "${env.tarballgz},starpu.pdf", fingerprint: true, onlyIfSuccessful: true } } } stage('Check') { steps { script { labelToSelect = 'unix' 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-unix') { unstash 'tarballgz' unstash 'script-unix-check' sh 'chmod 755 job-1-check.sh && ./job-1-check.sh' deleteDir() } } } ]} parallel p; } } } } }