Skip to content

Commit

Permalink
Merge branch 'hotfix/1.16.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed Sep 5, 2023
2 parents 154fbfa + 3cb1319 commit d6ca999
Show file tree
Hide file tree
Showing 120 changed files with 3,045 additions and 1,962 deletions.
8 changes: 4 additions & 4 deletions .ahoy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,19 +194,19 @@ commands:

test-unit:
usage: Run PhpUnit unit tests.
cmd: ahoy cli "DREVOPS_TEST_TYPE=unit ./scripts/drevops/test.sh $@"
cmd: ahoy cli "DREVOPS_TEST_TYPES=unit ./scripts/drevops/test.sh $@"

test-kernel:
usage: Run PhpUnit kernel tests.
cmd: ahoy cli "DREVOPS_TEST_TYPE=kernel ./scripts/drevops/test.sh $@"
cmd: ahoy cli "DREVOPS_TEST_TYPES=kernel ./scripts/drevops/test.sh $@"

test-functional:
usage: Run PhpUnit functional tests.
cmd: ahoy cli "DREVOPS_TEST_TYPE=functional ./scripts/drevops/test.sh $@"
cmd: ahoy cli "DREVOPS_TEST_TYPES=functional ./scripts/drevops/test.sh $@"

test-bdd:
usage: Run BDD tests.
cmd: ahoy cli "DREVOPS_TEST_TYPE=bdd ./scripts/drevops/test.sh $@"
cmd: ahoy cli "DREVOPS_TEST_TYPES=bdd ./scripts/drevops/test.sh $@"

debug:
usage: Enable PHP Xdebug.
Expand Down
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ aliases:
#: This container has all necessary tools to run dockerized environment.
#: @see https://github.com/drevops/ci-builder
#: @see https://hub.docker.com/repository/docker/drevops/ci-builder/tags?page=1&ordering=last_updated
- image: drevops/ci-builder:23.7.0
- image: drevops/ci-builder:23.8.1
auth:
username: $DOCKER_USER
password: $DOCKER_PASS
Expand Down
2 changes: 1 addition & 1 deletion .docker/cli.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# @see https://hub.docker.com/r/uselagoon/php-8.1-cli-drupal/tags
# @see https://github.com/uselagoon/lagoon-images/tree/main/images/php-cli-drupal
FROM uselagoon/php-8.1-cli-drupal:23.7.0
FROM uselagoon/php-8.1-cli-drupal:23.8.0

# Add missing variables.
# @todo Remove once https://github.com/uselagoon/lagoon/issues/3121 is resolved.
Expand Down
2 changes: 1 addition & 1 deletion .docker/mariadb.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# @see https://github.com/drevops/mariadb-drupal-data
#
# The ARG value will be updated with a value passed from docker-compose.yml
ARG IMAGE=uselagoon/mariadb-drupal:23.7.0
ARG IMAGE=uselagoon/mariadb-drupal:23.8.0

# hadolint ignore=DL3006
FROM $IMAGE
Expand Down
2 changes: 1 addition & 1 deletion .docker/nginx-drupal.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FROM ${CLI_IMAGE:-cli} as cli

# @see https://hub.docker.com/r/uselagoon/nginx-drupal/tags?page=1
# @see https://github.com/uselagoon/lagoon-images/tree/main/images/nginx-drupal
FROM uselagoon/nginx-drupal:23.7.0
FROM uselagoon/nginx-drupal:23.8.0

# Webroot is used for Nginx docroot configuration.
ARG WEBROOT=web
Expand Down
2 changes: 1 addition & 1 deletion .docker/php.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM ${CLI_IMAGE:-cli} as cli

# @see https://hub.docker.com/r/uselagoon/php-7.4-fpm/tags
# @see https://github.com/uselagoon/lagoon-images/tree/main/images/php-fpm
FROM uselagoon/php-8.1-fpm:23.7.0
FROM uselagoon/php-8.1-fpm:23.8.0

RUN apk add --no-cache tzdata=2023c-r1

Expand Down
2 changes: 1 addition & 1 deletion .docker/solr.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM ${CLI_IMAGE} as cli

# @see https://hub.docker.com/r/uselagoon/solr/tags?page=1&name=drupal
# @see https://github.com/uselagoon/lagoon-images/blob/main/images/solr-drupal/7.Dockerfile
FROM uselagoon/solr-7-drupal:23.7.0
FROM uselagoon/solr-7-drupal:23.8.0

