gmkavuna / hands-on-jenkins

Companion code, slides and exercises of the video course Hands-on Continuous Integration and Automation with Jenkins by Packt Publishing
GNU General Public License v3.0
0 stars 0 forks source link

Section 2 Exercises #1

Open gmkavuna opened 2 years ago

gmkavuna commented 2 years ago

Theory

  1. Describe the difference between a job/project and a build.
  2. What is a workspace?
  3. What is a build trigger and how would you use it in a job?
  4. What is a parameterized job and when would you use it?

Practice

In video 2.4 you saw how to pull code from a GitHub repository. Instead of pulling code from this companion GitHub repository, open a GitHub account (if you don't have one already), create a new repository, and upload a shell or a batch script. Then configure a new Jenkins job to pull code from your repository and run the build.

In case you are already familiar with build tools such as ant, maven, or gradle, write a script with these tools and invoke the relevant script when choosing the build step.

gmkavuna commented 2 years ago

A parameterized job accepts a parameter. This makes it possible to generate output that varies based on the input passed in as a parameter. A parameter can be leveraged for instance when we need to toggle between different Jenkins file - for development and non-development environments for instance.

A workspace is a working directory that lodges code, builds, and other temp files during build.

A build trigger is the event that causes a job to execute. This could be a scheduler/cron or a commit on github, etc.