Skip to content

Commit

Permalink
az-digital/az_quickstart#2081: Make scaffolding repo D10 compatible. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
joeparsons authored Jun 17, 2023
1 parent 933c29b commit 43ef78d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .ddev/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Recipe for AZ Quickstart local development
type: drupal9
docroot: web
php_version: "7.4"
php_version: "8.1"
webserver_type: nginx-fpm

# Default application ports
Expand Down
19 changes: 10 additions & 9 deletions .lando.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: az-quickstart-project
recipe: drupal9
recipe: drupal10
config:
php: '7.4'
php: '8.1'
via: apache:2.4
webroot: web
database: mariadb:10.4
Expand All @@ -19,13 +19,14 @@ services:
- '3306'
environment:
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: 'true'
MARIADB_DATABASE: drupal9
MYSQL_DATABASE: drupal9
MARIADB_USER: drupal9
MARIADB_PASSWORD: drupal9
MARIADB_DATABASE: drupal10
MYSQL_DATABASE: drupal10
MARIADB_USER: drupal10
MARIADB_PASSWORD: drupal10
appserver:
build:
- BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD); if [ $(git ls-remote --heads https://github.com/az-digital/az_quickstart.git $BRANCH_NAME | wc -l) = 1 ]; then PROFILE_BRANCH="$BRANCH_NAME"; else PROFILE_BRANCH=main; fi; composer require --no-update drupal/core-recommended:* zaporylie/composer-drupal-optimizations:* az-digital/az_quickstart:dev-${PROFILE_BRANCH}
- BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD); if [ $(git ls-remote --heads https://github.com/az-digital/az-quickstart-dev.git $BRANCH_NAME | wc -l) = 1 ]; then DEV_BRANCH="$BRANCH_NAME"; else DEV_BRANCH=main; fi; composer require --dev --no-update az-digital/az-quickstart-dev:dev-${DEV_BRANCH}
- composer install -o
tooling:
# Provide a command to install Drupal.
Expand All @@ -34,7 +35,7 @@ tooling:
# in a race condition if Drupal is installed during the run phase.
install:
service: appserver
cmd: drush --root=/app/web site:install [email protected] --account-name=azadmin --account-pass=azadmin --db-url=mysql://drupal9:drupal9@database:3306/drupal9 -y --verbose
cmd: drush --root=/app/web site:install [email protected] --account-name=azadmin --account-pass=azadmin --db-url=mysql://drupal10:drupal10@database:3306/drupal10 -y --verbose
# Provide tooling to set the Quickstart dependency.
quickstart-branch:
service: appserver
Expand All @@ -61,9 +62,9 @@ tooling:
migrate-setup:
service: appserver
cmd:
- /usr/bin/mysql -h database -uroot -e "CREATE DATABASE IF NOT EXISTS migrate; GRANT ALL PRIVILEGES ON migrate.* TO 'drupal9'@'%' IDENTIFIED by 'drupal9';"
- /usr/bin/mysql -h database -uroot -e "CREATE DATABASE IF NOT EXISTS migrate; GRANT ALL PRIVILEGES ON migrate.* TO 'drupal10'@'%' IDENTIFIED by 'drupal10';"
- chmod 777 /app/web/sites/default/settings.php
- echo "\$databases['migrate']['default'] = [\n 'driver' => 'mysql',\n 'namespace' => 'Drupal\Core\Database\Driver\mysql',\n 'database' => 'migrate',\n 'username' => 'drupal9',\n 'password' => 'drupal9',\n 'port' => '3306',\n 'host' => 'database',\n 'prefix' => '',\n];" >> /app/web/sites/default/settings.php
- echo "\$databases['migrate']['default'] = [\n 'driver' => 'mysql',\n 'namespace' => 'Drupal\Core\Database\Driver\mysql',\n 'database' => 'migrate',\n 'username' => 'drupal10',\n 'password' => 'drupal10',\n 'port' => '3306',\n 'host' => 'database',\n 'prefix' => '',\n];" >> /app/web/sites/default/settings.php
- chmod 644 /app/web/sites/default/settings.php
- mkdir /app/web/sites/default/files/migrate_files
- /app/vendor/bin/drush --root=/app/web en -y az_migration az_carousel az_paragraphs_html
Expand Down
6 changes: 4 additions & 2 deletions .probo.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
image: proboci/ubuntu:18.04-php7.4
image: proboci/ubuntu:20.04-php8.1
steps:
- name: Build Arizona Quickstart
plugin: Script
script:
- composer self-update
- if [ $(git ls-remote --heads https://github.com/az-digital/az_quickstart.git $BRANCH_NAME | wc -l) = 1 ]; then PROFILE_BRANCH="$BRANCH_NAME"; else PROFILE_BRANCH=main; fi
- if [ $(git ls-remote --heads https://github.com/az-digital/az-quickstart-dev.git $BRANCH_NAME | wc -l) = 1 ]; then DEV_BRANCH="$BRANCH_NAME"; else DEV_BRANCH=main; fi
- composer require --dev --no-update az-digital/az-quickstart-dev:dev-${DEV_BRANCH}
- composer require --no-update drupal/core-recommended:* az-digital/az_quickstart:dev-${PROFILE_BRANCH}
- composer install -o
- name: Install Arizona Quickstart
plugin: Drupal
drupalVersion: 8
drupalVersion: 10
subDirectory: web
runInstall: true
profileName: az_quickstart
Expand Down
13 changes: 7 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
}
],
"require": {
"php": ">=7.3",
"php": ">=8.1",
"az-digital/az_quickstart": "~2.6",
"composer/installers": "1.12.0",
"composer/installers": "2.2.0",
"cweagans/composer-patches": "1.7.3",
"drupal/core-composer-scaffold": "*",
"drush/drush": "11.5.1",
"drush/drush": "^11.6.0",
"oomphinc/composer-installers-extender": "2.0.1",
"vlucas/phpdotenv": "2.6.9",
"webflo/drupal-finder": "1.2.2",
Expand All @@ -50,11 +50,12 @@
"allow-plugins": {
"composer/installers": true,
"cweagans/composer-patches": true,
"drupal/core-composer-scaffold": true,
"zaporylie/composer-drupal-optimizations": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"drupal/core-composer-scaffold": true,
"drupal/console-extend-plugin": true,
"oomphinc/composer-installers-extender": true
"oomphinc/composer-installers-extender": true,
"phpstan/extension-installer": true,
"zaporylie/composer-drupal-optimizations": true
}
},
"autoload": {
Expand Down

0 comments on commit 43ef78d

Please sign in to comment.