# Based off search_api_solr/solr-conf-templates/7.x as a sane default.
# @see https://git.drupalcode.org/project/search_api_solr/-/tree/4.x/solr-conf-templates/7.x
Expand Down
27 changes: 24 additions & 3 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ LAGOON_PROJECT=your_site

#;< !INSTALL_FROM_PROFILE
# Lagoon environment to download the database from.
DREVOPS_DB_DOWNLOAD_LAGOON_ENVIRONMENT=main
DREVOPS_DB_DOWNLOAD_LAGOON_BRANCH=main
#;> !INSTALL_FROM_PROFILE

#;> LAGOON
Expand All @@ -253,20 +253,41 @@ DREVOPS_DB_DOWNLOAD_LAGOON_ENVIRONMENT=main
# @see https://github.com/drevops/mariadb-drupal-data to seed your DB image.
# DREVOPS_DB_DOCKER_IMAGE=your_org/your_site:latest

#;< DEPLOYMENT
################################################################################
# DEPLOYMENT #
################################################################################

#;< DEPLOYMENT
# The type of deployemt.
#
# Combination of comma-separated values to support multiple deployments:
# `artifact`,`docker`, `webhook`, `lagoon`.
#
# See https://docs.drevops.com/deploy
DREVOPS_DEPLOY_TYPE=artifact
DREVOPS_DEPLOY_TYPES=artifact
#;> DEPLOYMENT

#;< NOTIFICATIONS
################################################################################
# NOTIFICATIONS #
################################################################################

# Notificaions are sent accross multiple channels on pre or post deployment
# events.

# The channels of the notifications.
#
# Can be a combination of comma-separated values: email,newrelic,github,jira
DREVOPS_NOTIFY_CHANNELS=email

# Email address(es) to send notifications to.
#
# Multiple names can be specified as a comma-separated list of email addresses
# with optional names in the format "email|name".
# Example: "[email protected]|Jane Doe, [email protected]|John Doe"
DREVOPS_NOTIFY_EMAIL_RECIPIENTS=
#;> NOTIFICATIONS

#;< DEMO
#-------------------------------------------------------------------------------
# Variables used to override project-specific values for demonstration purposes.
Expand Down
1 change: 1 addition & 0 deletions .gitignore.deployment
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
!/scripts/
!/vendor/
!composer.json
!.env

# Do not ignore webroot (manage Drupal scaffold files using the composer.json)
!web
Expand Down
5 changes: 4 additions & 1 deletion .lagoon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ tasks:
service: cli
shell: bash

#;< !NOTIFICATIONS
- run:
name: Notify about pre-deployment.
command: |
Expand All @@ -28,6 +29,7 @@ tasks:
DREVOPS_NOTIFY_EVENT=pre_deployment ./scripts/drevops/notify.sh || true
service: cli
shell: bash
#;> !NOTIFICATIONS

- run:
name: Backup DB before deployment in production
Expand Down Expand Up @@ -79,6 +81,7 @@ tasks:
service: cli
shell: bash

#;< !NOTIFICATIONS
- run:
name: Send deployment notifications
command: |
Expand All @@ -88,7 +91,7 @@ tasks:
./scripts/drevops/notify.sh
service: cli
shell: bash

#;> !NOTIFICATIONS
environments:
# Branch name that represents production environment.
main:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ The following list includes ✅ completed features and 💡 upcoming features.

