1.1 KiB
1.1 KiB
Exercise 2
In this exercise, you will create a new freestyle job and configure it to build with parameters. You'll also have a look at the Jenkins home directory to inspect the directory structure representing the job.
Defining, Configuring and Organizing a Job
- From the dashboard, click the "New Item" button.
- Enter the item name
my-freestyle-joband select "Freestyle project". Press the "OK" button. - In the job configuration, define the option to only keep the last 2 builds. Provide the description "A simple freestyle job". Upon building the project, a String parameter named
MESSAGEshould be provided. Press the "Save" button. - Trigger a new build by pressing the "Build with Parameters" button. Enter a value for the
MESSAGEparameter. The build should finish successfully. Locate the provided parameter value in the build information. - Run the build two more times. What do you see?
- Create a new view named
test. Add the job to the view. - Create a new folder named
freestyleas part of the view. Move the job into the folder. - Locate the build information in
$JENKINS_HOME. Inspect the directory structure.