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: ...@@ -43,6 +43,9 @@ Import DB NG:
Import Local DB: Import Local DB:
extends: '.importdbLocal' extends: '.importdbLocal'
Import Install DB:
extends: '.importdbInstall'
Update DB: Update DB:
extends: '.updatedb' extends: '.updatedb'
......
variables: variables:
ALWAYS_INSTALL_IN_PIPELINE: 0
COMPOSE_PROJECT_NAME: ${PROJECT_NAME}_$CI_COMMIT_REF_SLUG COMPOSE_PROJECT_NAME: ${PROJECT_NAME}_$CI_COMMIT_REF_SLUG
COMPOSER_EXIT_ON_PATCH_FAILURE: 1 COMPOSER_EXIT_ON_PATCH_FAILURE: 1
COMPOSER_PATCHES_SKIP_REPORTING: 1 COMPOSER_PATCHES_SKIP_REPORTING: 1
......
...@@ -172,6 +172,8 @@ Debug: ...@@ -172,6 +172,8 @@ Debug:
GITLABTESTSDISABLED="yes" GITLABTESTSDISABLED="yes"
elif [[ "$DISABLE_CI_TEST_BACKSTOP" == "1" && "$DISABLE_CI_TEST_CYPRESSE2E" == "1" ]]; then elif [[ "$DISABLE_CI_TEST_BACKSTOP" == "1" && "$DISABLE_CI_TEST_CYPRESSE2E" == "1" ]]; then
echo "DB not required" echo "DB not required"
elif [[ "$ALWAYS_INSTALL_IN_PIPELINE" == "yes" ]]; then
DBREQUIRED="yes"
elif [[ "$CI_COMMIT_REF_NAME" == "main" ]]; then elif [[ "$CI_COMMIT_REF_NAME" == "main" ]]; then
DBREQUIRED="yes" DBREQUIRED="yes"
elif [[ "$CI_COMMIT_MESSAGE" == *"[PULL_DB]"* ]]; then elif [[ "$CI_COMMIT_MESSAGE" == *"[PULL_DB]"* ]]; then
...@@ -437,6 +439,8 @@ Debug: ...@@ -437,6 +439,8 @@ Debug:
when: never when: never
- if: '$LOCALDBFILE != "none"' - if: '$LOCALDBFILE != "none"'
when: never when: never
- if: '$ALWAYS_INSTALL_IN_PIPELINE == "yes"'
when: never
- if: '$DISABLE_CI_TESTS != "1"' - if: '$DISABLE_CI_TESTS != "1"'
.dumpdbNG: .dumpdbNG:
...@@ -469,6 +473,8 @@ Debug: ...@@ -469,6 +473,8 @@ Debug:
when: never when: never
- if: '$LOCALDBFILE != "none"' - if: '$LOCALDBFILE != "none"'
when: never when: never
- if: '$ALWAYS_INSTALL_IN_PIPELINE == "yes"'
when: never
- if: '$DISABLE_CI_TESTS != "1"' - if: '$DISABLE_CI_TESTS != "1"'
.importdb: .importdb:
...@@ -486,6 +492,8 @@ Debug: ...@@ -486,6 +492,8 @@ Debug:
when: never when: never
- if: '$LOCALDBFILE != "none"' - if: '$LOCALDBFILE != "none"'
when: never when: never
- if: '$ALWAYS_INSTALL_IN_PIPELINE == "yes"'
when: never
- if: '$DISABLE_CI_TESTS != "1"' - if: '$DISABLE_CI_TESTS != "1"'
dependencies: dependencies:
- 'Build Site' - 'Build Site'
...@@ -506,6 +514,8 @@ Debug: ...@@ -506,6 +514,8 @@ Debug:
when: never when: never
- if: '$LOCALDBFILE != "none"' - if: '$LOCALDBFILE != "none"'
when: never when: never
- if: '$ALWAYS_INSTALL_IN_PIPELINE == "yes"'
when: never
- if: '$DISABLE_CI_TESTS != "1"' - if: '$DISABLE_CI_TESTS != "1"'
dependencies: dependencies:
- 'Build Site' - 'Build Site'
...@@ -518,6 +528,30 @@ Debug: ...@@ -518,6 +528,30 @@ Debug:
before_script: before_script:
- cp ${LOCALDBFILE} ${PROJECT_NAME}.sql.gz - cp ${LOCALDBFILE} ${PROJECT_NAME}.sql.gz
- gunzip ${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: rules:
- if: '$DBREQUIRED == "no"' - if: '$DBREQUIRED == "no"'
when: never when: never
...@@ -525,6 +559,8 @@ Debug: ...@@ -525,6 +559,8 @@ Debug:
when: never when: never
- if: '$LOCALDBFILE == "none"' - if: '$LOCALDBFILE == "none"'
when: never when: never
- if: '$ALWAYS_INSTALL_IN_PIPELINE == "no"'
when: never
- if: '$DISABLE_CI_TESTS != "1"' - if: '$DISABLE_CI_TESTS != "1"'
dependencies: dependencies:
- 'Build Site' - 'Build Site'
......
...@@ -69,6 +69,8 @@ Test Backstop: ...@@ -69,6 +69,8 @@ Test Backstop:
optional: true optional: true
- job: Import Local DB - job: Import Local DB
optional: true optional: true
- job: Import Install DB
optional: true
- job: Update DB - job: Update DB
optional: true optional: true
script: script:
...@@ -96,6 +98,8 @@ Test Cypress E2E: ...@@ -96,6 +98,8 @@ Test Cypress E2E:
optional: true optional: true
- job: Import Local DB - job: Import Local DB
optional: true optional: true
- job: Import Install DB
optional: true
- job: Update DB - job: Update DB
optional: true optional: true
- job: Test Backstop - 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