[//]: # (#;> DREVOPS_DEV)
# YOURSITE
Drupal 9 implementation of YOURSITE for YOURORG
Drupal 10 implementation of YOURSITE for YOURORG

[![CircleCI](https://circleci.com/gh/your_org/your_site.svg?style=shield)](https://circleci.com/gh/your_org/your_site)
![Drupal 9](https://img.shields.io/badge/Drupal-9-blue.svg)
![Drupal 10](https://img.shields.io/badge/Drupal-10-blue.svg)

[//]: # (#;< RENOVATEBOT)

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "your_org/your_site",
"description": "Drupal 9 implementation of YOURSITE for YOURORG",
"description": "Drupal 10 implementation of YOURSITE for YOURORG",
"license": "proprietary",
"require": {
"php": ">=8.1",
Expand All @@ -11,7 +11,7 @@
"drupal/clamav": "^2.0.2@rc",
"drupal/coffee": "^1.2",
"drupal/config_ignore": "^2.4",
"drupal/config_split": "^2@rc",
"drupal/config_split": "^1",
"drupal/config_update": "^2@alpha",
"drupal/core-composer-scaffold": "^10",
"drupal/core-project-message": "^10",
Expand All @@ -27,7 +27,7 @@
"drupal/shield": "^1.6",
"drupal/stage_file_proxy": "^1.2",
"drupal/token": "^1.10",
"drush/drush": "^11",
"drush/drush": "^12",
"oomphinc/composer-installers-extender": "^2.0",
"vlucas/phpdotenv": "^5.4",
"webflo/drupal-finder": "^1.2"
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ services:
context: .
dockerfile: .docker/mariadb.dockerfile
args:
IMAGE: "${DREVOPS_DB_DOCKER_IMAGE:-uselagoon/mariadb-drupal:23.7.0}" # Use custom database image (if defined) or fallback to standard database image.
IMAGE: "${DREVOPS_DB_DOCKER_IMAGE:-uselagoon/mariadb-drupal:23.8.0}" # Use custom database image (if defined) or fallback to standard database image.
<<: *default-user
environment:
<<: *default-environment
Expand All @@ -154,7 +154,7 @@ services:

#;< REDIS
redis:
image: uselagoon/redis-6:23.7.0
image: uselagoon/redis-6:23.8.0
#;< LAGOON
labels:
lagoon.type: redis # Change to 'none' if dedicated Redis service is used. See https://docs.lagoon.sh/using-lagoon-advanced/service-types/
Expand Down
8 changes: 7 additions & 1 deletion hooks/library/copy-db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ set -e
site="${1}"
target_env="${2}"

export DREVOPS_APP="/var/www/html/${site}.${target_env}"

pushd "${DREVOPS_APP}" >/dev/null || exit 1

[ "${DREVOPS_TASK_COPY_DB_ACQUIA_SKIP}" = "1" ] && echo "Skipping copying of database between Acquia environments." && exit 0

export DREVOPS_ACQUIA_KEY="${DREVOPS_ACQUIA_KEY?not set}"
Expand All @@ -19,4 +23,6 @@ export DREVOPS_TASK_COPY_DB_ACQUIA_SRC="${DREVOPS_TASK_COPY_DB_ACQUIA_SRC:-prod}
export DREVOPS_TASK_COPY_DB_ACQUIA_DST="${DREVOPS_TASK_COPY_DB_ACQUIA_DST:-${target_env}}"
export DREVOPS_TASK_COPY_DB_ACQUIA_NAME="${DREVOPS_TASK_COPY_DB_ACQUIA_NAME?not set}"

"/var/www/html/${site}.${target_env}/scripts/drevops/task-copy-db-acquia.sh"
./scripts/drevops/task-copy-db-acquia.sh

popd >/dev/null || exit 1
8 changes: 7 additions & 1 deletion hooks/library/copy-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ set -e
site="${1}"
target_env="${2}"

export DREVOPS_APP="/var/www/html/${site}.${target_env}"

pushd "${DREVOPS_APP}" >/dev/null || exit 1

[ "${DREVOPS_TASK_COPY_FILES_ACQUIA_SKIP}" = "1" ] && echo "Skipping copying of files between Acquia environments." && exit 0

export DREVOPS_ACQUIA_KEY="${DREVOPS_ACQUIA_KEY?not set}"
Expand All @@ -18,4 +22,6 @@ export DREVOPS_ACQUIA_APP_NAME="${DREVOPS_ACQUIA_APP_NAME:-${site}}"
export DREVOPS_TASK_COPY_FILES_ACQUIA_SRC="${DREVOPS_TASK_COPY_FILES_ACQUIA_SRC:-prod}"
export DREVOPS_TASK_COPY_FILES_ACQUIA_DST="${DREVOPS_TASK_COPY_FILES_ACQUIA_DST:-${target_env}}"

"/var/www/html/${site}.${target_env}/scripts/drevops/task-copy-files-acquia.sh"
./scripts/drevops/task-copy-files-acquia.sh

popd >/dev/null || exit 1
10 changes: 7 additions & 3 deletions hooks/library/install-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ set -e
site="${1}"
target_env="${2}"

[ "${DREVOPS_TASK_DRUPAL_SITE_INSTALL_ACQUIA_SKIP}" = "1" ] && echo "Skipping install site." && exit

export DREVOPS_APP="/var/www/html/${site}.${target_env}"

pushd "${DREVOPS_APP}" >/dev/null || exit 1

[ "${DREVOPS_TASK_DRUPAL_SITE_INSTALL_ACQUIA_SKIP}" = "1" ] && echo "Skipping install site." && exit

# Do not unblock admin account.
export DREVOPS_DRUPAL_LOGIN_UNBLOCK_ADMIN="${DREVOPS_DRUPAL_LOGIN_UNBLOCK_ADMIN:-0}"

"/var/www/html/${site}.${target_env}/scripts/drevops/drupal-install-site.sh"
./scripts/drevops/drupal-install-site.sh

popd >/dev/null || exit 1
40 changes: 23 additions & 17 deletions hooks/library/notify-deployment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,31 @@ set -e
site="${1}"
target_env="${2}"
branch="${3}"
ref="${4}:-${branch}"
ref="${4:-${branch}}"

# ODE environments do not support custom domains - use Acquia domains instead.
if [ "${target_env#ode}" != "${target_env}" ]; then
url="https://${site}${target_env}.prod.acquia-sites.com"
else
subdomain="${target_env}"
# Custom domain name for the environment.
DREVOPS_NOTIFY_ENVIRONMENT_DOMAIN="${DREVOPS_NOTIFY_ENVIRONMENT_DOMAIN:-}"

export DREVOPS_APP="/var/www/html/${site}.${target_env}"

pushd "${DREVOPS_APP}" >/dev/null || exit 1

# Re-map "test" to "stage".
if [ "${subdomain#test}" != "${subdomain}" ]; then
subdomain="stage"
fi
# Set URL to Acquia domain by default.
url="https://${AH_SITE_NAME}.${AH_REALM:-prod}.acquia-sites.com"

url="https://${subdomain}.${DREVOPS_TASK_NOTIFY_DEPLOYMENT_EMAIL_ACQUIA_DOMAIN}"
# Use custom domain for non-ODE environments, if provided.
if [ -n "${DREVOPS_NOTIFY_ENVIRONMENT_DOMAIN}" ] && [ "${target_env#ode}" = "${target_env}" ]; then
subdomain="${target_env}"
[ "${subdomain}" = "test" ] && subdomain="stage"
url="https://${subdomain}.${DREVOPS_NOTIFY_ENVIRONMENT_DOMAIN}"
fi

export DREVOPS_NOTIFY_PROJECT=$LAGOON_PROJECT
export DREVOPS_NOTIFY_BRANCH=${branch}
export DREVOPS_NOTIFY_REF=${ref}
export DREVOPS_NOTIFY_SHA=${target_env}
export DREVOPS_NOTIFY_ENVIRONMENT_URL=$url
"/var/www/html/${site}.${target_env}/scripts/scripts/drevops/notify.sh"
export DREVOPS_NOTIFY_PROJECT="${site}"
export DREVOPS_NOTIFY_BRANCH="${branch}"
export DREVOPS_NOTIFY_REF="${ref}"
export DREVOPS_NOTIFY_SHA="${target_env}"
export DREVOPS_NOTIFY_ENVIRONMENT_URL="${url}"

./scripts/drevops/notify.sh

popd >/dev/null || exit 1
8 changes: 7 additions & 1 deletion hooks/library/purge-cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ set -e
site="${1}"
target_env="${2}"

export DREVOPS_APP="/var/www/html/${site}.${target_env}"

pushd "${DREVOPS_APP}" >/dev/null || exit 1

[ "${DREVOPS_TASK_PURGE_CACHE_ACQUIA_SKIP}" = "1" ] && echo "Skipping purging of cache in Acquia environment." && exit 0

export DREVOPS_ACQUIA_KEY="${DREVOPS_ACQUIA_KEY?not set}"
Expand All @@ -19,4 +23,6 @@ export DREVOPS_ACQUIA_APP_NAME="${DREVOPS_ACQUIA_APP_NAME:-${site}}"
export DREVOPS_TASK_PURGE_CACHE_ACQUIA_ENV="${DREVOPS_TASK_PURGE_CACHE_ACQUIA_ENV:-${target_env}}"
export DREVOPS_TASK_PURGE_CACHE_ACQUIA_DOMAINS_FILE="${DREVOPS_TASK_PURGE_CACHE_ACQUIA_DOMAINS_FILE:-"/var/www/html/${site}.${target_env}/hooks/library/domains.txt"}"

"/var/www/html/${site}.${target_env}/scripts/drevops/task-purge-cache-acquia.sh"
./scripts/drevops/task-purge-cache-acquia.sh

popd >/dev/null || exit 1
34 changes: 0 additions & 34 deletions scripts/custom/drupal-install-site-1-example-operations.sh

This file was deleted.

Loading

0 comments on commit d6ca999

Please sign in to comment.