Freestyle projects (a.k.a. jobs, or simply projects) were the original method for which all automated tasks must be defined in Jenkins. A freestyle project is simply a set of user-defined tasks that Jenkins should perform. For example, a project may involve building an application from a Git repository, while another project is used to run tests on this built application.
The terms freestyle project, project, and job are synonymous with each other. The term job is commonly used in the UI of the web interface, but it has been deprecated and we will use the term project in this book.
You can configure a freestyle project using the web interface, which allows you to define the following:
- Source Code Management (SCM): Specifies how Jenkins can obtain the starting source code for it to build/test.
- Build triggers: Specifies when this project should execute. For example, you may want to trigger a build when a new commit is pushed to the repository; or build the project every night at 00:00 to produce the nightly build.
- Build environment.
- Build: Allows you to specify build steps. Despite its name, you can actually run any shell command, such as test runners, as a build step.
- Post-build action: Allows you to specify commands to execute after the build steps have been completed. You can, for instance, send the test results to the system administrator via email. Furthermore, you can use the post-build action to trigger another project to execute. This way, you can form a chain of projects that run one after another.