Skip to content
Snippets Groups Projects
Commit 32a90ea5 authored by danielspeicher's avatar danielspeicher
Browse files

Document stages and jobs.

parent 80aad328
No related branches found
No related tags found
1 merge request!27Develop
......@@ -68,93 +68,18 @@ configuration:
```yaml
variables:
COMPOSE_PROJECT_NAME: myproject_$CI_COMMIT_REF_SLUG
ENVIRONMENT_NAME: myproject/$CI_COMMIT_REF_NAME
THEME_CSS_PATH: web/themes/custom/mytheme/css
PROJECT_NAME: <project_name>
HOST_NAME: <your_host_to_deploy>
THEME_BASE_PATH: web/themes/<base_path>
THEME_CSS_PATH: web/themes/<path>/css
PHP_VERSION: '8.3'
PHP_MAJOR_VERSION: 8
PHP_MINOR_VERSION: 3
include:
- project: 'gitlab-ci-cd/drupal'
ref: master
file: '/test-and-deploy.yml'
Validate Environment:
extends: '.prerequisites'
Build Prod Site:
extends: '.build-prod'
Build Site:
extends: '.build'
Download DB:
stage: build
tags:
- default
variables:
GIT_STRATEGY: none
script: |
if [[ "$DBREQUIRED" == "yes" ]]; then
echo "Scripts have not been developed yet"
fi
cache: {}
dependencies:
- 'Validate Environment'
artifacts:
name: dbdump
when: always
paths:
- ${CI_PROJECT_NAME}.sql
except:
refs:
- tags
variables:
- $CI_COMMIT_MESSAGE =~ /^Merge tag /i
- $CAE
- $DISABLE_CI_TESTS
Import DB:
extends: '.importdb'
Update DB:
extends: '.updatedb'
Build Theme:
extends: '.theme'
before_script:
- cd web/themes/custom/mytheme
Test Code Style:
extends: '.codestyle'
Test PHPUnit:
extends: '.phpunit'
Test Behat:
extends: '.behat'
Test Backstop:
extends: '.backstop'
Deploy:
stage: deploy
tags:
- default
variables:
GIT_STRATEGY: none
environment:
name: ${ENVIRONMENT_NAME}
script:
- echo "Scripts have not been developed yet"
cache: {}
dependencies:
- 'Build Prod Site'
- 'Build Theme'
except:
refs:
- tags
variables:
- $CI_COMMIT_MESSAGE =~ /^Merge tag /i
- $CAE
ref: main
file: '/lakedrops.yml'
```
The tasks for downloading the database dump and to deploy the site finally,
......@@ -168,11 +93,15 @@ you have to write the scripts for those two tasks yourselves.
- `COMPOSE_PROJECT_NAME`: a string only unique project name which will be used
to identify caches and Docker containers.
- `HOST_NAME`: the host name where you want to deploy your Drupal site
- `ENVIRONMENT_NAME`: the environment name for the GitLab UI.
- `ENVIRONMENT_URL`: the environment url of your website
- `THEME_BASE_PATH`: the relative patch to the base theme, if you want to use one
- `THEME_CSS_PATH`: the relative path to the theme's css path where the
generated artefact can be found.
- `PHP_MAJOR_VERSION`: the major PHP version, defaults to 10.
- `PHP_MINOR_VERSION`: the minor PHP version, default to 4.
- `PHP_VERSION: '8.3'`: the string representation of the PHP version
- `PHP_MAJOR_VERSION`: the major PHP version, defaults to 8.
- `PHP_MINOR_VERSION`: the minor PHP version, default to 3.
- `COMPOSER_DOWNGRADE`: by default, composer 2 is being used. To use composer 1
instead, set this variable to 1.
- `INITIAL_INSTALL`: if set to `yes`, the initial Drupal site installation gets
......
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