Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/2024 release 2 #427

Merged
merged 54 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
a85f08e
If no corrected on date, show published date for review/published dat…
anthonylindsay Aug 6, 2024
ee966b3
Merge pull request #407 from essexcountycouncil/202407_reviewdates_sh…
Polynya Aug 6, 2024
8a7c162
Merge branch 'develop' of github.com:essexcountycouncil/essex-intrane…
Polynya Aug 6, 2024
93be124
Merge pull request #406 from essexcountycouncil/main
Polynya Aug 6, 2024
4dad43f
feature(LP-82): LocalGov Publications module.
Polynya Aug 6, 2024
b8a3707
ECCI-0: Re-enabling the mirroring.
siliconmeadow Aug 7, 2024
026dbd4
ECCI-0: Update of the Github integration token in place.
siliconmeadow Aug 7, 2024
8b85967
ECCI-0: Another small update to try to trigger a pipeline.
siliconmeadow Aug 7, 2024
4c5c5d9
fix(LP-179): Empty robots.txt to allow X-Robots-Tag header to be disc…
Polynya Aug 8, 2024
b273104
Add replicate, replicate UI to composer
anthonylindsay Aug 19, 2024
1b80b70
Update composer lock for replicate
anthonylindsay Aug 19, 2024
2c1e1bf
Enable replicate, replicate ui
anthonylindsay Aug 19, 2024
36f32af
Allow authors, editors to replicate content
anthonylindsay Aug 19, 2024
23a32e4
Merge pull request #410 from essexcountycouncil/chore/fix-mirroring
Polynya Aug 20, 2024
0255b11
LP-179: fix merge.
Polynya Aug 20, 2024
34cd280
LP-118: Github workflows, Gitlab-ci tweaks.
Polynya Aug 20, 2024
912460d
LP-118: Github open_pr file format.
Polynya Aug 20, 2024
9f804f9
LP-118: Tweak open_pr
Polynya Aug 20, 2024
aa5366d
LP-118: Tweak open_pr
Polynya Aug 20, 2024
f87009a
LP-118: Tweak close_pr
Polynya Aug 28, 2024
74d5303
Merge branch 'develop' of github.com:essexcountycouncil/essex-intrane…
Polynya Aug 28, 2024
99060ba
LP-118: Fix health check url
Polynya Aug 28, 2024
fd68cdd
Merge pull request #416 from essexcountycouncil/feature/LP-118a
Polynya Sep 2, 2024
a7e24f0
Merge pull request #418 from essexcountycouncil/release/202408-01
Polynya Sep 2, 2024
1defa2c
Update comment.yml
Polynya Sep 2, 2024
f7ac45b
ECCW-699: Updates to facilitate the management of media files
nbrettell Sep 11, 2024
e6b0051
ECCW-699: Updating drupal with dependencies
nbrettell Sep 12, 2024
332dd2a
chore(): Update Drupal core, fix merge conflict.
Polynya Sep 16, 2024
a9b6949
Merge pull request #414 from essexcountycouncil/202408_replicate_LP_203
Polynya Sep 16, 2024
0fdfcfd
feat(LP-92): 202407 entityembed lp 92 (#413)
anthonylindsay Sep 16, 2024
f9d7438
feat(LP-119): 202408 formprotection lp 119 (#412)
anthonylindsay Sep 16, 2024
92911fd
Updated Gin theme to RC13 for compatibility with D10.3 (#422)
anthonylindsay Sep 17, 2024
9aef75b
ci(): Azure-cli is no longer based on Alpine so switch apk to apt-get…
Polynya Sep 17, 2024
5934ede
ci(): Change apt-get to tdnf. (#423)
Polynya Sep 18, 2024
85f44da
LP-85: Display published/review dates for anonymous users. Filter by …
Polynya Sep 23, 2024
273ae20
Merge branch 'feature/ECCW-699' of github.com:essexcountycouncil/esse…
Polynya Sep 24, 2024
7d824f2
Merge branch 'bugfix/LP-85' of github.com:essexcountycouncil/essex-in…
Polynya Sep 24, 2024
4e2116f
chore(): Update Config Ignore.
Polynya Sep 24, 2024
1cb6d7c
feat(LP-106): Install ecc_parents.
Polynya Sep 24, 2024
78b4ddd
feat(LP-146): Update Autosave Form module.
Polynya Sep 24, 2024
8c7ba08
feat(LP-90): Upgrade modules. Enable LocalGov Workflows Notifications
Polynya Sep 24, 2024
d3da391
feat(LP-106): Enable ECC Parents module.
Polynya Sep 24, 2024
afb90c9
feat(LP-90): LGD Workflows patches. Remove security-advisories until …
Polynya Sep 25, 2024
741f3e8
fix(LP-90): Add missing local patch.
Polynya Sep 25, 2024
9c58b62
ci(): Fix sbom image name
Polynya Sep 25, 2024
354f80b
fix(LP-110): Display checkbox on guide page edit form.
Polynya Sep 25, 2024
4629a33
feat(LP-90): Upgrade ContentOwnership module.
Polynya Sep 25, 2024
916d2a8
ci(): Delete open_pr workflow. Remove privsharevol from comment workf…
Polynya Sep 25, 2024
bc6d591
fix(LP-90): Upgrade Content Ownership
Polynya Sep 25, 2024
ae2f09d
fix(LP-90): Update Content Ownership
Polynya Sep 25, 2024
fb2b290
fix(LP-90): Content By Owner view
Polynya Sep 25, 2024
a6c0021
ci(): Remove redundant security checker from Dockerfile
Polynya Sep 25, 2024
6147f3a
fix(LP-90): Content Ownership 1.0.4
Polynya Sep 25, 2024
c1e6fe8
feat(LP-203): Enable Replicate for content and paragraphs.
Polynya Sep 30, 2024
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
63 changes: 63 additions & 0 deletions .github/workflows/close_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Stop Review App and cleanup when PR is closed

on:
pull_request:
types: [ closed ]

jobs:
cleanup:
name: Clean up Azure
runs-on: ubuntu-latest
steps:
- name: Add comment for start of job
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
Stopping Review App and clearing up

- name: Log in to Azure
uses: azure/login@v1
with:
creds: '{"clientId":"${{ vars.ARM_CLIENT_ID }}","clientSecret":"${{ secrets.ARM_CLIENT_SECRET }}","subscriptionId":"${{ vars.ARM_SUBSCRIPTION_ID }}","tenantId":"${{ vars.ARM_TENANT_ID }}"}'

- name: Remove label
id: remove_label
env:
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
REF_NAME: ${{ github.head_ref }}
run: |
ENV_SLUG=$(echo "${REF_NAME}" | sed -e 's:[^[:alpha:]|^[:digit:]]:-:g' | sed -e 's/\(.*\)/\L\1/')
az containerapp revision label remove --label ${ENV_SLUG} --name intranet -g rg-ecc-intranet-uks-dev --subscription "Essex County Council (Intranet)"
sleep 1m

- name: Deactivate revisions
id: deactivate
env:
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
REF_NAME: ${{ github.head_ref }}
shell: bash
run: |
ENV_SLUG=$(echo "${REF_NAME}" | sed -e 's:[^[:alpha:]|^[:digit:]]:-:g' | sed -e 's/\(.*\)/\L\1/')
jq -n --argjson revisions $(az containerapp revision list -n intranet -g rg-ecc-intranet-uks-dev --subscription "Essex County Council (Intranet)" | jq -c '[.[].name]') --argjson ingress $(az containerapp ingress show -n intranet -g rg-ecc-intranet-uks-dev --subscription "Essex County Council (Intranet)" | jq -c ".traffic | [.[].revisionName]") '{"revisions": $revisions, "ingress": $ingress} | .revisions-.ingress | .[]' | tr -d '"' | while read revision
do
echo Deactivating "$revision"
az containerapp revision deactivate --revision $revision -g rg-ecc-intranet-uks-dev --subscription "Essex County Council (Intranet)"
done

- name: Delete database
id: delete_db
env:
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
REF_NAME: ${{ github.head_ref }}
run: |
ENV_SLUG=$(echo "${REF_NAME}" | sed -e 's:[^[:alpha:]|^[:digit:]]:-:g' | sed -e 's/\(.*\)/\L\1/')
NEW_DB_SUFFIX="intranet_${ENV_SLUG}"
az containerapp job start -n intranet-dbclone -g rg-ecc-intranet-uks-dev --subscription "Essex County Council (Intranet)" --image "acreccuksdev.azurecr.io/dbclone" --env-vars "NEW_DB_SUFFIX=${NEW_DB_SUFFIX}" "DESTROY_DB=1" 'MYSQL_HOST=mariadb-ecc-uks-dev.mariadb.database.azure.com' 'MYSQL_USER=mariadb-root' 'MYSQL_DATABASE=drupal_intranet' 'MYSQL_PASSWORD=secretref:mysql-password' --container-name dbclonea --cpu 0.75 --memory 1.5

- name: Add comment for end job
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
Stopped Review App and cleared up
350 changes: 350 additions & 0 deletions .github/workflows/comment.yml

Large diffs are not rendered by default.

16 changes: 7 additions & 9 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ build-and-push-images:
- docker build -t ${DOCKER_REGISTRY}/intranet-drupal-fpm -t ${DOCKER_REGISTRY}/intranet-drupal-fpm${tag} -t intranet-drupal-fpm -f Dockerfile-drupal .
- docker build -t ${DOCKER_REGISTRY}/intranet-nginx-drupal -t ${DOCKER_REGISTRY}/intranet-nginx-drupal${tag} -t intranet-nginx-drupal -f Dockerfile-nginx .
- docker push ${DOCKER_REGISTRY}/intranet-nginx-drupal${tag}
- docker push ${DOCKER_REGISTRY}/intranet-nginx-drupal
- docker push ${DOCKER_REGISTRY}/intranet-drupal-fpm${tag}
- docker push ${DOCKER_REGISTRY}/intranet-drupal-fpm

generate-sbom:
stage: build
Expand All @@ -56,8 +54,8 @@ generate-sbom:
- apk add bash curl --update-cache
- curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
script:
- docker pull ${DOCKER_REGISTRY}/portal-drupal-fpm${tag}
- syft docker:${DOCKER_REGISTRY}/portal-drupal-fpm${tag} -o json=dockerimage.sbom.json
- docker pull ${DOCKER_REGISTRY}/intranet-drupal-fpm${tag}
- syft docker:${DOCKER_REGISTRY}/intranet-drupal-fpm${tag} -o json=dockerimage.sbom.json
only:
- develop
- /^release\//
Expand Down Expand Up @@ -117,7 +115,7 @@ deploy-to-dev:
revisionSuffix: ${CI_PIPELINE_ID}
scale:
minReplicas: 0
maxReplicas: 2
maxReplicas: 1
rules:
- name: "http-rule"
http:
Expand Down Expand Up @@ -189,7 +187,7 @@ drush-deploy-dev:
stage: development-postdeploy
needs: ["deploy-to-dev"]
before_script:
- apk add socat
- tdnf -y install socat
- az extension add --name containerapp
- az login --service-principal -u${ARM_CLIENT_ID} -p${ARM_CLIENT_SECRET} -t${ARM_TENANT_ID}
- az account set --subscription "Essex County Council (intranet)"
Expand Down Expand Up @@ -303,7 +301,7 @@ drush-deploy-preprod:
stage: preproduction-postdeploy
needs: ["deploy-to-preprod"]
before_script:
- apk add socat
- tdnf -y install socat
- az extension add --name containerapp
- az login --service-principal -u${ARM_CLIENT_ID} -p${ARM_CLIENT_SECRET} -t${ARM_TENANT_ID}
- az account set --subscription "Essex County Council (intranet)"
Expand Down Expand Up @@ -410,7 +408,7 @@ drush-deploy-prod:
stage: production-postdeploy
needs: ["deploy-to-prod"]
before_script:
- apk add socat
- tdnf -y install socat
- az extension add --name containerapp
- az login --service-principal -u${ARM_CLIENT_ID} -p${ARM_CLIENT_SECRET} -t${ARM_TENANT_ID}
- az account set --subscription "Essex County Council (intranet)"
Expand Down Expand Up @@ -521,7 +519,7 @@ drush-deploy-straight-to-prod:
stage: production-postdeploy
needs: ["deploy-straight-to-prod"]
before_script:
- apk add socat
- tdnf -y install socat
- az extension add --name containerapp
- az login --service-principal -u${ARM_CLIENT_ID} -p${ARM_CLIENT_SECRET} -t${ARM_TENANT_ID}
- az account set --subscription "Essex County Council (intranet)"
Expand Down
9 changes: 0 additions & 9 deletions Dockerfile-drupal
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,10 @@ RUN pecl channel-update pecl.php.net \
# Download and install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

# Download and install security checker
ENV PHP_CHECKER_VERSION=1.0.0
RUN curl -o /tmp/security_checker -L "https://github.com/fabpot/local-php-security-checker/releases/download/v${PHP_CHECKER_VERSION}/local-php-security-checker_${PHP_CHECKER_VERSION}_linux_amd64" \
&& mv /tmp/security_checker /usr/bin/local-php-security-checker \
&& chmod +x /usr/bin/local-php-security-checker

# create volume for shared SSH keys
RUN mkdir -p /drupal/data/default/ssh-keys
VOLUME ["/drupal/data/default/ssh-keys"]



# create Drupal folders
RUN mkdir -p /drupal/web/sites/default/files \
&& mkdir -p /drupal/data/default/private \
Expand All @@ -89,7 +81,6 @@ WORKDIR /drupal

RUN sed -i 's;listen = /run/php/php8.1-fpm.sock;listen = 9000;' /etc/php/8.1/fpm/pool.d/www.conf
RUN echo "clear_env = no" >> /etc/php/8.1/fpm/pool.d/www.conf
RUN echo 'extension="memcached.so"' >> /etc/php/8.1/fpm/conf.d/20-memcached.ini
RUN sed -i 's;expose_php = on;expose_php = off;' /etc/php/8.1/fpm/php.ini && mkdir -p /run/php
RUN sed -i 's;memory_limit = 128M;memory_limit = 512M;' /etc/php/8.1/fpm/php.ini
RUN sed -i 's;upload_max_filesize = 2M;upload_max_filesize = 128M;' /etc/php/8.1/fpm/php.ini
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Prototype for Essex County Council's Intranet Drupal project
# Essex County Council's Intranet Drupal codebase.

Built using the LocalGov Drupal distribution.

Expand Down Expand Up @@ -31,7 +31,7 @@ Once again, DDEV has the details configured for NGINX for local development.
## Import images

```
ddev drush en stage_file_proxy -y && ddev drush cset stage_file_proxy.settings origin '<https://beta.intranet.essex.gov.uk>' -y
ddev drush en stage_file_proxy -y && ddev drush cset stage_file_proxy.settings origin '<https://intranet.essex.gov.uk>' -y
```

## Environment variables
Expand Down
38 changes: 33 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
"type": "github",
"url": "https://github.com/essexcountycouncil/ecc_cludo_search"
},
{
"type": "github",
"url": "https://github.com/essexcountycouncil/ecc_parents"
},
{
"type": "github",
"url": "https://github.com/essexcountycouncil/ecc_theme"
Expand All @@ -53,19 +57,22 @@
"ckeditor/div": "4.10.1",
"composer/installers": "^1.10",
"cweagans/composer-patches": "^1.6",
"drupal/antibot": "^2.0",
"drupal/autologout": "^1.4",
"drupal/autosave_form": "^1.4",
"drupal/block_classes": "^1.0",
"drupal/ckeditor5_icons": "^1.0@RC",
"drupal/ckeditor_div_manager": "^3",
"drupal/cludo_search": "^1.0@beta",
"drupal/config_ignore": "^2.4",
"drupal/config_filter": "^2.6",
"drupal/config_ignore": "^3.3",
"drupal/config_split": "^2",
"drupal/core-composer-scaffold": "^10",
"drupal/core-project-message": "^10",
"drupal/core-recommended": "^10.3.1",
"drupal/devel": "^5.1",
"drupal/dynamic_entity_reference": "^3.1",
"drupal/entity_embed": "^1.6",
"drupal/entitygroupfield": "^2",
"drupal/eu_cookie_compliance": "^1.24",
"drupal/eu_cookie_compliance_gtm": "^2.1",
Expand All @@ -77,6 +84,7 @@
"drupal/google_tag": "^1.6.0",
"drupal/group": "^3",
"drupal/health_check_url": "^3.2",
"drupal/honeypot": "^2.2",
"drupal/imagemagick": "^3.4",
"drupal/key": "^1.17",
"drupal/leaflet": "^10.2",
Expand All @@ -88,8 +96,11 @@
"drupal/openid_connect_azure_b2c": "1.0.1-beta1",
"drupal/openid_connect_windows_aad": "^2.0@beta",
"drupal/permissions_filter": "^1.3",
"drupal/poll": "^1.6",
"drupal/preview_link": "^2",
"drupal/published_corrected_date": "^2.0",
"drupal/replicate": "^1.3",
"drupal/replicate_ui": "^1.1",
"drupal/restui": "^1.21",
"drupal/simple_sitemap": "^4.1",
"drupal/single_content_sync": "^1.4",
Expand All @@ -104,12 +115,14 @@
"essexcountycouncil/ecc_content_moderation": "^1.0",
"essexcountycouncil/ecc_cookie_compliance": "^1.0",
"essexcountycouncil/ecc_menu": "^1.0",
"essexcountycouncil/ecc_parents": "^1.0",
"essexcountycouncil/ecc_theme": "^1.1",
"localgovdrupal/localgov": "^3",
"localgovdrupal/localgov_base": "^1.4",
"localgovdrupal/localgov_eu_cookie_compliance": "^1.0",
"localgovdrupal/localgov_forms": "^1.0@beta",
"localgovdrupal/localgov_geo": "^2",
"localgovdrupal/localgov_publications": "^1.0",
"mglaman/composer-drupal-lenient": "^1.0"
},
"require-dev": {
Expand All @@ -124,7 +137,6 @@
"phpspec/prophecy-phpunit": "^2",
"phpstan/phpstan": "^1.0",
"phpstan/phpstan-deprecation-rules": "^1.0",
"roave/security-advisories": "dev-latest",
"squizlabs/php_codesniffer": "^3.6"
},
"conflict": {
Expand All @@ -144,6 +156,11 @@
"php-http/discovery": true,
"mglaman/composer-drupal-lenient": true,
"phpstan/extension-installer": true
},
"audit": {
"ignore": {
"GHSA-mg8j-w93w-xjgc": "Apache has been configured to block access to applicable paths"
}
}
},
"autoload": {
Expand All @@ -154,17 +171,18 @@
"extra": {
"enable-patching": true,
"patches": {
"drupal/autosave_form": {
"Disable autosaving for layout builder pages": "https://www.drupal.org/files/issues/2024-09-09/3270955-5-layout_builder.patch"
},
"drupal/cludo_search": {
"Change title of search page.": "patches/cludo_search-page-tweaks.patch",
"Remove cludo supplied search page template.": "patches/cludo_remove_default_template",
"Automated Drupal 10 compatibility fixes": "https://www.drupal.org/files/issues/2022-07-18/cludo_search.1.0-beta2.rector.patch"
},
"drupal/core": {
"Remove this patch after upgrading Localgov profile": "https://www.drupal.org/files/issues/2024-04-16/2845144-95.patch",
"Allow chmod to fail in the public namespace if the resultant mode is 777": "patches/filesystem-chmod-0001.patch"
"Remove this patch after upgrading Localgov profile": "https://www.drupal.org/files/issues/2024-04-16/2845144-95.patch"
},
"drupal/fathom_analytics": {
"Issue #3380665: Defer attribute should be boolean": "https://git.drupalcode.org/project/fathom_analytics/-/merge_requests/2.diff",
"Automated Drupal 10 compatibility fixes": "https://www.drupal.org/files/issues/2022-06-15/fathom_analytics.3.0.0.rector.patch"
},
"drupal/geo_entity": {
Expand All @@ -173,6 +191,9 @@
"drupal/group": {
"Apply some custom functionality for Essex when adding members to Groups ECCI-287/ECCI-286": "patches/essex-group-membership.patch"
},
"drupal/honeypot": {
"honeypot clientside": "https://www.drupal.org/files/issues/2024-08-16/clientside_time_limit_2_1_4.patch"
},
"drupal/openid_connect": {
"Truncate username if it is greater than 60 characters": "https://www.drupal.org/files/issues/2021-12-08/data_too_long_for_column_name-%203252021-8.patch"
},
Expand All @@ -183,11 +204,18 @@
"localgovdrupal/localgov_paragraphs": {
"Added missing field which has been introduced recently.": "patches/missing_field.patch"
},
"localgovdrupal/localgov_publications": {
"Declare permissions for LocalGov Publications": "patches/localgov_publications.patch"
},
"localgovdrupal/localgov_services": {
"New parent bundles for ServicesSelection": "patches/localgov_services.patch"
},
"localgovdrupal/localgov_subsites": {
"Show page heading block for subsites pages": "patches/localgov_subsites.patch"
},
"localgovdrupal/localgov_workflows": {
"New Content by owner View": "https://patch-diff.githubusercontent.com/raw/localgovdrupal/localgov_workflows/pull/104.diff",
"Service contact delete form": "patches/localgov_workflows_delete_service_contact.patch"
}
},
"drupal-scaffold": {
Expand Down
Loading
Loading