Changeset 7b2a786 for Jenkinsfile


Ignore:
Timestamp:
Dec 3, 2020, 8:56:53 PM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
1de50a9, 34dcc78c
Parents:
a5a67ab8 (diff), d29a394 (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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Jenkinsfile

    ra5a67ab8 r7b2a786  
    22
    33import groovy.transform.Field
    4 
    5 // For skipping stages
    6 import org.jenkinsci.plugins.pipeline.modeldefinition.Utils
    74
    85//===========================================================================================================
     
    1512        SrcDir    = pwd tmp: false
    1613        Settings  = null
    17         StageName = ''
     14        Tools     = null
    1815
    1916        // Local variables
     
    6663
    6764                //Store the result of the build log
    68                 currentBuild.result = "${StageName} FAILURE".trim()
     65                currentBuild.result = "${tools.StageName} FAILURE".trim()
    6966        }
    7067
     
    8582//===========================================================================================================
    8683def clean() {
    87         build_stage('Cleanup', true) {
     84        Tools.BuildStage('Cleanup', true) {
    8885                // clean the build by wipping the build directory
    8986                dir(BuildDir) {
     
    9592//Compilation script is done here but environnement set-up and error handling is done in main loop
    9693def checkout() {
    97         build_stage('Checkout', true) {
     94        Tools.BuildStage('Checkout', true) {
    9895                //checkout the source code and clean the repo
    9996                final scmVars = checkout scm
     
    108105        debug = true
    109106        release = Settings.RunAllTests || Settings.RunBenchmark
    110         build_stage('Build : configure', true) {
     107        Tools.BuildStage('Build : configure', true) {
    111108                // Configure must be run inside the tree
    112109                dir (SrcDir) {
     
    136133        }
    137134
    138         build_stage('Build : cfa-cpp', true) {
     135        Tools.BuildStage('Build : cfa-cpp', true) {
    139136                // Build outside of the src tree to ease cleaning
    140137                dir (BuildDir) {
     
    147144        }
    148145
    149         build_stage('Build : libcfa(debug)', debug) {
     146        Tools.BuildStage('Build : libcfa(debug)', debug) {
    150147                // Build outside of the src tree to ease cleaning
    151148                dir (BuildDir) {
     
    154151        }
    155152
    156         build_stage('Build : libcfa(nodebug)', release) {
     153        Tools.BuildStage('Build : libcfa(nodebug)', release) {
    157154                // Build outside of the src tree to ease cleaning
    158155                dir (BuildDir) {
     
    161158        }
    162159
    163         build_stage('Build : install', true) {
     160        Tools.BuildStage('Build : install', true) {
    164161                // Build outside of the src tree to ease cleaning
    165162                dir (BuildDir) {
     
    171168def test() {
    172169        try {
    173                 build_stage('Test: short', !Settings.RunAllTests) {
     170                Tools.BuildStage('Test: short', !Settings.RunAllTests) {
    174171                        dir (BuildDir) {
    175172                                //Run the tests from the tests directory
     
    178175                }
    179176
    180                 build_stage('Test: full', Settings.RunAllTests) {
     177                Tools.BuildStage('Test: full', Settings.RunAllTests) {
    181178                        dir (BuildDir) {
    182179                                        //Run the tests from the tests directory
     
    196193
    197194def benchmark() {
    198         build_stage('Benchmark', Settings.RunBenchmark) {
     195        Tools.BuildStage('Benchmark', Settings.RunBenchmark) {
    199196                dir (BuildDir) {
    200197                        //Append bench results
     
    205202
    206203def build_doc() {
    207         build_stage('Documentation', Settings.BuildDocumentation) {
     204        Tools.BuildStage('Documentation', Settings.BuildDocumentation) {
    208205                dir ('doc/user') {
    209206                        make_doc()
     
    217214
    218215def publish() {
    219         build_stage('Publish', true) {
     216        Tools.BuildStage('Publish', true) {
    220217
    221218                if( Settings.Publish && !Settings.RunBenchmark ) { echo 'No results to publish!!!' }
     
    506503                ]])
    507504
    508         // It's unfortunate but it looks like we need to checkout the entire repo just to get the pretty git printer
     505        // It's unfortunate but it looks like we need to checkout the entire repo just to get
     506        // - the pretty git printer
     507        // - Jenkins.tools
    509508        checkout scm
     509
     510        Tools = load "Jenkins/tools.groovy"
    510511
    511512        final settings = new BuildSettings(params, env.BRANCH_NAME)
     
    515516
    516517        return settings
    517 }
    518 
    519 def build_stage(String name, boolean run, Closure block ) {
    520         StageName = name
    521         echo " -------- ${StageName} -------- "
    522         if(run) {
    523                 stage(name, block)
    524         } else {
    525                 stage(name) { Utils.markStageSkippedForConditional(STAGE_NAME) }
    526         }
    527518}
    528519
Note: See TracChangeset for help on using the changeset viewer.