Throughout this module you have modified the orders-api Jenkinsfile many times, and every change has followed the same cycle: edit, commit, push, start the build, wait for Maven to compile and test, and read the console. When the problem was a missing brace or a misspelled parameter, you waited minutes to discover a one-second mistake, and you left commits like "fix typo" or "test 3" in the Git history. In this lesson you will learn to work like a professional pipeline developer: validate the Jenkinsfile before pushing it with the linter, try out changes without committing using Replay, rerun only the part that failed with Restart from Stage, generate the correct syntax with the Snippet Generator and the Declarative Directive Generator, look things up in the built-in documentation and diagnose builds that fail or hang. You will finish by understanding sandbox errors and script approval, one of the most delicate security decisions in Jenkins.

The Pipeline Development Cycle and How to Shorten It

This is the "slow" cycle you have followed so far, with the tools from this lesson fitted into it:

flowchart LR
    A["Edit<br/>Jenkinsfile"] --> L{"Linter<br/>(seconds)"}
    L -->|"errors"| A
    L -->|"valid"| B["commit + push"]
    B --> C["Full build<br/>(minutes)"]
    C --> D{"Does it work?"}
    D -->|"yes"| E["Done"]
    D -->|"no"| R["Replay or<br/>Restart from Stage"]
    R --> D
    R -->|"fix found"| A
Tool What it saves you When to use it
Linter A whole build just to discover a syntax error Before every commit of the Jenkinsfile
Snippet / Directive Generator Hunting for the exact syntax in the documentation When using a new step or directive
Replay Test commits in the repository When experimenting or debugging on an existing build
Restart from Stage Repeating stages that already worked When a late stage fails for an external reason

Replay: Trying Out Changes Without Committing

Replay lets you run a build again with a modified version of the Jenkinsfile, edited directly in the browser, without touching the repository.

  1. Open a finished build of orders-api-pipeline (for example, the latest one).
  2. In the side menu, click Replay.
  3. Jenkins shows a Main Script editor with the exact Jenkinsfile that build used.
  4. Modify it. For example, in Package, add this before archiveArtifacts:
                sh 'ls -lh target/'
  1. Click Run. A new build starts, and its console begins by indicating that it is a replay:
Started by user Laura Martin
Replayed #23
...

How it works and what its limitations are:

  • The replayed build uses the same parameters and the same code revision as the original build. That makes it ideal for debugging: only what you change in the editor changes.
  • The change is not saved anywhere: if it works, you have to carry it over to the Jenkinsfile yourself, commit and push. If you do not, the next normal build will go back to the version in the repository.
  • You can only use it if you have the corresponding permission on the job (in your installation, as an administrator, Laura has it).
  • Do not change parameters, triggers or options in a Replay: they are applied to the job configuration as if they came from the repository, and the job would be out of sync with the Jenkinsfile until the next normal build.
  • It is a tool for experimenting, not for "fixing production": a change applied only through Replay is neither versioned nor reviewed.

Restart from Stage: Rerunning from a Stage

Imagine that build #24 fails in Package because of a transient problem (for example, the disk filled up for a moment). Repeating the whole build means compiling and testing all over again. Restart from Stage lets you rerun it from the stage of your choice:

  1. Open the finished build and click Restart from Stage in the side menu.
  2. Choose the stage from the drop-down (for example, Package) and click Run.
  3. A new build is created. The earlier stages appear as skipped:
Stage "Build" skipped due to this build restarting at stage "Package"
Stage "Tests" skipped due to this build restarting at stage "Package"

Requirements and caveats:

  • It only works with declarative pipelines; it is one of the advantages you saw in 03-02.
  • The original build must have finished, and you can only restart from top-level stages (not from a nested or parallel stage).
  • It uses the same Jenkinsfile, the same code revision and the same parameters as the original build.
  • Whatever the skipped stages left in the workspace does not exist. In orders-api, moreover, cleanWs() deleted the workspace when the original build finished. Jenkins allocates the agent again and performs the implicit checkout, so the code is there, but target/ is not. That is why restarting from Package works: ./mvnw -B -DskipTests package compiles again whatever it needs. A stage that depends on files generated by earlier stages would fail.
  • To keep files between the original build and the restarted one, there is stash and the preserveStashes() option, which you will see in Pipeline Stages and Steps in Depth.
