Skip to content
Snippets Groups Projects
Commit c8945ed0 authored by Marius Bobin's avatar Marius Bobin Committed by Evan Read
Browse files

Add docs for .pre and .post pipeline stages

parent 645fc7d9
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -318,6 +318,17 @@ There are also two edge cases worth mentioning:
`test` and `deploy` are allowed to be used as job's stage by default.
1. If a job doesn't specify a `stage`, the job is assigned the `test` stage.
 
#### `.pre` and `.post`
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/31441) in GitLab 12.4.
The following stages are available to every pipeline:
- `.pre`, which is guaranteed to always be the first stage in a pipeline.
- `.post`, which is guaranteed to always be the last stage in a pipeline.
User-defined stages are executed after `.pre` and before `.post`.
### `stage`
 
`stage` is defined per-job and relies on [`stages`](#stages) which is defined
Loading
Loading
@@ -330,6 +341,10 @@ stages:
- test
- deploy
 
job 0:
stage: .pre
script: make something useful before build stage
job 1:
stage: build
script: make build dependencies
Loading
Loading
@@ -345,6 +360,10 @@ job 3:
job 4:
stage: deploy
script: make deploy
job 5:
stage: .post
script: make something useful at the end of pipeline
```
 
#### Using your own Runners
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment