Skip to content

Jenkins

Pipelines

Declarative vs. Scripting Pipeline Syntax1

Declarative Pipeline Skeleton

pipeline {
    agent any
    stages {
        stage('Build') {
            steps {
                //
            }
        }
        stage('Test') {
            steps {
                //
            }
        }
        stage('Deploy') {
            steps {
                //
            }
        }
    }
}

Scripting Pipeline Skeleton

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