Skip to content

Commit

Permalink
Merge pull request #1904 from amazeeio/feature/d9_tests
Browse files Browse the repository at this point in the history
Initial attempt at d9 tests
  • Loading branch information
Schnitzel committed May 28, 2020
2 parents 8c65882 + 18b5795 commit 3d0a382
Show file tree
Hide file tree
Showing 52 changed files with 11,179 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/files/drupal9-dockerfiles/php7.4/builder.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ARG IMAGE_REPO
FROM ${IMAGE_REPO:-amazeeio}/php:7.4-cli-drupal

COPY composer.json composer.lock /app/
COPY scripts /app/scripts
RUN composer install --no-dev
COPY . /app

ENV WEBROOT=web
2 changes: 2 additions & 0 deletions tests/files/drupal9-dockerfiles/php7.4/mariadb.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ARG IMAGE_REPO
FROM ${IMAGE_REPO:-amazeeio}/mariadb-drupal
9 changes: 9 additions & 0 deletions tests/files/drupal9-dockerfiles/php7.4/nginx.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ARG CLI_IMAGE
ARG IMAGE_REPO
FROM ${CLI_IMAGE:-builder} as builder

FROM ${IMAGE_REPO:-amazeeio}/nginx-drupal

COPY --from=builder /app /app

ENV WEBROOT=web
7 changes: 7 additions & 0 deletions tests/files/drupal9-dockerfiles/php7.4/php.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ARG CLI_IMAGE
ARG IMAGE_REPO
FROM ${CLI_IMAGE:-builder} as builder

FROM ${IMAGE_REPO:-amazeeio}/php:7.4-fpm

COPY --from=builder /app /app
2 changes: 2 additions & 0 deletions tests/files/drupal9-dockerfiles/php7.4/postgres.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ARG IMAGE_REPO
FROM ${IMAGE_REPO:-amazeeio}/postgres-drupal
2 changes: 2 additions & 0 deletions tests/files/drupal9-dockerfiles/php7.4/redis.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ARG IMAGE_REPO
FROM ${IMAGE_REPO:-amazeeio}/redis
3 changes: 3 additions & 0 deletions tests/files/drupal9-dockerfiles/php7.4/solr.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ARG IMAGE_REPO

FROM ${IMAGE_REPO:-amazeeio}/solr:7.7-drupal
2 changes: 2 additions & 0 deletions tests/files/drupal9-dockerfiles/php7.4/varnish.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ARG IMAGE_REPO
FROM ${IMAGE_REPO:-amazeeio}/varnish-drupal
2 changes: 2 additions & 0 deletions tests/files/drupal9-mariadb/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.git
docker-compose.yml
21 changes: 21 additions & 0 deletions tests/files/drupal9-mariadb/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Ignore directories generated by Composer
/drush/contrib/
/vendor/
/web/core/
/web/modules/contrib/
/web/themes/contrib/
/web/profiles/contrib/
/web/libraries/

# Ignore Drupal's file directory
/web/sites/*/files/

# Ingore files that are only for the current local environment
web/sites/*/local.settings.php
web/sites/*/local.services.yml

# Ignore SimpleTest multi-site environment.
web/sites/simpletest

# Ignore files generated by PhpStorm
/.idea/
52 changes: 52 additions & 0 deletions tests/files/drupal9-mariadb/.lagoon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
docker-compose-yaml: docker-compose.yml

endpoint: 172.17.0.1:2020
api: 172.17.0.1:3000

environment_variables:
git_sha: 'true'

tasks:
post-rollout:
- run:
name: env variables
command: env
service: cli
- run:
name: IF no Drupal installed, install Drupal
command: |
cd web
if tables=$(drush sqlq "show tables like \"node\";") && [ -z "$tables" ]; then
# no drupal installed, we install drupal from an db dump
zcat ../drupal.sql.gz | $(drush sql-connect)
fi
# set the sitename to the current SHA and BRANCH
drush -y cset system.site name "LAGOON_GIT_SHA=$LAGOON_GIT_SHA LAGOON_GIT_BRANCH=$LAGOON_GIT_BRANCH"
service: cli
shell: bash
- run:
name: drush cr
command: cd web && drush -y cr
service: cli

environments:
master:
routes:
- nginx:
- "domain.com":
tls-acme: 'true'
insecure: Allow
- www.domain.com

cronjobs:
- name: drush cron
schedule: "1 * * * *"
command: drush cron
service: cli

drupal8-composer-70-mariadb:
cronjobs:
- name: drush cron
schedule: "1 * * * *"
command: drush cron
service: cli

0 comments on commit 3d0a382

Please sign in to comment.