Skip to content

Commit

Permalink
Merge branch 'release/1.22.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed Jul 19, 2024
2 parents d85d5be + aff5585 commit e7cdd59
Show file tree
Hide file tree
Showing 35 changed files with 244 additions and 215 deletions.
20 changes: 12 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ aliases:
# This container has all the necessary tools to run a dockerized environment.
# @see https://github.com/drevops/ci-runner
# @see https://hub.docker.com/repository/docker/drevops/ci-runner/tags?page=1&ordering=last_updated
- image: drevops/ci-runner:24.4.0
- image: drevops/ci-runner:24.7.0
auth:
username: ${DREVOPS_CONTAINER_REGISTRY_USER}
password: ${DREVOPS_CONTAINER_REGISTRY_PASS}
Expand Down Expand Up @@ -238,6 +238,13 @@ jobs:
- v1.21.0-db10-{{ checksum "/tmp/db_cache_branch" }}-{{ checksum "/tmp/db_cache_fallback_yes" }}-
#;> !PROVISION_USE_PROFILE

- run:
name: Lint Dockerfiles with Hadolint
command: |
for file in $(find . -name 'Dockerfile' -o -name '*.dockerfile'); do
echo "Linting ${file}" && cat "${file}" | docker run --rm -i hadolint/hadolint || [ "${DREVOPS_CI_HADOLINT_IGNORE_FAILURE:-0}" -eq 1 ]
done
- run:
name: Login to container registry
command: ./scripts/drevops/login-container-registry.sh
Expand All @@ -252,20 +259,17 @@ jobs:
mkdir -p "${DREVOPS_EXPORT_CODE_DIR}"
docker compose cp -L cli:"/app/." "${DREVOPS_EXPORT_CODE_DIR}"
- run:
name: Validate Composer configuration
command: docker compose exec cli composer validate --strict || [ "${DREVOPS_CI_COMPOSER_VALIDATE_IGNORE_FAILURE:-0}" -eq 1 ]

- run:
name: Install development dependencies
command: |
docker compose exec $(env | cut -f1 -d= | sed 's/^/-e /') -T cli bash -c " \
if [ -n \"${GITHUB_TOKEN:-}\" ]; then export COMPOSER_AUTH='{\"github-oauth\": {\"github.com\": \"${GITHUB_TOKEN-}\"}}'; fi && \
COMPOSER_MEMORY_LIMIT=-1 composer --ansi install --prefer-dist"
- run:
name: Lint Dockerfiles with Hadolint
command: |
for file in $(find . -name 'Dockerfile' -o -name '*.dockerfile'); do
echo "Linting ${file}" && cat "${file}" | docker run --rm -i hadolint/hadolint || [ "${DREVOPS_CI_HADOLINT_IGNORE_FAILURE:-0}" -eq 1 ]
done
- run:
name: Lint code with PHPCS
command: docker compose exec -T cli vendor/bin/phpcs || [ "${DREVOPS_CI_PHPCS_IGNORE_FAILURE:-0}" -eq 1 ]
Expand Down
11 changes: 7 additions & 4 deletions .docker/cli.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
#
# hadolint global ignore=DL3018
#
# @see https://hub.docker.com/r/uselagoon/php-8.2-cli-drupal/tags
# @see https://hub.docker.com/r/uselagoon/php-8.3-cli-drupal/tags
# @see https://github.com/uselagoon/lagoon-images/tree/main/images/php-cli-drupal
FROM uselagoon/php-8.2-cli-drupal:24.5.0
FROM uselagoon/php-8.3-cli-drupal:24.7.0

# Add missing variables.
# @todo Remove once https://github.com/uselagoon/lagoon/issues/3121 is resolved.
Expand All @@ -30,6 +30,9 @@ ENV DRUPAL_PRIVATE_FILES=${DRUPAL_PRIVATE_FILES}
ARG DRUPAL_TEMPORARY_FILES="${TMP:-/tmp}"
ENV DRUPAL_TEMPORARY_FILES=${DRUPAL_TEMPORARY_FILES}

ARG DRUPAL_CONFIG_PATH="/app/config/default"
ENV DRUPAL_CONFIG_PATH=${DRUPAL_CONFIG_PATH}

# Set default values for environment variables.
# These values will be overridden if set in docker-compose.yml or .env file
# during build stage.
Expand Down Expand Up @@ -95,8 +98,8 @@ RUN npm --prefix /app/${WEBROOT}/themes/custom/your_site_theme ci --no-audit --n
COPY . /app

# Create files directories and set correct permissions.
RUN mkdir -p "${DRUPAL_PUBLIC_FILES}" "${DRUPAL_PRIVATE_FILES}" "${DRUPAL_TEMPORARY_FILES}" && \
chmod 0770 "${DRUPAL_PUBLIC_FILES}" "${DRUPAL_PRIVATE_FILES}" "${DRUPAL_TEMPORARY_FILES}"
RUN mkdir -p "${DRUPAL_PUBLIC_FILES}" "${DRUPAL_PRIVATE_FILES}" "${DRUPAL_TEMPORARY_FILES}" "${DRUPAL_CONFIG_PATH}" && \
chmod 0770 "${DRUPAL_PUBLIC_FILES}" "${DRUPAL_PRIVATE_FILES}" "${DRUPAL_TEMPORARY_FILES}" "${DRUPAL_CONFIG_PATH}"

# Compile front-end assets. Running this after copying all files as we need
# sources to compile assets.
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-10.11-drupal:24.5.0
ARG IMAGE=uselagoon/mariadb-10.11-drupal:24.7.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 @@ -9,7 +9,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:24.5.0
FROM uselagoon/nginx-drupal:24.7.0

