Parts of a pipeline – stages, jobs, and commands
That’s the big picture of what a GitLab CI/CD pipeline is – how the CI portion of a pipeline differs from the CD portion of the same pipeline and why pipelines are such an important part of the SDLC. Let’s zoom in a little and take a look at the structure of a pipeline in more detail. In particular, how is a pipeline put together from stages and jobs?
Stages
Every pipeline consists of one or more stages. A stage is a collection of pipeline tasks that are thematically related. For example, these are probably the three most commonly used stages:
- Build: This stage holds tasks that compile and/or package your source code into a deployable format.
- Test: This stage holds tasks that run automated tests, code quality scans and linters, and possibly security scans.
- Deploy: This stage sends your code to the appropriate environment, depending on what Git branch or Git tag the pipeline is running...