From the course: Jenkins Essential Training
Unlock the full course today
Join today to access over 24,000 courses taught by industry experts.
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
-
-
-
-
Create a pipeline project1m 14s
-
(Locked)
Create a declarative pipeline4m 38s
-
(Locked)
Use the pipeline Snippet Generator4m 24s
-
(Locked)
Use variables in a pipeline5m 8s
-
(Locked)
Parameterize a pipeline4m 48s
-
(Locked)
Use conditional expressions and manual approvals4m 31s
-
(Locked)
Challenge: Develop a parameterized pipeline2m 15s
-
(Locked)
Solution: Develop a parameterized pipeline10m 7s
-
-
-
-
-
-