Jenkins Pipeline Syntax

From NovaOrdis Knowledge Base
Revision as of 18:49, 25 October 2019 by Ovidiu (talk | contribs) (→‎Internal)
Jump to navigation Jump to search

External

Internal


Scripted Pipeline

node {
    stage('Build') {
       // ...
    }
    stage('Test') {
       // ...
    }
    stage('Deploy') {
       // ...
    }

Declarative Pipeline

Overview

node {

    echo 'Pipeline logic starts'

}

Parallel Stages

stage("tests") {

    parallel(

        "unit tests": {

             // run unit tests 
         },
         "coverage tests": {

             // run coverage tests
         }
     )
}

Step Reference