From the course: Intermediate Jenkins: Automate, Integrate, and Secure CI/CD Workflows at Scale
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
Parameterize a pipeline - Jenkins Tutorial
From the course: Intermediate Jenkins: Automate, Integrate, and Secure CI/CD Workflows at Scale
Parameterize a pipeline
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. For pipelines, there are five different types of parameters we can use. strings, blocks of text, booleans, choices, and passwords. Each parameter definition must include a name, a default value, and a description that explains the type of value that should be entered. Following best practices, parameter names are assigned using all capital letters so they can be easily identified in code. String parameters are best used for single word values. Text parameters are useful if you need to pass in a long block of text that contains multiple lines. Both string and text parameters allow users to enter freeform text when the pipeline is triggered from the Jenkins interface. Boolean parameters let us pass in true or false values and are…
Contents
-
-
-
Create a pipeline project1m 10s
-
(Locked)
Use build steps in a pipeline2m 53s
-
(Locked)
Use the pipeline snippet generator2m 13s
-
(Locked)
Use variables in a pipeline2m 54s
-
(Locked)
Parameterize a pipeline4m 9s
-
(Locked)
Use conditional expressions and manual approvals3m 14s
-
(Locked)
Solution: Develop a parameterized pipeline2m 44s
-
-
-
-
-
-