Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
742f94a
Added CT D11 site install.
richardgaunt Sep 29, 2025
94f27f3
Updated recipe names, .env file for instructions.
richardgaunt Sep 29, 2025
ec1e97d
Added user dependency.
richardgaunt Sep 29, 2025
c304f62
Remove contrib recipes.
richardgaunt Sep 29, 2025
eb7cac8
Added composer to all recipes.
richardgaunt Sep 29, 2025
ab903c0
Added ahoy cmd to install either d11 or CMS.
richardgaunt Sep 29, 2025
37463b7
Added search module dependency.
richardgaunt Sep 29, 2025
05a1edc
Added job to test Drupal CMS installation.
richardgaunt Sep 29, 2025
8664c4a
Added back CT Drupal CMS block adjustments.
richardgaunt Sep 29, 2025
0de1159
Fix location of recipe for drush.
richardgaunt Sep 29, 2025
64ec668
Updated dockerfile to add recipes directory.
richardgaunt Sep 29, 2025
44a6190
Added note for quant provisioning script.
richardgaunt Sep 30, 2025
7db6489
Updated .dockerignore to not ignore recipes dir.
richardgaunt Sep 30, 2025
377ac37
Updated version of CMS.
richardgaunt Sep 30, 2025
f15cb28
Added lint fixes and updated recipe.
richardgaunt Sep 30, 2025
cdce8a0
Updated recipe for drupal cms.
richardgaunt Sep 30, 2025
7cdf859
Updated cms recipe, skipping generated content test.
richardgaunt Oct 1, 2025
3450387
Updated config for new version of modules.
richardgaunt Oct 3, 2025
a8e0d3a
Uninstall unwanted Drupal CMS modules.
richardgaunt Oct 3, 2025
c23d075
Update media setting to match CT requirement.
richardgaunt Oct 3, 2025
5c9c822
Updated setting from linkit update.
richardgaunt Oct 3, 2025
6da15d3
Fix behat tests.
richardgaunt Oct 3, 2025
be2d2da
Updated Media Config.
joshua-salsadigital Oct 6, 2025
3b38d0d
Updated Media Config.
joshua-salsadigital Oct 6, 2025
f5c6f26
Merge branch 'develop' into feature/add-site-install-recipes
joshua-salsadigital Oct 8, 2025
9e86511
Merge branch 'develop' into feature/add-site-install-recipes
joshua-salsadigital Oct 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .ahoy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ commands:
usage: Provision a site from the database dump or profile.
cmd: ahoy cli ./scripts/drevops/provision.sh

provision-cms:
usage: Provision a site with Drupal CMS profile.
cmd: ahoy cli "DRUPAL_VERSION=CMS DRUPAL_PROFILE=/app/recipes/drupal_cms_starter ./scripts/drevops/provision.sh"

Comment on lines +131 to +134
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

CMS recipe path likely incorrect; confirm preinstall sequencing to avoid layout bug

  • Path points to /app/recipes/drupal_cms_starter, but PR describes recipe as civictheme_drupal_cms_starter. Also, the helper recipe civictheme_drupal_cms_preinstall is required “to avoid a missing layout bug,” yet it isn’t invoked here.

Proposed fix (minimum path correction):

-    cmd: ahoy cli "DRUPAL_VERSION=CMS DRUPAL_PROFILE=/app/recipes/drupal_cms_starter ./scripts/drevops/provision.sh"
+    cmd: ahoy cli "DRUPAL_VERSION=CMS DRUPAL_PROFILE=/app/recipes/civictheme_drupal_cms_starter ./scripts/drevops/provision.sh"

If preinstall must run before the CMS starter, either:

  • encode that dependency inside the CMS starter recipe (preferred), or
  • introduce a dedicated Ahoy command that triggers both in sequence (only if provision.sh supports it), e.g. setting an env var that the script reads to install multiple recipes in order.

