Jenkins Pipeline Syntax: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 7: Line 7:


* [[Jenkins_Concepts#Pipeline|Jenkins Concpets]]
* [[Jenkins_Concepts#Pipeline|Jenkins Concpets]]
=Scripted Pipeline=
node {
    stage('Build') {
        // ...
    }
    stage('Test') {
        // ...
    }
    stage('Deploy') {
        // ...
    }
=Declarative Pipeline=


=Overview=
=Overview=

Revision as of 18:49, 25 October 2019

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