Skip to content

Commit

Permalink
Merge pull request #1973 from danskernesdigitalebibliotek/develop
Browse files Browse the repository at this point in the history
Release 2025.3.0
  • Loading branch information
kasperg authored Jan 14, 2025
2 parents 428c4cf + dbc95d0 commit a47160c
Show file tree
Hide file tree
Showing 61 changed files with 12,014 additions and 10,519 deletions.
8 changes: 6 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
COMPOSER_MEMORY_LIMIT=-1

# GraphQL Consumer environment variables used for local development
GRAPHQL_CONSUMER_SECRET=some-secret
# GraphQL Consumer secrets and user passwords
BNF_GRAPHQL_CONSUMER_SECRET=dUOAxbWr72cnigpkZXN1SuyuXfeHxZb5
BNF_GRAPHQL_CONSUMER_USER_PASSWORD=dUOAxbWr72cnigpkZXN1SuyuXfeHxZb5

GO_GRAPHQL_CONSUMER_SECRET=GVOzhK8BogbZHrEzXW0W5HYFtScQrABt
GO_GRAPHQL_CONSUMER_USER_PASSWORD=oA8mqZFxmFubREH77T3qeApeoUxoNS7Y

#OPENID_CLIENT_ID=some-client-id
#OPENID_CLIENT_SECRET=some-client-secret
Expand Down
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": [
"plugin:drupal-contrib/9.x"
"plugin:drupal-contrib/passing"
],
"rules": {
"no-console": ["error", { "allow": ["debug", "warn", "error"] }]
Expand All @@ -10,6 +10,7 @@
"**/web/libraries/",
"**/web/modules/contrib/",
"**/web/sites/**/files/",
"**/web/sites/default/default.services.yml",
"**/web/themes/custom/novel/assets/",
"**/web/themes/contrib/",
"**/web/modules/local/",
Expand Down
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ updates:
directory: "/"
open-pull-requests-limit: 2
groups:
# @types/node are linked to the Node version used within the project.
# Bump the package manually when upgrading to a new Node version.
types-node:
patterns:
- "@types/node"
update-types:
- "minor"
- "patch"
minor-js-dependencies:
update-types:
- "minor"
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/lagoon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,27 @@ jobs:
echo "deployment_id=$DEPLOYMENT_ID" >> $GITHUB_OUTPUT
CreateDeploymentBNF:
name: Create BNF deployment
runs-on: ubuntu-latest
if: ${{ startsWith('bnf:', github.event.pull_request.title) && github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'synchronize' }}
needs: [BranchNameLength]
steps:
- run: |
LAGOON_DEPLOYS_LOG_URL=$(echo "https://ui.lagoon.dplplat01.dpl.reload.dk/projects/dpl-bnf/dpl-bnf-${{ env.LAGOON_ENVIRONMENT }}/deployments")
DEPLOYMENT_ID=$(echo '{
"ref": "${{ github.head_ref || github.ref_name }}",
"environment": "${{ env.LAGOON_ENVIRONMENT }}-bnf",
"auto_merge": false,
"required_contexts": []
}' | gh api --method POST "/repos/${{ env.OWNER }}/${{ env.REPO }}/deployments" --input - --jq '.id')
gh api --method POST "/repos/${{ env.OWNER }}/${{ env.REPO }}/deployments/$DEPLOYMENT_ID/statuses" \
-f "state=in_progress" -f "log_url=$LAGOON_DEPLOYS_LOG_URL"
echo "deployment_id=$DEPLOYMENT_ID" >> $GITHUB_OUTPUT
# When we close the pull request, we want to set the environment as inactive.
CloseEnvironment:
name: Close environment
Expand Down
23 changes: 17 additions & 6 deletions .lagoon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,15 @@ tasks:
- run:
name: Create new GH deployment
command: |
ENVIRONMENT=$LAGOON_ENVIRONMENT
# We want BNF to show up as a separate environment.
if [[ "$LAGOON_PROJECT" == "dpl-bnf" ]]; then
ENVIRONMENT=$LAGOON_ENVIRONMENT-bnf
fi
GH_DEPLOYMENTS=$(curl -H "Authorization: Bearer $GH_DEPLOYMENT_TOKEN" \
"https://api.github.com/repos/danskernesdigitalebibliotek/dpl-cms/deployments?ref=$LAGOON_PR_HEAD_BRANCH&environment=$LAGOON_ENVIRONMENT")
"https://api.github.com/repos/danskernesdigitalebibliotek/dpl-cms/deployments?ref=$LAGOON_PR_HEAD_BRANCH&environment=$ENVIRONMENT")
GH_DEPLOYMENT_ID=$(echo "$GH_DEPLOYMENTS" | grep '"id":' | head -n 1 | sed 's/[^0-9]*\([0-9]*\).*/\1/')
echo "$GH_DEPLOYMENTS"
Expand All @@ -23,7 +30,7 @@ tasks:
# file. Environment variables are killed between tasks, apart from
# the global ones.
echo "$GH_DEPLOYMENT_ID" > /tmp/GH_DEPLOYMENT_ID
LAGOON_DEPLOYS_LOG_URL="https://ui.lagoon.dplplat01.dpl.reload.dk/projects/$LAGOON_PROJECT/dpl-cms-$LAGOON_ENVIRONMENT/deployments"
LAGOON_DEPLOYS_LOG_URL="https://ui.lagoon.dplplat01.dpl.reload.dk/projects/$LAGOON_PROJECT/$LAGOON_PROJECT-$LAGOON_ENVIRONMENT/deployments"
echo "$LAGOON_DEPLOYS_LOG_URL" > /tmp/LAGOON_DEPLOYS_LOG_URL
echo "Creating a initial pending deployment status."
Expand All @@ -43,6 +50,14 @@ tasks:
drush si --existing-config -y
fi
if [[ "$LAGOON_PROJECT" == "dpl-bnf" ]]; then
# Enable the server module on environments in the BNF project.
drush pm:enable -y bnf_server
elif [[ ${LAGOON_PR_TITLE,,} =~ ^bnf: ]]; then
# Or configure the client if there's a BNF environment.
drush config:set --yes bnf_client.settings base_url https://varnish.$LAGOON_ENVIRONMENT.dpl-bnf.dplplat01.dpl.reload.dk/
fi
# Practice shows that the cache needs to be cleared to avoid
# configuration errors even after a site install.
drush cr
Expand Down Expand Up @@ -109,10 +124,6 @@ tasks:
drush user:create patron --password="$PR_DRUPAL_PWD"
drush user:role:add 'patron' patron
drush user:create $GRAPHQL_USER_NAME --password="$GRAPHQL_USER_PASSWORD"
drush user:role:add 'external_system' $GRAPHQL_USER_NAME
drush user:role:add 'graphql_consumer' $GRAPHQL_USER_NAME
else
echo "Test users already exist. Skipping creation..."
fi
Expand Down
4 changes: 0 additions & 4 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,6 @@ tasks:
- task dev:cli -- drush user:create patron --password="test"
- task dev:cli -- drush user:role:add 'patron' patron