Quick checks:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Check expected recipe directories exist:"
for d in recipes/civictheme_drupal_cms_starter recipes/drupal_cms_starter recipes/civictheme_starter recipes/civictheme_drupal_cms_preinstall; do
  if [ -d "$d" ]; then echo "FOUND: $d"; else echo "MISSING: $d"; fi
done

echo
echo "Inspect provision.sh for accepted DRUPAL_VERSION values and recipe handling:"
rg -n --color=never '\bDRUPAL_VERSION\b' scripts/drevops/provision.sh || true
rg -n --color=never '\bCMS\b' scripts/drevops/provision.sh || true
rg -n --color=never '\bDRUPAL_PROFILE\b' scripts/drevops/provision.sh || true

Length of output: 516


Fix CMS recipe path and invoke preinstall step

  • In .ahoy.yml (lines 131–134), update the profile path:
- DRUPAL_PROFILE=/app/recipes/drupal_cms_starter
+ DRUPAL_PROFILE=/app/recipes/civictheme_drupal_cms_starter
  • Ensure civictheme_drupal_cms_preinstall runs before the CMS starter—either embed it in the starter recipe or add an Ahoy command that runs both in sequence.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
provision-cms:
usage: Provision a site with Drupal CMS profile.
cmd: ahoy cli "DRUPAL_VERSION=CMS DRUPAL_PROFILE=/app/recipes/drupal_cms_starter ./scripts/drevops/provision.sh"
provision-cms:
usage: Provision a site with Drupal CMS profile.
cmd: ahoy cli "DRUPAL_VERSION=CMS DRUPAL_PROFILE=/app/recipes/civictheme_drupal_cms_starter ./scripts/drevops/provision.sh"
🤖 Prompt for AI Agents
In .ahoy.yml around lines 131 to 134, the Drupal CMS profile path points to the
starter recipe only and does not run the required
civictheme_drupal_cms_preinstall step first; update the DRUPAL_PROFILE path to
the correct preinstall-aware profile (or ensure the starter recipe includes/refs
civictheme_drupal_cms_preinstall), and modify the provision-cms cmd to run the
preinstall step before the starter (either by embedding the preinstall into the
starter recipe or chaining commands so civictheme_drupal_cms_preinstall executes
prior to ./scripts/drevops/provision.sh).

provision-11:
usage: Provision a site with CivicTheme starter for Drupal 11.
cmd: ahoy cli "DRUPAL_PROFILE=/app/recipes/civictheme_starter DRUPAL_VERSION=11 ./scripts/drevops/provision.sh"
Comment on lines +135 to +137
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

🧩 Analysis chain

LGTM for Drupal 11 starter command

The command aligns with the civictheme_starter path and expected envs. Consider a quick sanity check that the recipe directory exists and provision.sh recognizes DRUPAL_VERSION=11.

Run:


🏁 Script executed:

#!/bin/bash
[ -d recipes/civictheme_starter ] && echo "FOUND: recipes/civictheme_starter" || echo "MISSING: recipes/civictheme_starter"
rg -n --color=never '\bDRUPAL_VERSION\b' scripts/drevops/provision.sh | rg -n --color=never '11|case|if' || true

Length of output: 33


Add Drupal 11 handling to provision.sh The recipes/civictheme_starter directory exists, but scripts/drevops/provision.sh doesn’t reference DRUPAL_VERSION; please implement explicit support for version 11.

🤖 Prompt for AI Agents
In .ahoy.yml around lines 135-137: the ahoy command exports DRUPAL_VERSION=11
but scripts/drevops/provision.sh doesn’t consume it; update provision.sh to read
the DRUPAL_VERSION env var (with a sensible default), add a branch/case for
version "11" that selects the correct recipe/profile path and any
Drupal_core/composer/drush flags needed for Drupal 11, and ensure downstream
commands (composer create/project, drush/site-install, or recipe copy) use that
chosen version/profile; validate the script exits with a clear error when an
unsupported DRUPAL_VERSION is provided.


export-db:
usage: Export database dump or database image (if DREVOPS_DB_DOCKER_IMAGE variable is set).
cmd: ./scripts/drevops/export-db.sh "$@"
Expand Down
20 changes: 20 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,13 @@ jobs:
DREVOPS_CI_DRUPAL_THEME_CONFIG_LINT_IGNORE_FAILURE: 1
DREVOPS_EXPORT_CODE_DIR: '/tmp/workspace/code_unused'
<<: *job-build
# Drupal CMS profile.
build-drupal-cms:
<<: *runner_config
environment:
DRUPAL_VERSION: CMS
DRUPAL_PROFILE: ../recipes/drupal_cms_starter
<<: *job-build

# GovCMS profile, sub-theme. Longest test run.
build-govcms-subtheme:
Expand Down Expand Up @@ -625,6 +632,19 @@ workflows:
ignore: /^content\/.*/
tags:
only: /.*/
- build-drupal-cms:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

First go at testing Drupal CMS with CivicTheme

requires:
- build-isolated-php-82
- build-isolated-php-83
- build-isolated-php-83-legacy
- build-isolated-php-83-next
# - build-isolated-php-84
# - build-isolated-php-84-next
filters:
branches:
ignore: /^content\/.*/
tags:
only: /.*/
- build-govcms-subtheme:
requires:
- build-isolated-php-82
Expand Down
3 changes: 2 additions & 1 deletion .docker/cli.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ RUN curl -L -o shipshape "https://github.com/salsadigitalauorg/shipshape/release
# Install updated version of NPM.
RUN npm install -g npm@^8.6 && fix-permissions /home/.npm

# Adding patches and scripts.
# Adding recipes, patches and scripts.
COPY recipes /app/recipes
COPY patches /app/patches
COPY scripts /app/scripts

Expand Down
3 changes: 2 additions & 1 deletion .docker/cli.onlytheme.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ RUN curl -L -o shipshape "https://github.com/salsadigitalauorg/shipshape/release
# Install updated version of NPM.
RUN npm install -g npm@^8.6 && fix-permissions /home/.npm

# Adding patches and scripts.
# Adding recipes, patches and scripts.
COPY recipes /app/recipes
COPY patches /app/patches
COPY scripts /app/scripts

Expand Down
3 changes: 2 additions & 1 deletion .docker/cli.sibling.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ RUN curl -L -o shipshape "https://github.com/salsadigitalauorg/shipshape/release
# Install updated version of NPM.
RUN npm install -g npm@^8.6 && fix-permissions /home/.npm

# Adding patches and scripts.
# Adding recipes, patches and scripts.
COPY recipes /app/recipes
COPY patches /app/patches
COPY scripts /app/scripts

Expand Down
1 change: 1 addition & 0 deletions .docker/entrypoints/cli/03-provision-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ set -e
# DrevOps provision script is not compatible with Quant Cloud because it relies
# on Lagoon-specific tooling (e.g., rsync to Lagoon SSH).
if [ -x "./scripts/quant/provision-quant.sh" ]; then
echo "Using Quant Provisioning script"
./scripts/quant/provision-quant.sh
else
echo "Quant provisioning script missing or not executable." >&2
Expand Down
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ node_modules
!package-lock.json
!patches
!scripts
!recipes
!.lagoon.env.*
12 changes: 11 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,18 @@ DREVOPS_TZ="Australia/Melbourne"
# DRUPAL #
################################################################################

# Drupal Version can be either:
# DRUPAL_VERSION=CMS
# DRUPAL_VERSION=11
DRUPAL_VERSION=11

# Drupal profile name (used only when installing from profile).
DRUPAL_PROFILE=minimal
# Supports two profiles:
# D11
# DRUPAL_PROFILE=/app/recipes/civictheme_starter
# Drupal CMS
# DRUPAL_PROFILE=/app/recipes/drupal_cms_starter
DRUPAL_PROFILE=/app/recipes/civictheme_starter

# Drupal theme name.
DRUPAL_THEME=civictheme
Expand Down
15 changes: 15 additions & 0 deletions .env.local.default
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@
# Set this variable to "1" to skip the wait.
# AHOY_CONFIRM_WAIT_SKIP=1

# CivicTheme Important Installation settings

# Drupal Version can be either:
# DRUPAL_VERSION=CMS
# DRUPAL_VERSION=11
DRUPAL_VERSION=11

# Drupal profile name (used only when installing from profile).
# Supports two profiles:
# D11
# DRUPAL_PROFILE=/app/recipes/civictheme_starter
# If the version is Drupal CMS then Drupal profie should be:
# DRUPAL_PROFILE=/app/recipes/recipes/drupal_cms_starter
DRUPAL_PROFILE=/app/recipes/civictheme_starter

# Always override DB.
DREVOPS_PROVISION_OVERRIDE_DB=1

Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,10 @@ docker-compose.override.yml

# Build artifacts for twig linter.
.twig-cs-fixer.cache

# Ignore recipes directory except specific subdirectories
/recipes/*
!/recipes/civictheme_content_generated_static/
!/recipes/civictheme_drupal_cms_preinstall/
!/recipes/civictheme_drupal_cms_starter/
!/recipes/civictheme_starter/
Comment on lines +66 to +71
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

🧩 Analysis chain

Patterns/order look correct; verify behavior on real paths.

The anchored ignore and explicit exceptions for recipe subdirs are sound. Recommend verifying with git to ensure only the intended paths are tracked.

Run:


🏁 Script executed:

#!/bin/bash
# List files under recipes and show which ones are ignored vs tracked.
fd -H . recipes -t f -0 | xargs -0 -I{} bash -lc 'git check-ignore -v "{}" || echo "TRACKED: {}"'

Length of output: 51807


Remove tracked recipe files from index and adjust ignore patterns
.gitignore entries correctly ignore /recipes/* and unignore the four subdirectories, but existing files remain tracked and children aren’t re‐included by the current exceptions. To apply the ignore rules:

  • Run git rm -r --cached recipes to untrack all recipe files.
  • Commit the updated .gitignore.
  • Add back only desired directories, e.g. include content by changing
    !/recipes/civictheme_content_generated_static/
    to
    !/recipes/civictheme_content_generated_static/**
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Ignore recipes directory except specific subdirectories
/recipes/*
!/recipes/civictheme_content_generated_static/
!/recipes/civictheme_drupal_cms_preinstall/
!/recipes/civictheme_drupal_cms_starter/
!/recipes/civictheme_starter/
# Ignore recipes directory except specific subdirectories
/recipes/*
!/recipes/civictheme_content_generated_static/**
!/recipes/civictheme_drupal_cms_preinstall/
!/recipes/civictheme_drupal_cms_starter/
!/recipes/civictheme_starter/
🤖 Prompt for AI Agents
.gitignore around lines 66 to 71: the repository currently has /recipes/*
ignored with exceptions for four subdirectories, but files under recipes are
already tracked so the ignore rules have no effect and the current exceptions
don't re-include children; to fix, remove tracked recipe files from the index
(untrack the whole recipes tree), commit the updated .gitignore, then re-add
only the desired directories or files you want tracked (or adjust the exceptions
to re-include children explicitly) so Git tracks only those allowed subpaths.

5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"composer/installers": "^2.1",
"cweagans/composer-patches": "^1.7",
"drupal/admin_toolbar": "^3.6",
"drupal/cms": "^1.2.5",
"drupal/components": "^3.1",
"drupal/core-composer-scaffold": "^11",
"drupal/core-project-message": "^11",
Expand Down Expand Up @@ -97,7 +98,9 @@
"phpstan/extension-installer": true,
"pyrech/composer-changelogs": true,
"tbachert/spi": true,
"wikimedia/composer-merge-plugin": true
"wikimedia/composer-merge-plugin": true,
"drupal/core-vendor-hardening": true,
"drupal/core-recipe-unpack": true
},
"platform": {
"php": "8.3.8"
Expand Down
Loading