From the course: Learning Jenkins: Automating Software Development and System Administration
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Pipeline as code - Jenkins Tutorial
From the course: Learning Jenkins: Automating Software Development and System Administration
Pipeline as code
- [Instructor] So far, we've been manually configuring our jobs in the console, but Jenkins also allows us to configure jobs as code. These types of jobs are called pipelines. A pipeline is written into a text file called a Jenkinsfile. Because the Jenkinsfile is a text file, it can be stored in a repo, along with other code or configuration used in a project. Pipelines can configure almost all aspects of a Jenkins job. In particular, pipelines contain build steps, post-build actions, and other settings that we might enter manually in a freestyle job configuration. In a pipeline definition, stages represent the sections of the pipeline. For example, a pipeline might have three stages called Test, Build, and Deploy. These stages describe and manage the flow of the code through the pipeline. Inside each stage are steps. Steps are the instructions Jenkins follows to complete each stage, like checking out code, running tests, compiling code, or archiving artifacts. By breaking the…