- task dev:cli -- drush user:create graphql_consumer --password="test"
- task dev:cli -- drush user:role:add 'external_system' graphql_consumer
- task dev:cli -- drush user:role:add 'graphql_consumer' graphql_consumer

dev:import-profile-translations:
desc: Import our custom profile translations. This is done automatically on deploy.
cmds:
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
"type": "package",
"package": {
"name": "danskernesdigitalebibliotek/dpl-react",
"version": "2025.2.0",
"version": "2025.3.0",
"type": "drupal-library",
"dist": {
"url": "https://github.com/danskernesdigitalebibliotek/dpl-react/releases/download/2025.2.0/dist-2025-2-0-295f0444c88bec796630c4c0f17e6b986aac32a8.zip",
"url": "https://github.com/danskernesdigitalebibliotek/dpl-react/releases/download/2025.3.0/dist-2025-3-0-a20214bfbabbc50c49a3dc096ba3dbad8c8485b1.zip",
"type": "zip"
},
"require": {
Expand All @@ -56,9 +56,9 @@
"package": {
"name": "danskernesdigitalebibliotek/dpl-design-system",
"type": "drupal-library",
"version": "2025.2.0",
"version": "2025.3.0",
"dist": {
"url": "https://github.com/danskernesdigitalebibliotek/dpl-design-system/releases/download/2025.2.0/dist-2025-2-0-f46678d4ef825ee73d9bba88386a301d4127aaf5.zip",
"url": "https://github.com/danskernesdigitalebibliotek/dpl-design-system/releases/download/2025.3.0/dist-2025-3-0-8b43a6f3ed6ae3eb85e7ca687ac7bcb8886bc0a8.zip",
"type": "zip"
}
}
Expand Down Expand Up @@ -90,8 +90,8 @@
"composer/installers": "1.12.0",
"cweagans/composer-patches": "1.7.3",
"danskernesdigitalebibliotek/cms-api": "*",
"danskernesdigitalebibliotek/dpl-design-system": "2025.2.0",
"danskernesdigitalebibliotek/dpl-react": "2025.2.0",
"danskernesdigitalebibliotek/dpl-design-system": "2025.3.0",
"danskernesdigitalebibliotek/dpl-react": "2025.3.0",
"danskernesdigitalebibliotek/fbs-client": "*",
"dealerdirect/phpcodesniffer-composer-installer": "^1.0.0",
"deoliveiralucas/array-keys-case-transform": "^1.1",
Expand Down Expand Up @@ -140,7 +140,7 @@
"drupal/libraries": "^4.0",
"drupal/linkit": "^6.1.2",
"drupal/media_library_edit": "^3.0",
"drupal/metatag": "^2.0",
"drupal/metatag": "^2.1",
"drupal/multiple_fields_remove_button": "^2.2",
"drupal/multivalue_form_element": "^1.0@beta",
"drupal/openapi": "^2.1",
Expand Down
Loading

0 comments on commit a47160c

Please sign in to comment.