pipelines
✅ any — free agent/slave
pipeline {
agent any
stages {
stage('Hello') {
steps {
echo 'Hello World'
sh 'mkdir abc'
sh 'ls -lart'
sh 'pwd'
}
}
}
}✅ none — schedule stages on different agents
pipeline {
agent none
stages {
stage('Hello') {
agent any
steps {
echo 'Hello World'
// sh 'mkdir abc'
sh 'ls -lart'
sh 'pwd'
}
}
stage('Hello1') {
agent any
steps {
echo 'Hello World'
// sh 'mkdir abc'
sh 'ls -lart'
sh 'pwd'
}
}
}
}✅ label — specific agent
✅ docker — run inside container
✅ pipeline with environment block
✅ pipeline with options (retry, buildDiscarder, timeout, timestamps)
✅ parallel stages with try/catch and dir
dir✅ trigger other jobs using build()
build()