- Caching
- Timestamps
- Concurrent-build protection
- Node.js tool configuration
feature/advanced-demo, which currently has this Declarative Pipeline:
1. Create a New Branch
Create a feature branch to hold your Scripted Pipeline:2. Scripted Pipeline Overview
In Scripted Pipelines, everything is wrapped in a singlenode { … } block. You must configure:
- Tools via
tool - Environment variables
- Job properties (e.g.,
disableConcurrentBuilds) - Checkout
wrapfor timestampscachefor dependency caching
2.1 Configure Node.js Tool
According to the Node.js plugin documentation, setenv.NODEJS_HOME and update PATH:
Use
properties([...]) in Scripted Pipelines to set job-level options like disableConcurrentBuilds instead of the options {} block in Declarative.2.2 Pipeline Options Reference
Consult the Jenkins Pipeline Syntax guide for more options you can apply in Scripted Pipelines under options (e.g.,buildDiscarder, retry, timestamps).

3. Trigger and Verify Builds
After committing and pushing your newJenkinsfile on pipeline/scripted, Jenkins will:
- Run a Checkout stage without timestamps
- Run Installing Dependencies with timestamps
- Miss the cache on the first build (installs packages)
- Store cache for subsequent runs
