Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial attempt at d9 tests #1904

Merged
merged 2 commits into from
May 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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