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.
Solution: Develop a parameterized pipeline - Jenkins Tutorial
From the course: Intermediate Jenkins: Automate, Integrate, and Secure CI/CD Workflows at Scale
Solution: Develop a parameterized pipeline
I hope you're as excited as I am for this challenge. In this challenge we're being asked to update an existing Jenkins pipeline so that it accepts parameters and behaves differently based on user input. For this challenge we needed to add three parameters. A choice parameter for environments with development, staging, and production as the options. A password parameter for an API key. And then a text parameter for a changelog. With these parameters in place, we were tasked to use them throughout the rest of the pipeline configuration. In the deploy stage, we needed to use a win block, and then inside the win block, an expression that evaluated to true, checking for the environment parameter to see if it equaled to production. If it was equal to production, then the stage would proceed and deploy the project. And then in the report stage, we needed to use the changelog parameter to capture the content of that text parameter, all the changelog information there, and then redirect that…
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
-
-
-
-
-
-