Skip to content

Commit

Permalink
Merge branch 'release/1.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed Feb 15, 2023
2 parents afbd521 + 5eb9c4e commit cf9fde0
Show file tree
Hide file tree
Showing 862 changed files with 16,748 additions and 19,354 deletions.
17 changes: 11 additions & 6 deletions .ahoy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ commands:
-e DREVOPS_DRUPAL_INSTALL_OPERATIONS_SKIP=${DREVOPS_DRUPAL_INSTALL_OPERATIONS_SKIP:-} \
-e DREVOPS_DRUPAL_INSTALL_OVERRIDE_EXISTING_DB=${DREVOPS_DRUPAL_INSTALL_OVERRIDE_EXISTING_DB:-0} \
-e DREVOPS_DRUPAL_PROFILE=${DREVOPS_DRUPAL_PROFILE:-standard} \
-e SKIP_SUBTHEME_ACTIVATION=${SKIP_SUBTHEME_ACTIVATION:-0} \
-e SKIP_SUBTHEME_FE=${SKIP_SUBTHEME_FE:-} \
-e SKIP_GENERATED_CONTENT_CREATE=${SKIP_GENERATED_CONTENT_CREATE:-} \
-e CIVICTHEME_SKIP_SUBTHEME_ACTIVATION=${CIVICTHEME_SKIP_SUBTHEME_ACTIVATION:-0} \
-e CIVICTHEME_SKIP_SUBTHEME_FE=${CIVICTHEME_SKIP_SUBTHEME_FE:-} \
-e CIVICTHEME_SKIP_GENERATED_CONTENT_CREATE=${CIVICTHEME_SKIP_GENERATED_CONTENT_CREATE:-} \
-e CIVICTHEME_CONTENT_PROFILE=${CIVICTHEME_CONTENT_PROFILE:-} \
-T cli ./scripts/drevops/drupal-install-site.sh
Expand Down Expand Up @@ -147,13 +147,13 @@ commands:
fei:
usage: Install front-end assets.
cmd: |
[ "${SKIP_LIBRARY_INSTALL}" != "1" ] && ahoy cli "npm --prefix docroot/themes/contrib/${DREVOPS_DRUPAL_THEME}/civictheme_library install"
[ "${CIVICTHEME_SKIP_LIBRARY_INSTALL}" != "1" ] && ahoy cli "npm --prefix docroot/themes/contrib/${DREVOPS_DRUPAL_THEME}/civictheme_library install"
ahoy cli "npm --prefix docroot/themes/contrib/${DREVOPS_DRUPAL_THEME} install"
fe:
usage: Build front-end assets.
cmd: |
[ "${SKIP_LIBRARY_INSTALL}" != "1" ] && ahoy cli "cd docroot/themes/contrib/${DREVOPS_DRUPAL_THEME}/civictheme_library && npm run build"
[ "${CIVICTHEME_SKIP_LIBRARY_INSTALL}" != "1" ] && ahoy cli "cd docroot/themes/contrib/${DREVOPS_DRUPAL_THEME}/civictheme_library && npm run build"
ahoy cli "cd docroot/themes/contrib/${DREVOPS_DRUPAL_THEME} && npm run build"
lint:
Expand All @@ -176,6 +176,10 @@ commands:
usage: Run all tests.
cmd: ahoy test-unit && ahoy test-kernel && ahoy test-functional && ahoy test-bdd

test-fe:
usage: Run front-end tests.
cmd: ahoy cli "DREVOPS_TEST_TYPE=fe DREVOPS_TEST_REPORTS_DIR=${DREVOPS_TEST_REPORTS_DIR} ./scripts/drevops/test.sh $@"

test-unit:
usage: Run PhpUnit unit tests.
cmd: ahoy cli "DREVOPS_TEST_TYPE=unit DREVOPS_TEST_REPORTS_DIR=${DREVOPS_TEST_REPORTS_DIR} ./scripts/drevops/test.sh $@"
Expand Down Expand Up @@ -205,7 +209,8 @@ commands:
usage: Export theme config.
cmd: |
ahoy cli "./scripts/update-theme-config.sh"
ahoy drush cde civictheme_dev
ahoy drush cde civictheme_dev || true
ahoy drush cde cs_generated_content || true
export-content:
usage: Export content (run with CIVICTHEME_CONTENT_PROFILE=corporate ahoy install-site) .
Expand Down
40 changes: 20 additions & 20 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,28 @@ aliases:
# Generate a separate SSH key for a user who has push permissions to
# $DREVOPS_DEPLOY_ARTIFACT_GIT_REMOTE repo with `ssh-keygen -m PEM -t rsa -C "[email protected]"
# command and add private key under "SSH Permissions" in CircleCI UI.
- &deploy_ssh_fingerprint "4e:82:39:4a:52:0e:ae:a9:ef:c1:19:56:46:21:fd:7f"
- &deploy_ssh_fingerprint "bc:87:4a:74:cf:e0:02:4e:34:aa:16:b5:c3:6f:89:cd"

