Commit ccc07395 authored by Ines WALLON's avatar Ines WALLON
Browse files

chore: #6 check if install is ok in gitlab_ci

parent 09489438
Pipeline #822 passed with stages
in 5 minutes and 46 seconds
stages:
- Init
- Check Install
- Security
- Code quality PHP 7.4
# PḦP8 is not stable
......@@ -20,6 +21,7 @@ variables:
include:
- local: config/.gitlab/build_drupal.yml
- local: config/.gitlab/check_install.yml
- local: config/.gitlab/security.yml
- local: config/.gitlab/code_quality_default.yml
# PḦP8 is currently not stable.
......
......@@ -44,7 +44,7 @@ clean: docker-stop
install:
@docker-compose pull
@docker-compose up -d
@docker-compose exec web bash ${WORK_DIR}/scripts/install.sh "$$sitename" "$$sitemail"
@docker-compose exec web bash ${WORK_DIR}/scripts/install.sh
update:
@docker-compose exec web ${WORK_DIR}/scripts/update.sh
......
......@@ -8,6 +8,8 @@
- cp config/.init_files/exemple.docker-compose.yml docker-compose.yml
- cp config/.init_files/exemple.env .env
- sed -i '/COMPOSER_AUTH/d' .env
- sed -i "s/FIXUID=1000/FIXUID=0/g" .env
- sed -i "s/FIXGID=1000/FIXGID=0/g" .env
- mkdir -p web/sites/default/
- cp config/drupal/example.settings.local.php config/drupal/settings.local.php
- cp config/drupal/example.settings.php web/sites/default/settings.php
......
.check_install:
stage: Check Install
needs: ['Build Drupal']
image: docker/compose:latest
tags:
- spud
rules:
- if: $CI_COMMIT_BRANCH == "9.x" || $CI_COMMIT_BRANCH == "develop"
'Install Drupal':
extends: .check_install
script:
- docker-compose pull
- docker-compose up -d
- docker-compose exec -T web bash ./scripts/install.sh
......@@ -14,7 +14,7 @@
- docker-compose up -d
- sleep 30
- $WEB_CONTAINER composer update
- $WEB_CONTAINER bash /project/scripts/install.sh "skeletond9" "d9@example.com"
- $WEB_CONTAINER bash /project/scripts/install.sh
rules:
- if: $CI_COMMIT_BRANCH == "contrib_modules"
......
......@@ -2,15 +2,15 @@
stage: Security
needs: ['Build Drupal']
image: libert/drupal-php-dev:7.4
tags:
- spud
rules:
- if: $CI_COMMIT_BRANCH == "contrib_modules"
- if: $CI_COMMIT_BRANCH == "contrib_modules" || $CI_COMMIT_BRANCH == "9.x" || $CI_COMMIT_BRANCH == "develop"
'pm:security':
extends: .security
tags:
- spud
script:
- $WEB_CONTAINER drush pm:security --format=xml > security.xml
- drush pm:security --format=xml > security.xml
artifacts:
when: on_failure
reports:
......@@ -18,10 +18,8 @@
'pm:security-php':
extends: .security
tags:
- spud
script:
- $WEB_CONTAINER drush pm:security-php --format=xml > security-php.xml
- drush pm:security-php --format=xml > security-php.xml
artifacts:
when: on_failure
reports:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment