From the course: Learning Jenkins
Unlock the full course today
Join today to access over 24,600 courses taught by industry experts.
Boolean parameters - Jenkins Tutorial
From the course: Learning Jenkins
Boolean parameters
- [Instructor] Let's configure a job that uses a boolean and parameter. I have a new freestyle job ready for this demo and I'll check the box next to this job is parameterized. And then I'll select add parameter, boolean parameter. I'll give it the name RUN_TESTS. This will add a checkbox parameter to the build interface. If the check box is activated, then the run test environment variable will be set to true. If it's not activated, the variable will be set to false. For boolean parameters the default value lets us pick which value is the default. If the box is checked, then the default will be set to true. If it's unchecked, it will be set to false. In this case, I'll leave the box unchecked so the default will be false. For the description, I'll add, check this box if you want to run tests. Now let's add a build step that uses this parameter. So I'll go to the build section, add build step and select execute shell.…