# SSH key fingerprint to deploy code to civictheme.
- &deploy_ssh_fingerprint1 "4e:82:39:4a:52:0e:ae:a9:ef:c1:19:56:46:21:fd:7f"
- &deploy_ssh_fingerprint1 "b7:05:38:98:47:28:c7:1f:d8:6d:7a:75:3c:13:5b:af"

# SSH key fingerprint to deploy code to civictheme_library.
- &deploy_ssh_fingerprint2 "aa:01:7b:73:2c:a8:cb:e6:d2:1a:12:c0:e1:53:39:f2"
- &deploy_ssh_fingerprint2 "12:06:0e:75:93:10:3b:b4:59:fe:11:75:11:22:20:dd"

# SSH key fingerprint to deploy code to civictheme_govcms.
- &deploy_ssh_fingerprint3 "ee:42:65:bf:d7:2d:10:f4:53:17:ab:ed:d7:6a:99:84"
- &deploy_ssh_fingerprint3 "a9:33:24:68:20:f9:91:24:b8:38:c5:f3:b6:4b:34:5d"

# SSH key fingerprint to deploy code to civictheme_content.
- &deploy_ssh_fingerprint4 "ef:1c:ad:2a:dd:ec:0c:cd:1a:63:4c:bb:8a:d7:c1:b7"
- &deploy_ssh_fingerprint4 "a3:41:d1:47:85:4c:5d:12:9c:4c:1f:a2:67:d3:a5:3f"

# SSH key fingerprint to deploy code to civictheme_admin.
- &deploy_ssh_fingerprint5 "a8:ac:6a:dc:6c:af:fd:a3:82:3d:12:06:20:ec:5a:f9"
- &deploy_ssh_fingerprint5 "ab:76:65:9f:76:02:c2:b9:2a:bc:81:db:a0:c6:37:59"

# SSH key fingerprint to deploy code to civictheme_migrate.
- &deploy_ssh_fingerprint6 "58:a5:e8:af:8c:3f:c8:5d:f8:a0:58:03:07:81:73:cf"
- &deploy_ssh_fingerprint6 "2b:61:1c:7c:d1:f8:9b:63:dc:a7:10:c1:d6:0a:4f:b8"

# SSH key fingerprint to mirror code.
- &git_mirror_ssh_fingerprint "75:84:c7:7a:3a:f8:39:5b:af:ef:d8:48:7d:65:6a:fa"
- &git_mirror_ssh_fingerprint "88:48:44:13:07:7a:a7:da:8c:fb:5e:a7:62:45:73:c4"

#-----------------------------------------------------------------------------
# Optional variables.
Expand Down Expand Up @@ -133,8 +133,8 @@ aliases:
# Remove lines containing '###' and uncomment comments starting with '##'.
sed -i -e "/###/d" docker-compose.yml && sed -i -e "s/##//" docker-compose.yml
# Alter build for an alternative build setup.
[ "$CIVICTHEME_INSTALL_SIBLING" = "1" ] && cp -f .docker/Dockerfile.cli.sibling .docker/Dockerfile.cli || true
[ "$SKIP_LIBRARY_INSTALL" = "1" ] && cp -f .docker/Dockerfile.cli.onlytheme .docker/Dockerfile.cli || true
if [ "$CIVICTHEME_INSTALL_SIBLING" = "1" ]; then cp -f .docker/Dockerfile.cli.sibling .docker/Dockerfile.cli; fi
if [ "$CIVICTHEME_SKIP_LIBRARY_INSTALL" = "1" ]; then cp -f .docker/Dockerfile.cli.onlytheme .docker/Dockerfile.cli; fi
################################################################################
# JOBS
Expand Down Expand Up @@ -272,8 +272,8 @@ jobs:
environment:
DREVOPS_DRUPAL_PROFILE: minimal
CIVICTHEME_CONTENT_PROFILE: corporate
SKIP_SUBTHEME_ACTIVATION: 1
SKIP_LIBRARY_INSTALL: 1
CIVICTHEME_SKIP_SUBTHEME_ACTIVATION: 1
CIVICTHEME_SKIP_LIBRARY_INSTALL: 1
DREVOPS_TEST_BEHAT_TAGS: smoke
<<: *job-build-no-persist

Expand All @@ -283,8 +283,8 @@ jobs:
environment:
DREVOPS_DRUPAL_PROFILE: minimal
CIVICTHEME_CONTENT_PROFILE: highereducation
SKIP_SUBTHEME_ACTIVATION: 1
SKIP_LIBRARY_INSTALL: 1
CIVICTHEME_SKIP_SUBTHEME_ACTIVATION: 1
CIVICTHEME_SKIP_LIBRARY_INSTALL: 1
DREVOPS_TEST_BEHAT_TAGS: smoke
<<: *job-build-no-persist

Expand All @@ -294,8 +294,8 @@ jobs:
environment:
DREVOPS_DRUPAL_PROFILE: minimal
CIVICTHEME_CONTENT_PROFILE: government
SKIP_SUBTHEME_ACTIVATION: 1
SKIP_LIBRARY_INSTALL: 1
CIVICTHEME_SKIP_SUBTHEME_ACTIVATION: 1
CIVICTHEME_SKIP_LIBRARY_INSTALL: 1
DREVOPS_TEST_BEHAT_TAGS: smoke
<<: *job-build-no-persist

Expand All @@ -321,8 +321,8 @@ jobs:
<<: *container_config
environment:
DREVOPS_DRUPAL_PROFILE: govcms
SKIP_SUBTHEME_ACTIVATION: 1
SKIP_LIBRARY_INSTALL: 1
CIVICTHEME_SKIP_SUBTHEME_ACTIVATION: 1
CIVICTHEME_SKIP_LIBRARY_INSTALL: 1
<<: *job-build

# Drupal 10, minimal profile.
Expand All @@ -340,8 +340,8 @@ jobs:
environment:
DREVOPS_DRUPAL_PROFILE: minimal
DREVOPS_DRUPAL_VERSION: 10
SKIP_SUBTHEME_ACTIVATION: 1
SKIP_LIBRARY_INSTALL: 1
CIVICTHEME_SKIP_SUBTHEME_ACTIVATION: 1
CIVICTHEME_SKIP_LIBRARY_INSTALL: 1
<<: *job-build-no-persist

# Mirror and redeploy content profiles.
Expand Down
8 changes: 5 additions & 3 deletions .docker/Dockerfile.cli
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
#
# All CLI operations performed in this container.
#
# - Installs Composer dependencies
# - Installs CivicTheme Library dependencies and builds assets
# - Installs CivicTheme dependencies and builds assets
# - Creates sub-theme, installs dependencies and builds assets
#
# @see https://hub.docker.com/r/uselagoon/php-7.4-cli-drupal/tags
# @see https://github.com/uselagoon/lagoon-images/tree/main/images/php-cli-drupal
FROM uselagoon/php-8.1-cli-drupal:22.8.0
Expand Down Expand Up @@ -53,13 +58,11 @@ COPY patches /app/patches
COPY scripts /app/scripts

RUN mkdir -p docroot/themes/contrib/civictheme \
&& mkdir -p docroot/themes/contrib/civictheme \
&& mkdir -p docroot/modules/custom/civictheme_govcms \
&& mkdir -p docroot/modules/custom/civictheme_admin \
&& mkdir -p docroot/modules/custom/civictheme_migrate \
&& mkdir -p docroot/modules/custom/civictheme_content \
&& mkdir -p docroot/modules/custom/civictheme_dev \
&& mkdir -p docroot/modules/custom/civictheme_styleguide \
&& mkdir -p docroot/modules/custom/cs_generated_content

# Copy files required for PHP dependencies resolution.
Expand All @@ -77,7 +80,6 @@ COPY docroot/modules/custom/civictheme_admin/composer.json docroot/modules/custo
COPY docroot/modules/custom/civictheme_migrate/composer.json docroot/modules/custom/civictheme_migrate/
COPY docroot/modules/custom/civictheme_content/composer.json docroot/modules/custom/civictheme_content/
COPY docroot/modules/custom/civictheme_dev/composer.json docroot/modules/custom/civictheme_dev/
COPY docroot/modules/custom/civictheme_styleguide/composer.json docroot/modules/custom/civictheme_styleguide/
COPY docroot/modules/custom/cs_generated_content/composer.json docroot/modules/custom/cs_generated_content/

# Install PHP dependencies, but without development dependencies. This is very
Expand Down
6 changes: 2 additions & 4 deletions .docker/Dockerfile.cli.onlytheme
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
#
# Not used in Lagoon.
#
# All CLI operations performed in this container.
# - Installs Composer dependencies
# - Installs CivicTheme dependencies and builds assets
#
# @see https://hub.docker.com/r/uselagoon/php-7.4-cli-drupal/tags
# @see https://github.com/uselagoon/lagoon-images/tree/main/images/php-cli-drupal
Expand Down Expand Up @@ -56,13 +57,11 @@ COPY patches /app/patches
COPY scripts /app/scripts

RUN mkdir -p docroot/themes/contrib/civictheme \
&& mkdir -p docroot/themes/contrib/civictheme \
&& mkdir -p docroot/modules/custom/civictheme_govcms \
&& mkdir -p docroot/modules/custom/civictheme_admin \
&& mkdir -p docroot/modules/custom/civictheme_migrate \
&& mkdir -p docroot/modules/custom/civictheme_content \
&& mkdir -p docroot/modules/custom/civictheme_dev \
&& mkdir -p docroot/modules/custom/civictheme_styleguide \
&& mkdir -p docroot/modules/custom/cs_generated_content

# Copy files required for PHP dependencies resolution.
Expand All @@ -80,7 +79,6 @@ COPY docroot/modules/custom/civictheme_admin/composer.json docroot/modules/custo
COPY docroot/modules/custom/civictheme_migrate/composer.json docroot/modules/custom/civictheme_migrate/
COPY docroot/modules/custom/civictheme_content/composer.json docroot/modules/custom/civictheme_content/
COPY docroot/modules/custom/civictheme_dev/composer.json docroot/modules/custom/civictheme_dev/
COPY docroot/modules/custom/civictheme_styleguide/composer.json docroot/modules/custom/civictheme_styleguide/
COPY docroot/modules/custom/cs_generated_content/composer.json docroot/modules/custom/cs_generated_content/

# Install PHP dependencies, but without development dependencies. This is very
Expand Down
8 changes: 4 additions & 4 deletions .docker/Dockerfile.cli.sibling
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
#
# Not used in Lagoon.
#
# All CLI operations performed in this container.
# - Installs Composer dependencies
# - Installs CivicTheme Library dependencies and builds assets
# - Installs CivicTheme dependencies and builds assets
# - Creates sub-theme as a sibling, installs dependencies and builds assets
#
# @see https://hub.docker.com/r/uselagoon/php-7.4-cli-drupal/tags
# @see https://github.com/uselagoon/lagoon-images/tree/main/images/php-cli-drupal
Expand Down Expand Up @@ -55,13 +58,11 @@ COPY patches /app/patches
COPY scripts /app/scripts

RUN mkdir -p docroot/themes/contrib/civictheme \
&& mkdir -p docroot/themes/contrib/civictheme \
&& mkdir -p docroot/modules/custom/civictheme_govcms \
&& mkdir -p docroot/modules/custom/civictheme_admin \
&& mkdir -p docroot/modules/custom/civictheme_migrate \
&& mkdir -p docroot/modules/custom/civictheme_content \
&& mkdir -p docroot/modules/custom/civictheme_dev \
&& mkdir -p docroot/modules/custom/civictheme_styleguide \
&& mkdir -p docroot/modules/custom/cs_generated_content

# Copy files required for PHP dependencies resolution.
Expand All @@ -79,7 +80,6 @@ COPY docroot/modules/custom/civictheme_admin/composer.json docroot/modules/custo
COPY docroot/modules/custom/civictheme_migrate/composer.json docroot/modules/custom/civictheme_migrate/
COPY docroot/modules/custom/civictheme_content/composer.json docroot/modules/custom/civictheme_content/
COPY docroot/modules/custom/civictheme_dev/composer.json docroot/modules/custom/civictheme_dev/
COPY docroot/modules/custom/civictheme_styleguide/composer.json docroot/modules/custom/civictheme_styleguide/
COPY docroot/modules/custom/cs_generated_content/composer.json docroot/modules/custom/cs_generated_content/

# Install PHP dependencies, but without development dependencies. This is very
Expand Down
6 changes: 5 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ DREVOPS_LINT_PHPLINT_TARGETS="docroot/modules/custom, docroot/themes/contrib/civ
DREVOPS_LINT_PHPCS_TARGETS="docroot/modules/custom, docroot/themes/contrib/civictheme, docroot/sites/default/settings.php, tests"

# PHPMD comma-separated list of targets.
DREVOPS_LINT_PHPMD_TARGETS="docroot/themes/contrib/civictheme"
# PHPMD is very limited on inclusion/exclusion so we are specifying exact PHP files for performance reasons.
DREVOPS_LINT_PHPMD_TARGETS="docroot/themes/contrib/civictheme/includes, docroot/themes/contrib/civictheme/src, docroot/themes/contrib/civictheme/civictheme_starter_kit, docroot/themes/contrib/civictheme/civictheme.api.php, docroot/themes/contrib/civictheme/civictheme.theme, docroot/themes/contrib/civictheme/civictheme_create_subtheme.php, docroot/themes/contrib/civictheme/theme-settings.php, docroot/themes/contrib/civictheme/theme-settings.provision.inc"
# PHPMD report format.
DREVOPS_LINT_PHPMD_FORMAT=text
# PHPMD rules.
Expand All @@ -126,6 +127,9 @@ DREVOPS_LINT_BE_ALLOW_FAILURE=0
# Allow FE code linting failures.
DREVOPS_LINT_FE_ALLOW_FAILURE=0

# Allow custom front-end tests failures.
DREVOPS_TEST_FE_ALLOW_FAILURE=0

# Allow custom Unit tests failures.
DREVOPS_TEST_UNIT_ALLOW_FAILURE=0

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/auto-label-conflict.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
- name: Check if PRs have conflicts
uses: eps1lon/actions-label-merge-conflict@releases/2.x
with:
dirtyLabel: "CONFLICT"
removeOnDirtyLabel: "Needs review"
dirtyLabel: "State: CONFLICT"
removeOnDirtyLabel: "State: Needs review"
repoToken: "${{ secrets.GITHUB_TOKEN }}"
20 changes: 20 additions & 0 deletions .github/workflows/storybook-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: 'Storybook Tests'
on: push
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16.x'
- name: Install dependencies
run: npm install
working-directory: docroot/themes/contrib/civictheme/civictheme_library
- name: Build Storybook
run: npm run build-storybook
working-directory: docroot/themes/contrib/civictheme/civictheme_library
- name: Run tests
run: npm run test
working-directory: docroot/themes/contrib/civictheme/civictheme_library
6 changes: 3 additions & 3 deletions .lagoon.env.content-corporate
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CIVICTHEME_CONTENT_PROFILE=corporate
SKIP_GENERATED_CONTENT_CREATE=1
SKIP_SUBTHEME_ACTIVATION=1
SKIP_LIBRARY_INSTALL=1
CIVICTHEME_SKIP_GENERATED_CONTENT_CREATE=1
CIVICTHEME_SKIP_SUBTHEME_ACTIVATION=1
CIVICTHEME_SKIP_LIBRARY_INSTALL=1
6 changes: 3 additions & 3 deletions .lagoon.env.content-government
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CIVICTHEME_CONTENT_PROFILE=government
SKIP_GENERATED_CONTENT_CREATE=1
SKIP_SUBTHEME_ACTIVATION=1
SKIP_LIBRARY_INSTALL=1
CIVICTHEME_SKIP_GENERATED_CONTENT_CREATE=1
CIVICTHEME_SKIP_SUBTHEME_ACTIVATION=1
CIVICTHEME_SKIP_LIBRARY_INSTALL=1
6 changes: 3 additions & 3 deletions .lagoon.env.content-highereducation
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CIVICTHEME_CONTENT_PROFILE=highereducation
SKIP_GENERATED_CONTENT_CREATE=1
SKIP_SUBTHEME_ACTIVATION=1
SKIP_LIBRARY_INSTALL=1
CIVICTHEME_SKIP_GENERATED_CONTENT_CREATE=1
CIVICTHEME_SKIP_SUBTHEME_ACTIVATION=1
CIVICTHEME_SKIP_LIBRARY_INSTALL=1
2 changes: 1 addition & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Note that wildcards are supported.
export CIVICTHEME_CONTENT_PROFILE=default

# Prepare content with a clean installation.
DREVOPS_DRUPAL_PROFILE=minimal SKIP_SUBTHEME_ACTIVATION=1 SKIP_GENERATED_CONTENT_CREATE=1 ahoy install-site
DREVOPS_DRUPAL_PROFILE=minimal CIVICTHEME_SKIP_SUBTHEME_ACTIVATION=1 CIVICTHEME_SKIP_GENERATED_CONTENT_CREATE=1 ahoy install-site

# Export content.
ahoy export-content
Expand Down
Loading

0 comments on commit cf9fde0

Please sign in to comment.