Skip to content
Snippets Groups Projects
Commit 0bb0da34 authored by danielspeicher's avatar danielspeicher
Browse files

Document stages and jobs.

parent 58d7280b
No related branches found
No related tags found
1 merge request!25Develop
...@@ -13,21 +13,21 @@ This project contains a number of pre-configured tasks for GitLab CI/CD that ...@@ -13,21 +13,21 @@ This project contains a number of pre-configured tasks for GitLab CI/CD that
allow to run very powerful pipelines which contain the following stages: allow to run very powerful pipelines which contain the following stages:
- [.pre (predefined)](#pre) - [.pre (predefined)](#pre)
- [validate](#validate)
- [execute](#execute) - [execute](#execute)
- [build (predefined)](#build)
- [buildprod](#build-prod) - [buildprod](#build-prod)
- [build (predefined)](#build)
- [prepare](#prepare) - [prepare](#prepare)
- [postprocess](#postprocess)
- [validate](#validate)
- [test (predefined)](#test) - [test (predefined)](#test)
- [deploy (predefined)](#deploy) - [deploy (predefined)](#deploy)
- release
- finalize - finalize
- postprocess - release
- .post (predefined) - .post (predefined)
We have a predefined `execute` job called `LakeDrops`, which looks like this: We have a predefined `execute` job called `LakeDrops`, which looks like this:
- execute - [execute](#execute)
- LakeDrops - LakeDrops
- [buildprod](#build-prod) - [buildprod](#build-prod)
- [Build Prod Site](#build-prod-site) - [Build Prod Site](#build-prod-site)
...@@ -49,8 +49,8 @@ We have a predefined `execute` job called `LakeDrops`, which looks like this: ...@@ -49,8 +49,8 @@ We have a predefined `execute` job called `LakeDrops`, which looks like this:
- [Test PHPUnit](#test-phpunit) - [Test PHPUnit](#test-phpunit)
- [Test Backstop](#test-backstop) - [Test Backstop](#test-backstop)
- [Test Cypress E2E](#test-cypress-e2e) - [Test Cypress E2E](#test-cypress-e2e)
- finalize - [finalize](#finalize)
- Shut Down Docker Project - [Shut Down Docker Project](#shut-down-docker-project)
These pre-configured tasks can easily be included into your Drupal project. These pre-configured tasks can easily be included into your Drupal project.
A GitLab runner on any host can then be configured to run those pipelines. The A GitLab runner on any host can then be configured to run those pipelines. The
...@@ -163,7 +163,7 @@ responsible for the database downloads as well. ...@@ -163,7 +163,7 @@ responsible for the database downloads as well.
#### Build Site #### Build Site
We start a docker image for php with the specifies versions: We start a docker image for `php` with the specifies versions:
- `PHP_MAJOR_VERSION` - `PHP_MAJOR_VERSION`
- `PHP_MINOR_VERSION` - `PHP_MINOR_VERSION`
...@@ -193,12 +193,63 @@ The following jobs must run before successfully: ...@@ -193,12 +193,63 @@ The following jobs must run before successfully:
- [Build Prod Site](#build-prod-site) - [Build Prod Site](#build-prod-site)
#### Check 4 Updates
#### Check 4 Outdated Packages #### Check 4 Outdated Packages
We start a docker image for `php` with the specifies versions:
- `PHP_MAJOR_VERSION`
- `PHP_MINOR_VERSION`
The following jobs must run before successfully. Some are optional, which means, if they exist, this job waits for them
to complete:
- [Check 4 Updates](#check-4-updates)
- uses its artefacts
- optional
- [Build Prod Site](#build-prod-site)
- uses its artefacts
- optional
- [Build Prod Site NG](#build-prod-site-ng)
- uses its artefacts
- optional
- [Build Site](#build-site)
- uses its artefacts
- optional
First we have to do some preparation. This is done in the `before_script` section.
- [.prepareaccess](#prepareaccess)
- [.preparecomposerplugins](#preparecomposerplugins)
First we perform a `composer update` which all dependencies without the development part.
The we check for outdated packages:
```yml
composer outdated --minor-only --strict --no-interaction $OUTDATED_EXTRAS
composer outdated --patch-only --strict --no-interaction $OUTDATED_EXTRAS
```
The variable `$OUTDATED_EXTRAS` contains the ignored package like:
`--ignore=drupal/somemodule --ignore=drupal/another`
Rules, when the job must not run:
- the commit message contains `SKIP_check4outdated` and `$CHECKUPDATES` != "yes"
- the commit message contains "Merge branch 'develop' into 'main'"
- the commit message contains "Merge branch 'release' into 'main'"
Rules, when the job should run:
- `$IGNORE_COMPOSER_EXTENDED_AUDIT` == "0"
#### Check 4 Security Vulnerability Advisories #### Check 4 Security Vulnerability Advisories
#### Download DB #### Download DB
This job executes a script, that removes the SQL file `$]PROJECT_NAME}.sql`, if it exists already. This job executes a script, that removes the SQL file `$]PROJECT_NAME}.sql`, if it exists already.
...@@ -349,6 +400,9 @@ Rules, when the job should run: ...@@ -349,6 +400,9 @@ Rules, when the job should run:
- the tests are enabled by `$DISABLE_CI_TESTS` != "1" - the tests are enabled by `$DISABLE_CI_TESTS` != "1"
### Postprocess
### Test ### Test
After the preparation and the setup of a Drupal database, we can execute tests. This happens in this stage. After the preparation and the setup of a Drupal database, we can execute tests. This happens in this stage.
...@@ -512,6 +566,25 @@ Rules, when the job must not run: ...@@ -512,6 +566,25 @@ Rules, when the job must not run:
- `$DISABLE_DEPLOYMENT` != "0" - `$DISABLE_DEPLOYMENT` != "0"
- `$CI_COMMIT_BRANCH` != "main" && `$ENFORCE_DEPLOYMENT` != "1" - `$CI_COMMIT_BRANCH` != "main" && `$ENFORCE_DEPLOYMENT` != "1"
### Finalize
Here we can do cleanups and remove some garbage the build process produces.
#### Shut Down Docker Project
We start a docker image for php with the specifies versions:
- `PHP_MAJOR_VERSION`
- `PHP_MINOR_VERSION`
The following jobs must run before successfully:
- [Build Site](#build-site)
This job simply stops and removes the docker container, which are started for the build by:
`docker compose down`
### Internal Stages ### Internal Stages
...@@ -540,6 +613,10 @@ The following points will be prepared for [Composer](https://getcomposer.org/): ...@@ -540,6 +613,10 @@ The following points will be prepared for [Composer](https://getcomposer.org/):
- the configuration `audit.abandoned`, depend on `$IGNORE_COMPOSER_ABANDONED_AUDIT` - the configuration `audit.abandoned`, depend on `$IGNORE_COMPOSER_ABANDONED_AUDIT`
- unsupported module versions, which are allowed to use - unsupported module versions, which are allowed to use
#### .retry-for-system-issues
#### .cache_default
## Configuration ## Configuration
### GitLab Runner ### GitLab Runner
......
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