Skip to content
Snippets Groups Projects

#3504083 Convert workflow: into re-usable reference

Merged #3504083 Convert workflow: into re-usable reference
All threads resolved!
All threads resolved!
Files
2
@@ -29,7 +29,7 @@ composer (previous major):
PHP_VERSION: 8.1
```
Variables can be defined in the project's `.gitlab-ci.yml` as above, or in the pipeline UI form when setting scheduled pipelines or running a pipeline manually. Form fields will override the values defined in the file or derived in the gitlab templates processing. This [variable precedence hierarchy](https://docs.gitlab.com/ee/ci/variables/index.html#cicd-variable-precedence) page has the full details.
Variables can be defined in the project's `.gitlab-ci.yml` as above, or in the pipeline UI form when setting scheduled pipelines or running a pipeline manually. Form fields will override the values defined in the file or derived in the gitlab templates processing. This [variable precedence hierarchy](https://docs.gitlab.com/ee/ci/variables/index.html#cicd-variable-precedence) page has the full details.
## Jobs
@@ -107,3 +107,16 @@ The name of the project being tested is derived from the `*.info.yml` file in th
variables:
PROJECT_NAME: 'my_project'
```
## Workflow
The [workflow](https://docs.gitlab.com/ee/ci/yaml/workflow.html) of a repository defines when pipelines will be run. Various events, such as creating a Merge Request, committing to the default branch or submitting via the pipeline UI can be used in combinations of rules, and if any of the conditions are true then the pipeline will be run. Gitlab Templates defines a [default workflow](https://git.drupalcode.org/project/gitlab_templates/-/blob/main/includes/include.drupalci.workflows.yml) which in most cases will be exactly what your project needs. However, if you do need to extend this default workflow, you can use the following:
```
workflow:
rules:
- !reference [ .default-workflow ]
- {add your extra rule here}
- {and another}
```
Using this syntax avoids duplicating the entire default workflow, and ensures your project will get any updates or improvements made to the standard workflow.
Loading