Skip to content
Snippets Groups Projects
Commit e63db159 authored by jurgenhaas's avatar jurgenhaas
Browse files

gitlab-ci-cd/drupal#2 Update documentation for Drupal GitLab pipelines

parent 604af5f7
No related branches found
No related tags found
No related merge requests found
Pipeline #34168 passed
docs/files/screenshots/Screenshot from 2021-01-23 17-15-35.png

131 B

docs/files/screenshots/Screenshot from 2021-01-23 17-20-07.png

131 B

......@@ -13,6 +13,7 @@ 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:
- validation
- buildprod
- build
- prepare
- test
......@@ -64,7 +65,7 @@ project.
### GitLab Variables
Some variables are required for proper access control and you have to provide
Some variables are required for proper access control, and you have to provide
them in the project configuration by going to **Settings / CI/CD / Variables**
and adding these variables:
......@@ -95,6 +96,9 @@ include:
Validate Environment:
extends: '.prerequisites'
Build Prod Site:
extends: '.build-prod'
Build Site:
extends: '.build'
......@@ -159,6 +163,7 @@ Deploy:
- echo "Scripts have not been developed yet"
cache: {}
dependencies:
- 'Build Prod Site'
- 'Build Theme'
except:
refs:
......@@ -186,6 +191,14 @@ you have to write the scripts for those two tasks yourselves.
test stage will be skipped. This is useful e.g. in a development environment
where you push and run pipelines often but don't want to run the tests every
single time.
- `DISABLE_CI_TEST_BACKSTOP`: if this variable is set to any value, the visual
regression tests with Backstop will be skipped.
- `DISABLE_CI_TEST_BEHAT`: if this variable is set to any value, the Behat
tests will be skipped.
- `DISABLE_CI_TEST_CODESTYLE`: if this variable is set to any value, the
PHP CS tests will be skipped.
- `DISABLE_CI_TEST_PHPUNIT`: if this variable is set to any value, the
PHP unit tests will be skipped.
- `CAE`: This variable is being used by the Drupal module
[Config auto export](https://www.drupal.org/project/config_auto_export)
......@@ -196,6 +209,8 @@ used to define dependencies:
- `validation`
- `Validate Environment`
- `buildprod`
- `Build Prod Site`
- `build`
- `Build Site`
- `Download DB`
......@@ -249,8 +264,8 @@ The used placeholders in this example are:
- `YOURAUTHTOKEN`: your auth token to the LakeDrops GitLab Docker registry.
- `INVENTORYNAME`: the name of the Ansible inventory to be used.
To learn more about the Ansible imeages for an inventory and how to setup some
of the configuration files, please have a look into
To learn more about the Ansible imeages for an inventory and how to set up some
configuration files, please have a look into
[Docker for Ansible](/docker/ansible).
Once you have the GitLab runner for Ansible setup for the Drupal project,
......@@ -311,3 +326,26 @@ task `Import DB` will then import that dump in the `prepare` stage.
Otherwise, those two tasks will be skipped and the task `Update DB` will be
executed in the `prepare` stage instead.
## Example
We provide a [Demo Drupal 9 project](https://gitlab.lakedrops.com/gitlab-ci-cd/demos/drupal-9)
which uses this GitLab CI framework. If you want to give it a try, login to
our GitLab, go to the project and click on "Request access". Once we've
accepted your request, you can clone the project, make some changes and push
them back to the project. This will [trigger the pipeline](https://gitlab.lakedrops.com/gitlab-ci-cd/demos/drupal-9/-/pipelines)
thet you can watch running.
The deployed demo site is [available online](https://d9.demo.lakedrops.com).
The setup for this project is very simple. Because we wanted to protect the
pipeline configuration, we removed the default `.gitlab-ci.yml` file from
the repository and configured the usage of the example pipeline configuration
that you can review in the [Drupal GitLab CI Project](https://gitlab.lakedrops.com/gitlab-ci-cd/drupal/-/blob/master/examples/build-test-deploy-ansible.yml).
![Screenshot](/files/screenshots/Screenshot from 2021-01-23 17-15-35.png)
Also, all the variables have been configured in the GitLab project settings,
because developers should not have access to them:
![Screenshot](/files/screenshots/Screenshot from 2021-01-23 17-20-07.png)
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