Replay Restart from Stage
Lets you modify the Jenkinsfile Yes No
Runs all the stages Yes Only from the chosen one
Pipeline type Declarative and scripted Declarative only
Typical use Experimenting and debugging Recovering from a late failure without repeating what came before

Pipeline Syntax: Snippet Generator

On the orders-api-pipeline page, the Pipeline Syntax link (http://localhost:8080/job/orders-api-pipeline/pipeline-syntax/) opens the Snippet Generator: a form that generates the exact line for any step installed in your Jenkins.

Example 1: archiveArtifacts

  1. In Sample Step, choose archiveArtifacts: Archive the artifacts.
  2. In Files to archive, type target/*.jar.
  3. Click Advanced... and check Fingerprint all archived artifacts.
  4. Click Generate Pipeline Script:
archiveArtifacts artifacts: 'target/*.jar', fingerprint: true

It is exactly the line you wrote by hand in 03-03. The generator omits any parameters you leave at their default value, which is why the result is so short.

Example 2: A checkout with Options

Suppose you need to download the repository with Clean before checkout, as the Freestyle job did:

  1. Sample Step: checkout: Check out from version control.
  2. SCM: Git; Repository URL: https://github.com/tecnoshop/orders-api.git; Branch Specifier: */main.
  3. Additional Behaviours → Add → Clean before checkout.
  4. Generate Pipeline Script:
checkout scmGit(branches: [[name: '*/main']], extensions: [cleanBeforeCheckout()], userRemoteConfigs: [[url: 'https://github.com/tecnoshop/orders-api.git']])
  • scmGit(...): describes a Git configuration. In older versions of the Git plugin you will see a longer form, checkout([$class: 'GitSCM', ...]), which does the same thing.
  • extensions: [cleanBeforeCheckout()]: the list of additional behaviors.

Do not add it to the Jenkinsfile: orders-api uses the implicit checkout (03-01). The example shows how useful the generator is for steps with many nested options, whose syntax would be very hard to write from memory.

The generator shows only the steps from the plugins installed in your Jenkins. If an example from the internet uses a step that is not on the list, you are probably missing the plugin.

Declarative Directive Generator

In the Pipeline Syntax side menu you will find Declarative Directive Generator (.../directive-generator/). It works the same way, but it generates complete directives: agent, options, parameters, triggers, when, post, environment, input, tools...

For example, choosing parameters and adding a Choice Parameter named ENVIRONMENT with the three options generates:

parameters {
  choice choices: ['dev', 'staging', 'production'], description: 'Target environment', name: 'ENVIRONMENT'
}

Notice that the style is slightly different from the one you use in the Jenkinsfile (no parentheses, a different argument order, two-space indentation), but it is equivalent: in Groovy, named arguments can go in any order. Adapt the formatting to the file's style before pasting it. It is especially useful for when and post, where there are many possible combinations.

Steps Reference and Global Variable Reference

Also from Pipeline Syntax:

Link URL What it contains
Steps Reference .../pipeline-syntax/html All the steps available in your installation, with all their parameters and a description
Global Variable Reference .../pipeline-syntax/globals The global variables: env, params, currentBuild, scm and any added by plugins
Online Documentation jenkins.io The official syntax documentation

The Global Variable Reference is the most reliable way to find out what you can use:

  • env: lists the environment variables Jenkins defines, such as BUILD_NUMBER, BUILD_URL, JOB_NAME or WORKSPACE.
  • params: explains how to access the parameters (params.ENVIRONMENT).
  • currentBuild: lists its properties: number, result, currentResult, description, displayName, durationString, previousBuild... For example, currentBuild.durationString would give you a text with the duration for a post message.

The key advantage over searching the internet: these pages describe your installation, with your plugin versions.

The Linter: Validating the Jenkinsfile Before Committing

Jenkins includes a validator for declarative pipelines (the linter), available through the REST API and the CLI. It checks the structure, the sections and directives, the step names and their parameters, without running anything.

Prerequisite: An API Token

To use the API from the command line you need an API token, which replaces the password in scripts and tools:

  1. Click your username in the top right corner.
  2. Go to Security (in earlier versions, Configure).
  3. Under API Token, click Add new Token, give it a descriptive name (for example, linter-laptop) and click Generate.
  4. Copy the token right away: Jenkins will not show it again. If you lose it, revoke it and generate another one.

Store it in your session's environment variables, never in a file in the repository:

export JENKINS_URL=http://localhost:8080
export JENKINS_USER_ID=laura
export JENKINS_API_TOKEN=11aa22bb33cc44dd55ee66ff77fake00

The token in the example is fake. Tokens and the REST API in general are covered in Automating Jenkins with the REST API and CLI.

Validating with the REST API

From the root of orders-api:

curl -s -X POST \
  --user "$JENKINS_USER_ID:$JENKINS_API_TOKEN" \
  -F "jenkinsfile=<Jenkinsfile" \
  "$JENKINS_URL/pipeline-model-converter/validate"
  • -X POST: validation is requested with a POST request.
  • --user user:token: authenticates with the API token.
  • -F "jenkinsfile=<Jenkinsfile": sends a form with a jenkinsfile field whose contents are read from the Jenkinsfile file (that is what < means).
  • .../pipeline-model-converter/validate: the API endpoint that validates declarative pipelines.

If everything is fine:

Jenkinsfile successfully validated.

If there are errors (for example, you write option instead of options):

Errors encountered validating Jenkinsfile:
WorkflowScript: 4: Undefined section "option" @ line 4, column 5.
       option {
       ^

About the crumb: Jenkins protects POST requests against CSRF attacks with a value called a crumb. When you authenticate with an API token, as here, you do not need it. You would only need it if you authenticated with a username and password (something you should not do in scripts): in that case, you would first request it from $JENKINS_URL/crumbIssuer/api/json, saving the session cookie with -c cookies.txt, and then send it in a -H "Jenkins-Crumb: <value>" header together with -b cookies.txt.

Validating with the Jenkins CLI

The same validation exists as a CLI command, declarative-linter. The simplest way is to use the jenkins-cli.jar client, which your own Jenkins serves:

curl -sO "$JENKINS_URL/jnlpJars/jenkins-cli.jar"
java -jar jenkins-cli.jar -s "$JENKINS_URL" declarative-linter < Jenkinsfile
  • The first line downloads the client from your Jenkins (you only need to do this once).
  • java -jar jenkins-cli.jar -s <url>: runs the client against your Jenkins. It automatically reads the JENKINS_USER_ID and JENKINS_API_TOKEN variables to authenticate.
  • declarative-linter < Jenkinsfile: the command reads the Jenkinsfile from standard input.

The CLI can also be used over SSH (ssh -l laura -p <port> localhost declarative-linter < Jenkinsfile), but that requires enabling the Jenkins SSH server, publishing its port in docker-compose.yml and registering your public key on your user. The REST API or jenkins-cli.jar is all you need; the CLI is covered in depth in 08-04.

What the Linter Does Not Catch

The linter validates the declarative structure, not the behavior:

  • It does not run the sh commands: a misspelled ./mvnw -B tset will pass validation.
  • It does not check that agent labels, credential IDs or tools installations exist.
  • Inside script blocks, it only detects Groovy syntax errors, not logic errors.

It is a first safety net, fast and cheap, not a substitute for the build.

Editor Integration and a pre-commit Hook

In the Editor

Several editors have extensions that send the file to your Jenkins linter. In Visual Studio Code, for example, the Jenkins Pipeline Linter Connector extension adds a command to validate the open Jenkinsfile: in its settings you enter the URL of your Jenkins linter, the user and the token, and the result appears in the output panel. Check the extension's page for the exact names of its settings, because they can change between versions. Under the hood, it does the same as the curl command above.

A Git pre-commit Hook

A hook is a script that Git runs automatically at certain points. With a pre-commit hook, Git validates the Jenkinsfile before every commit and blocks the commit if it is not valid. Create the file .git/hooks/pre-commit in your copy of orders-api:

#!/usr/bin/env bash
# Validates the Jenkinsfile with the Jenkins linter before every commit.
set -uo pipefail

# Only act if the Jenkinsfile is part of the commit
if ! git diff --cached --name-only | grep -qx 'Jenkinsfile'; then
  exit 0
fi

if [ -z "${JENKINS_URL:-}" ] || [ -z "${JENKINS_USER_ID:-}" ] || [ -z "${JENKINS_API_TOKEN:-}" ]; then
  echo "WARNING: JENKINS_URL, JENKINS_USER_ID or JENKINS_API_TOKEN is not set; skipping Jenkinsfile validation."
  exit 0
fi

# Validate the version staged for the commit (not the one on disk)
if ! RESULT=$(git show :Jenkinsfile | curl -sS --max-time 15 -X POST \
      --user "$JENKINS_USER_ID:$JENKINS_API_TOKEN" \
      -F "jenkinsfile=<-" \
      "$JENKINS_URL/pipeline-model-converter/validate"); then
  echo "WARNING: could not reach Jenkins; skipping Jenkinsfile validation."
  exit 0
fi

echo "$RESULT"
if ! echo "$RESULT" | grep -q "successfully validated"; then
  echo "Commit canceled: fix the Jenkinsfile and try again."
  exit 1
fi

And make it executable:

chmod +x .git/hooks/pre-commit

An explanation of the important parts:

  • git diff --cached --name-only | grep -qx 'Jenkinsfile': lists the files staged for the commit and checks whether the Jenkinsfile is among them. If it is not, the hook ends without doing anything (exit 0 allows the commit).
  • The variable check avoids blocking the commit if they are not configured; it only prints a warning.
  • git show :Jenkinsfile: gets the version of the file staged for the commit (the one in the index), which may differ from the one on disk if you have made changes after git add.
  • -F "jenkinsfile=<-": the - makes curl read the contents from standard input, that is, from the output of git show.
  • --max-time 15: if Jenkins does not respond, it does not wait forever; in that case the hook warns and lets the commit through, so as not to block your work if Jenkins is down.
  • If the response does not contain successfully validated, the hook ends with exit 1 and Git cancels the commit.

Hooks in .git/hooks are not versioned. If the team wants to share this one, they can keep it in a directory of the repository (for example, .githooks/pre-commit) and each person enables it with git config core.hooksPath .githooks.

Debugging Techniques

When a build does not do what you expect, these are your tools, from the simplest to the most advanced.

Printing Values with echo

echo "ENVIRONMENT=${params.ENVIRONMENT} RUN_TESTS=${params.RUN_TESTS} result=${currentBuild.currentResult}"

The simplest technique is still the most useful. Combined with Replay, it lets you inspect values without cluttering the repository.

Seeing All Environment Variables: sh 'env | sort'

sh 'env | sort'
  • env lists the process's environment variables and sort sorts them alphabetically. You will see BUILD_NUMBER, JOB_NAME, WORKSPACE, GIT_COMMIT, the parameters (ENVIRONMENT, RUN_TESTS)... It is the fastest way to check what an sh step actually sees.
  • Be careful using it in pipelines that handle secrets: they would show up in the console if they are not masked (04-04).

Shell Tracing: set -x

As you saw in 03-03, Jenkins runs sh scripts with -x and -e, which is why every command appears in the console preceded by +. But if your script starts with its own #! line (for example, #!/bin/bash to use bash-specific features), those options are not applied, and you should turn them on yourself:

sh '''#!/bin/bash
set -euxo pipefail
JAR=$(ls target/*.jar)
echo "Generated jar: $JAR"
'''
  • #!/bin/bash must go on the first line, right after the quotes.
  • set -euxo pipefail: -e stops at the first error, -u fails if you use an undefined variable, -x prints each command and -o pipefail makes a pipeline fail if any of its commands fails.
  • Conversely, set +x turns tracing off for a section of the script that generates too much noise.

Reading the Console with Timestamper

With options { timestamps() }, already enabled in orders-api, every line has its time. In the console's side menu you can switch the format to Elapsed time (time elapsed since the start), which lets you see at a glance which part of the build is eating up the time: if four minutes go by between two lines, you have found the bottleneck.

The Steps View

In a build's side menu, the Pipeline Steps link shows the list of all the steps that ran, nested by stage, with their status, their duration and a link to the log of each one. In recent installations with Pipeline Graph View, the same information is available by selecting a stage in the graph. It is very useful when a stage contains many steps and you want to know exactly which one failed or which one took so long.

Hung Builds: Thread Dump

If a build has been running much longer than usual without writing anything to the console, open the running build and click Thread Dump in the side menu. It shows the exact point in the Jenkinsfile where the pipeline is stuck (for example, waiting for a particular sh to finish). Common causes of hung builds:

Symptom Likely cause Solution
Stuck in an sh with no output A command is waiting for keyboard input Use non-interactive modes (-B in Maven, -y in installers)
Still waiting to schedule task in the console No node matches the agent Check the label or the free executors
Stuck in an input Waiting for a confirmation Confirm or abort on the build page
Stuck on a connection An external service is not responding timeout on the stage or the step

The global timeout and the one on Tests that you added in 03-04 exist precisely so that these cases do not block an executor indefinitely. Diagnosis at the level of the whole controller (JVM thread dumps) is covered in Common Jenkins Issues.

The Sandbox and Script Approval (In-process Script Approval)

You know from 03-01 and 03-02 that the Jenkinsfile runs in a sandbox that only allows pipeline steps and a list of safe methods. Let's see what happens when a script steps outside that list.

Diego wants to show the system user and writes, inside a script block:

script {
    def user = System.getenv('USER')
    echo "User: ${user}"
}

The build fails with:

org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use staticMethod java.lang.System getenv java.lang.String
	at org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.StaticWhitelist.rejectStaticMethod(...)
	...
Finished: FAILURE

How to read the message:

Part Meaning
RejectedAccessException The sandbox has blocked a call
staticMethod The kind of element: a static method (other kinds: method, new for constructors, field...)
java.lang.System The class
getenv The method
java.lang.String The types of its arguments

In addition, the console includes a link noting that an administrator can approve or reject that signature. Pending signatures appear in Manage Jenkins → In-process Script Approval, with Approve and Deny buttons.

When to Approve and When NOT To

Approving a signature allows it for every script of every user in the installation. Anyone with commit access to any repository built by Jenkins will be able to use it. That is why it is a serious security decision:

Approve (with judgment) Never approve
Harmless text or collection manipulation methods that are not on the list jenkins.model.Jenkins getInstance (full access to Jenkins)
When you understand exactly what the method does and there is no equivalent step java.lang.System getenv (exposes the controller's variables, which may contain secrets)
Any access to java.io.File, processes (Runtime exec, String execute) or the network
Reflection or dynamic code execution (GroovyShell, Class forName...)

Jenkins also flags some signatures as dangerous on the approval page itself. When in doubt, deny and look for the "pipeline" way of doing it. In Diego's case, the right solution does not require approving anything: the build's environment variables are read with env.NAME, and the user that processes run as on the agent is obtained with an sh step:

script {
    def user = sh(script: 'whoami', returnStdout: true).trim()
    echo "User: ${user}"
}

Notice the difference: System.getenv would run on the controller; sh 'whoami' runs on the agent, which is usually what you want to know. If a pipeline genuinely needs capabilities outside the sandbox, the right path is to encapsulate them in a shared library reviewed by the platform team (04-06); the full security model is in Configuring Security.

Unit Testing Pipelines

When pipeline logic grows and is spread across shared libraries, you should test it like any other code. There is a framework, JenkinsPipelineUnit, that lets you run a Jenkinsfile or a library's functions in unit tests, mocking the steps (sh, echo...) without needing a real Jenkins. We will mention it again in Shared Libraries; for a declarative Jenkinsfile like the one in orders-api, the linter and pull request review are enough.

Pipeline Development Checklist

Laura sums up in a list what the TecnoShop team should do when modifying any Jenkinsfile:

  1. Generate, do not invent: use the Snippet Generator and the Declarative Directive Generator for new steps and directives.
  2. Validate before committing: run the linter from the editor, the command line or the pre-commit hook.
  3. Experiment with Replay, not with test commits; once it works, carry the change over to the Jenkinsfile.
  4. One change per commit, with a message that explains the why.
  5. Single quotes by default in sh; double quotes only to interpolate Groovy values, escaping \$.
  6. No complex logic in script { }; if it grows, move it to the shared library.
  7. timeout on the pipeline and on any stage that might hang.
  8. Show the context at the start of the console (parameters, version).
  9. Never approve signatures in In-process Script Approval without understanding the risk; look for the step-based alternative first.
  10. Review every pipeline change in a pull request, like any other code.

Common Mistakes and Tips

  • Forgetting to carry a change tested with Replay over to the repository: the next build goes back to the previous version and the problem "comes back".
  • Using Restart from Stage from a stage that depends on files from earlier stages: the workspace does not have them; it fails with files not found.
  • Writing the API token in a script in the repository: anyone with access to the repository could use it. Use environment variables, and revoke it if it leaks.
  • Thinking "the linter says it is valid" means "it will work": it only validates the structure.
  • #!/bin/bash on the second line of the sh: it is not treated as the interpreter; it must go right after the opening quotes.
  • Approving signatures "just to get by": it opens the door for every script in the installation. Look for the alternative with pipeline steps.
  • Copying examples from the internet without checking the plugins: use the Snippet Generator to confirm the step exists in your installation.
  • Tip: bookmark your job's .../pipeline-syntax/ and .../pipeline-syntax/globals; you will refer to them constantly.

Exercises

Exercise 1. Deliberately introduce two errors into your local copy of the Jenkinsfile: change steps to step in the Build stage and fingerprint to fingerprints in archiveArtifacts. Validate it with curl against the linter without committing. What errors does it show? Fix them and validate again.

Exercise 2. Use Replay on the latest orders-api-pipeline build to add, at the end of Package, a step that prints all the environment variables sorted, and another that shows the build duration so far using currentBuild. Check the output. What would you have to do to keep the change? (Do not keep it.)

Exercise 3. Marta finds this error in the console of a test pipeline: RejectedAccessException: Scripts not permitted to use method java.lang.String execute. The code was def branch = "git rev-parse --abbrev-ref HEAD".execute().text. Explain what it was trying to do, why it must not be approved and how to rewrite it correctly.

Solutions

Solution 1.

curl -s -X POST --user "$JENKINS_USER_ID:$JENKINS_API_TOKEN" \
  -F "jenkinsfile=<Jenkinsfile" "$JENKINS_URL/pipeline-model-converter/validate"

The response starts with Errors encountered validating Jenkinsfile: and lists both problems, each with its line and column: an unknown section in the Build stage (stating that steps must be in a steps block) and an invalid parameter in archiveArtifacts, with the suggestion did you mean "fingerprint"?. The exact text may vary depending on your version. After fixing them, the response is Jenkinsfile successfully validated.. You have caught two errors in a second, with no commit and no build.

Solution 2. In the Replay editor, at the end of the Package steps:

                sh 'env | sort'
                echo "Duration so far: ${currentBuild.durationString}"

The console will show the variables (BUILD_NUMBER, JOB_NAME, WORKSPACE, ENVIRONMENT, RUN_TESTS, GIT_COMMIT...) and a line such as Duration so far: 41 sec and counting. durationString is documented in the Global Variable Reference under currentBuild. To keep the change you would have to copy it into the local Jenkinsfile, validate it, commit and push; the next normal build will not include it, because Replay does not modify the repository.

Solution 3. The code was trying to find out the current branch by running git through Groovy's execute() method, which launches an operating system process. It would run on the controller, not on the agent (so it would not even return the workspace's branch), and approving that signature would let any script in the installation run arbitrary commands on the controller: the highest possible security risk. It must be denied. The right way is to use the sh step, which runs on the agent, inside the workspace:

script {
    def branch = sh(script: 'git rev-parse --abbrev-ref HEAD', returnStdout: true).trim()
    echo "Branch: ${branch}"
}

Keep in mind that, after a Jenkins checkout, the repository is usually in a detached HEAD state and this command would return HEAD; to find out the branch, Jenkins provides environment variables such as GIT_BRANCH, which you will see in Using Environment Variables.

Conclusion

You have closed module 3 with the tools that make pipeline development fast and safe. You validate the Jenkinsfile in seconds with the linter, whether through the REST API and an API token, with jenkins-cli.jar, from the editor or automatically with a pre-commit hook. You experiment without cluttering the repository using Replay, rerun from the stage that failed with Restart from Stage, generate the exact syntax with the Snippet Generator and the Declarative Directive Generator, and look things up in the Steps Reference and the Global Variable Reference of your own installation. You know how to debug with echo, sh 'env | sort', set -x, timestamps, the steps view and Thread Dump, and you know how to read a RejectedAccessException and why approving signatures in In-process Script Approval is a security decision that almost always has a better alternative. With the whole module behind you, orders-api now has a versioned, declarative, parameterized and scheduled Jenkinsfile, with flow control and error handling. In module 4 you will take that pipeline further, starting with a thorough look at how stages are organized and which steps you have at your disposal to move files, reuse results and structure more complex processes, in Pipeline Stages and Steps in Depth.

© Copyright 2026. All rights reserved