Skip to content

Declarative Syntax

This section covers every block available in a declarative Jenkinsfile. Each page explains one concept with practical examples.


Topics

Page What You Will Learn
Pipeline, Agent & Options Top-level structure, agent types, timeout, retry
Stages & Steps Defining stages, shell commands, built-in steps
Post, Triggers & Tools Cleanup actions, build triggers, tool installation

Structure Overview

pipeline {
    agent { ... }
    options { ... }
    environment { ... }
    triggers { ... }
    stages {
        stage('Name') {
            when { ... }
            steps { ... }
        }
    }
    post { ... }
}

Every keyword above has its own rules. The following pages explain each one in detail.


See also