Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
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
3 changes: 3 additions & 0 deletions .docker/cli.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,6 @@ RUN cd /app/web/themes/contrib/civictheme \
RUN npm --prefix web/themes/custom/civictheme_demo install --no-audit --no-progress --unsafe-perm \
&& cd /app/web/themes/custom/civictheme_demo && npm run build
COPY .docker/entrypoints/cli/* /quant-entrypoint.d/

# Custom PHP configuration.
COPY .docker/config/php/*.ini /usr/local/etc/php/conf.d/
2 changes: 2 additions & 0 deletions .docker/config/php/zzz-memory.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
; Custom PHP memory limit
memory_limit = 768M
40 changes: 0 additions & 40 deletions .docker/entrypoints/cli/03-provision-site.sh

This file was deleted.

25 changes: 25 additions & 0 deletions .docker/entrypoints/cli/04-provision-site.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh
set -e

# Post-rollout task: Provision site
# Generated from .lagoon.yml

if [ "$LAGOON_ENVIRONMENT_TYPE" = "production" ] || [ "$LAGOON_GIT_BRANCH" = "${DREVOPS_LAGOON_PRODUCTION_BRANCH:-main}" ]; then
echo "==> Running in PRODUCTION environment."
# Never unblock admin user in production.
export DRUPAL_UNBLOCK_ADMIN=0
# Never sanitize DB in production.
export DREVOPS_PROVISION_SANITIZE_DB_SKIP=1
fi
#
# Deployments from UI are not able to bypass the value of
# DREVOPS_PROVISION_OVERRIDE_DB set by the deploy-lagoon.sh
# during previous deployments (it sets value to '0' to mitigate Lagoon bug
# where environment variables cannot be deleted and have to be set to a value).
# @see https://github.com/uselagoon/lagoon/issues/1922
# Explicitly set DB overwrite flag to the value from .env file for
# deployments from the profile.
if [ "${DREVOPS_PROVISION_USE_PROFILE}" = "1" ]; then
export DREVOPS_PROVISION_OVERRIDE_DB="$(cat .env | grep ^DREVOPS_PROVISION_OVERRIDE_DB | cut -c31-)"
fi
./scripts/drevops/provision.sh
46 changes: 11 additions & 35 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ name: Build and Push civictheme-monorepo-drupal to Quant Cloud
- release/*
- hotfix/*
- feature/editorial-*
- project/quant-provision
tags:
- '*'

Expand Down Expand Up @@ -37,28 +38,18 @@ jobs:
quant_application: civictheme-monorepo-drupal
master_branch_override: main

- name: Override outputs for quant-cloud-migration branch
- name: Override outputs for special branches
id: override-outputs
run: |-
# Override outputs for quant-cloud-migration branch to treat it as production
if [[ "${{ github.ref }}" == "refs/heads/quant-cloud-migration" ]]; then
echo "image_suffix=-latest" >> $GITHUB_OUTPUT
echo "image_suffix_clean=latest" >> $GITHUB_OUTPUT
echo "is_production=true" >> $GITHUB_OUTPUT
echo "environment_name=production" >> $GITHUB_OUTPUT
echo "environment_exists=true" >> $GITHUB_OUTPUT
echo "Overriding outputs for quant-cloud-migration branch: using -latest suffix and production environment"
else
# Use the original action outputs
echo "image_suffix=${{ steps.init.outputs.image_suffix }}" >> $GITHUB_OUTPUT
# Remove leading hyphen from image_suffix for image_suffix parameter
suffix="${{ steps.init.outputs.image_suffix }}"
clean_suffix="${suffix#-}"
echo "image_suffix_clean=$clean_suffix" >> $GITHUB_OUTPUT
echo "is_production=${{ steps.init.outputs.is_production }}" >> $GITHUB_OUTPUT
echo "environment_name=${{ steps.init.outputs.environment_name }}" >> $GITHUB_OUTPUT
echo "environment_exists=${{ steps.init.outputs.environment_exists }}" >> $GITHUB_OUTPUT
fi
echo "image_suffix=${{ steps.init.outputs.image_suffix }}" >> $GITHUB_OUTPUT
# Remove leading hyphen from image_suffix for image_suffix parameter
suffix="${{ steps.init.outputs.image_suffix }}"
clean_suffix="${suffix#-}"
echo "image_suffix_clean=$clean_suffix" >> $GITHUB_OUTPUT
echo "is_production=${{ steps.init.outputs.is_production }}" >> $GITHUB_OUTPUT
echo "environment_name=${{ steps.init.outputs.environment_name }}" >> $GITHUB_OUTPUT
echo "environment_exists=${{ steps.init.outputs.environment_exists }}" >> $GITHUB_OUTPUT


- name: Build and push cli image
uses: docker/build-push-action@v5
Expand Down Expand Up @@ -119,21 +110,6 @@ jobs:
from_environment: production
image_suffix: ${{ steps.override-outputs.outputs.image_suffix_clean }}

- name: Sync database from production to new environment
if: ${{ !startsWith(github.ref, 'refs/tags/') && steps.override-outputs.outputs.environment_exists == 'false' && steps.override-outputs.outputs.environment_name
!= 'production' }}
uses: quantcdn/[email protected]
with:
api_key: ${{ secrets.QUANT_API_KEY }}
organization: ${{ secrets.QUANT_ORGANIZATION }}
app_name: ${{ steps.init.outputs.quant_application }}
environment_name: ${{ steps.override-outputs.outputs.environment_name }}
source: production
type: database
wait: true
wait_interval: 10
max_retries: 30

- name: Redeploy existing environment
if: ${{ !startsWith(github.ref, 'refs/tags/') && steps.override-outputs.outputs.environment_exists == 'true' }}
uses: quantcdn/quant-cloud-environment-state-action@v1
Expand Down
3 changes: 0 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,6 @@
"drupal/sdc_devel": {
"Change visibility of the rules constants in TwigValidatorRulePluginBase - https://www.drupal.org/project/sdc_devel/issues/3517321": "./patches/modules/sdc_devel/3517321--updated-visibility-of-rule-constants.patch",
"Remove check for use of default filter in boolean filter": "./patches/modules/sdc_devel/remove-boolean-filter-default.patch"
},
"drupal/simple_sitemap": {
"Error on installing / enabling simple_sitemap in D11: https://www.drupal.org/project/simple_sitemap/issues/3507718": "./patches/modules/simple_sitemap/fix-error-on-install.patch"
}
},
"preserve-paths": [
Expand Down
18 changes: 9 additions & 9 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading