From the course: Jenkins Essential Training

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Parameterize a pipeline

Parameterize a pipeline - Jenkins Tutorial

From the course: Jenkins Essential Training

Parameterize a pipeline

- [Instructor] We've seen how Jenkins lets us use variables in a pipeline. Parameters are another type of variable that get their values at the time the job is triggered. Parameters are defined in a parameters block, which is placed at the beginning of the pipeline code. Much like we've seen with environment variables, parameters are accessed by their name proceeded by the params prefix. And if they're used in a string, they need to have a dollar sign at the beginning and can also be wrapped in curly braces. Each parameter definition must include a name, a default value, and a description that explains the type of value that should be entered. Typically parameter names are assigned using all capital letters, so they can be easily identified in the code. For pipelines, there are five different types of parameters we can use. Strings, blocks of text, booleans, choices, and passwords. String and text…

Contents