Jenkins · Declarative pipeline basics
Run on a schedule
Trigger builds by cron or by polling the repository. H spreads the load.
triggers {
cron('H 2 * * 1-5')
pollSCM('H/15 * * * *')
}
Official Jenkins documentation
More declarative pipeline basics commands
- A minimal Jenkinsfile
- Run in a Docker container
- Set environment variables
- Set pipeline options
- Ask for parameters
- Run a stage conditionally
All declarative pipeline basics commands · Jenkins cheatsheet