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

#78 Add support to always install new site for testing

parent ba1cace9
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,9 @@ Import DB NG:
Import Local DB:
extends: '.importdbLocal'
Import Install DB:
extends: '.importdbInstall'
Update DB:
extends: '.updatedb'
......
variables:
ALWAYS_INSTALL_IN_PIPELINE: 0
COMPOSE_PROJECT_NAME: ${PROJECT_NAME}_$CI_COMMIT_REF_SLUG
COMPOSER_EXIT_ON_PATCH_FAILURE: 1
COMPOSER_PATCHES_SKIP_REPORTING: 1
......
......@@ -172,6 +172,8 @@ Debug:
GITLABTESTSDISABLED="yes"
elif [[ "$DISABLE_CI_TEST_BACKSTOP" == "1" && "$DISABLE_CI_TEST_CYPRESSE2E" == "1" ]]; then
echo "DB not required"
elif [[ "$ALWAYS_INSTALL_IN_PIPELINE" == "yes" ]]; then
DBREQUIRED="yes"
elif [[ "$CI_COMMIT_REF_NAME" == "main" ]]; then
DBREQUIRED="yes"
elif [[ "$CI_COMMIT_MESSAGE" == *"[PULL_DB]"* ]]; then
......@@ -437,6 +439,8 @@ Debug:
when: never
- if: '$LOCALDBFILE != "none"'
when: never
- if: '$ALWAYS_INSTALL_IN_PIPELINE == "yes"'
when: never
- if: '$DISABLE_CI_TESTS != "1"'
.dumpdbNG:
......@@ -469,6 +473,8 @@ Debug:
when: never
- if: '$LOCALDBFILE != "none"'
when: never
- if: '$ALWAYS_INSTALL_IN_PIPELINE == "yes"'
when: never
- if: '$DISABLE_CI_TESTS != "1"'
.importdb:
......@@ -486,6 +492,8 @@ Debug:
when: never
- if: '$LOCALDBFILE != "none"'
when: never
- if: '$ALWAYS_INSTALL_IN_PIPELINE == "yes"'
when: never
- if: '$DISABLE_CI_TESTS != "1"'
dependencies:
- 'Build Site'
......@@ -506,6 +514,8 @@ Debug:
when: never
- if: '$LOCALDBFILE != "none"'
when: never
- if: '$ALWAYS_INSTALL_IN_PIPELINE == "yes"'
when: never
- if: '$DISABLE_CI_TESTS != "1"'
dependencies:
- 'Build Site'
......@@ -518,6 +528,30 @@ Debug:
before_script:
- cp ${LOCALDBFILE} ${PROJECT_NAME}.sql.gz
- gunzip ${PROJECT_NAME}.sql.gz
rules:
- if: '$DBREQUIRED == "no"'
when: never
- if: '$TESTSDISABLED == "yes"'
when: never
- if: '$LOCALDBFILE != "none"'
when: never
- if: '$ALWAYS_INSTALL_IN_PIPELINE == "yes"'
when: never
- if: '$DISABLE_CI_TESTS != "1"'
dependencies:
- 'Build Site'
.importdbInstall:
stage: prepare
tags:
- default
image: registry.lakedrops.com/docker/gitlab-drupal-ci/php-${PHP_MAJOR_VERSION}.${PHP_MINOR_VERSION}
cache: {}
variables:
GIT_STRATEGY: fetch
script:
- ${INITIAL_SETUP_COMMAND}
- drush cr
rules:
- if: '$DBREQUIRED == "no"'
when: never
......@@ -525,6 +559,8 @@ Debug:
when: never
- if: '$LOCALDBFILE == "none"'
when: never
- if: '$ALWAYS_INSTALL_IN_PIPELINE == "no"'
when: never
- if: '$DISABLE_CI_TESTS != "1"'
dependencies:
- 'Build Site'
......
......@@ -69,6 +69,8 @@ Test Backstop:
optional: true
- job: Import Local DB
optional: true
- job: Import Install DB
optional: true
- job: Update DB
optional: true
script:
......@@ -96,6 +98,8 @@ Test Cypress E2E:
optional: true
- job: Import Local DB
optional: true
- job: Import Install DB
optional: true
- job: Update DB
optional: true
- job: Test Backstop
......
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