# Webroot is used for Nginx docroot configuration.
ARG WEBROOT=web
Expand Down
4 changes: 2 additions & 2 deletions .docker/php.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ ARG CLI_IMAGE
# hadolint ignore=DL3006
FROM ${CLI_IMAGE:-cli} as cli

# @see https://hub.docker.com/r/uselagoon/php-8.2-fpm/tags
# @see https://hub.docker.com/r/uselagoon/php-8.3-fpm/tags
# @see https://github.com/uselagoon/lagoon-images/tree/main/images/php-fpm
FROM uselagoon/php-8.2-fpm:24.5.0
FROM uselagoon/php-8.3-fpm:24.7.0

RUN apk add --no-cache tzdata

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-8/tags
# @see https://github.com/uselagoon/lagoon-images/blob/main/images/solr/8.Dockerfile
FROM uselagoon/solr-8:24.5.0
FROM uselagoon/solr-8:24.7.0

# Solr Jump-start config needs to be manually copied from search_api_solr module
# /app/docroot/modules/contrib/search_api_solr/jump-start/solr8/config-set.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/assign-author.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:

steps:
- name: Assign author
uses: toshimaru/[email protected].0
uses: toshimaru/[email protected].1
4 changes: 3 additions & 1 deletion .github/workflows/close-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ jobs:
--header "X-GitHub-Delivery: ${RUNNER_TRACKING_ID:7}" \
--header "X-GitHub-Event: pull_request" \
--data-binary @- \
"${LAGOON_WEBHOOK_ENDPOINT-https://hooks.lagoon.amazeeio.cloud/}"
"${LAGOON_WEBHOOK_ENDPOINT:-https://hooks.lagoon.amazeeio.cloud/}"
env:
LAGOON_WEBHOOK_ENDPOINT: ${{ env.LAGOON_WEBHOOK_ENDPOINT }}
6 changes: 6 additions & 0 deletions .scaffold/docs/.utils/variables/extra/ci.variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ DREVOPS_EXPORT_DB_CONTAINER_REGISTRY_DEPLOY_PROCEED=
# Directory to store exported code.
DREVOPS_EXPORT_CODE_DIR=

# Ignore Hadolint failures.
DREVOPS_CI_HADOLINT_IGNORE_FAILURE=0

# Ignore `composer validate` failures.
DREVOPS_CI_COMPOSER_VALIDATE_IGNORE_FAILURE=0

# Ignore PHPCS failures.
DREVOPS_CI_PHPCS_IGNORE_FAILURE=0

Expand Down
16 changes: 16 additions & 0 deletions .scaffold/docs/content/workflows/variables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,22 @@ Default value: `UNDEFINED`

Defined in: `CI config`

### `DREVOPS_CI_COMPOSER_VALIDATE_IGNORE_FAILURE`

Ignore `composer validate` failures.

Default value: `UNDEFINED`

Defined in: `CI config`

### `DREVOPS_CI_HADOLINT_IGNORE_FAILURE`

Ignore Hadolint failures.

Default value: `UNDEFINED`

Defined in: `CI config`

### `DREVOPS_CI_NPM_LINT_IGNORE_FAILURE`

Ignore NPM linters failures.
Expand Down
8 changes: 8 additions & 0 deletions .scaffold/tests/bats/fixtures/docker-compose.env.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down Expand Up @@ -70,6 +71,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down Expand Up @@ -118,6 +120,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down Expand Up @@ -173,6 +176,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down Expand Up @@ -209,6 +213,7 @@
"build": {
"args": {
"CLI_IMAGE": "star_wars",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_TEMPORARY_FILES": "/tmp",
Expand All @@ -228,6 +233,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down Expand Up @@ -290,6 +296,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down Expand Up @@ -362,6 +369,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down
8 changes: 8 additions & 0 deletions .scaffold/tests/bats/fixtures/docker-compose.env_local.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down Expand Up @@ -70,6 +71,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down Expand Up @@ -118,6 +120,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down Expand Up @@ -173,6 +176,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down Expand Up @@ -209,6 +213,7 @@
"build": {
"args": {
"CLI_IMAGE": "star_wars",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_TEMPORARY_FILES": "/tmp",
Expand All @@ -228,6 +233,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down Expand Up @@ -290,6 +296,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down Expand Up @@ -362,6 +369,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down
12 changes: 10 additions & 2 deletions .scaffold/tests/bats/fixtures/docker-compose.env_mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "the_matrix.docker.amazee.io",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "1",
Expand Down Expand Up @@ -70,6 +71,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "the_matrix.docker.amazee.io",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "1",
Expand Down Expand Up @@ -118,6 +120,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "the_matrix.docker.amazee.io",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "1",
Expand Down Expand Up @@ -173,6 +176,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "the_matrix.docker.amazee.io",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "1",
Expand Down Expand Up @@ -209,8 +213,9 @@
"build": {
"args": {
"CLI_IMAGE": "the_matrix",
"DRUPAL_PRIVATE_FILES": "/app/docroot/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/docroot/sites/default/files",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_TEMPORARY_FILES": "/tmp",
"WEBROOT": "docroot"
},
Expand All @@ -228,6 +233,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "the_matrix.docker.amazee.io",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "1",
Expand Down Expand Up @@ -290,6 +296,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "the_matrix.docker.amazee.io",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "1",
Expand Down Expand Up @@ -362,6 +369,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "the_matrix.docker.amazee.io",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "1",
Expand Down
Loading

2 comments on commit e7cdd59

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.