Jenkins · Declarative pipeline basics

Ask for parameters

Add build parameters, which appear as a form when you run the job.

parameters {
  string(name: 'VERSION', defaultValue: '1.0.0', description: 'Release version')
  booleanParam(name: 'DEPLOY', defaultValue: false)
  choice(name: 'ENV', choices: ['staging', 'production'])
}

Official Jenkins documentation

More declarative pipeline basics commands

All declarative pipeline basics commands · Jenkins cheatsheet

Was this page helpful?