Skip to content

Commit 61fc7e6

Browse files
DionisioFGnfawbertdavids4David Suissagregharvey
authored
CE-DEV: some updates and tweaks (#95)
* Fix docker-compose v2 issue and re-release to include clamav role (#68) * Killing old ce-dev container when updating (#70) * Added Drupal9 and Localgov templates (#73) * New release 1.1.19 (#75) * Updated package.json version: 1.1.19 (#77) * Updated package.json version: 1.1.19 * New tag to fix repo key for Chrome (#83) * #CE-62820: Added support for composer '2.x' in Drupal 9 provision tem… (#89) (#91) * #CE-62820: Added support for composer '2.x' in Drupal 9 provision template. * #CE-62820: Attempt to fix pull request test cases by providing a default value for the 'new_user' in provision. * #CE-62820: Attempt to fix pull request test cases by providing a default value for the 'key_name' in provision. * #CE-62820: Attempt to fix pull request test cases by providing a default values for 'ce_deploy' in provision. Co-authored-by: David Suissa <[email protected]> Co-authored-by: David Suissa <[email protected]> * REL 1.1.21: Using composer 2 with Drupal 9 by default (#92) * Drupal template fixes pr 1.x (#94) * Adding a Drupal 9 template to ce-dev. * Testing nodejs version change with blank template. * Incrementing version for release. * There's no drupal9 template for ce-deploy. * Renamed the settings and drush files for ce-dev * Added nodejs 16.x as default version * Added lhci_run role by default * Some tweaks in the config * Added the if statement to read info from an optional settings.local.php file Co-authored-by: nfawbert <[email protected]> Co-authored-by: davids4 <[email protected]> Co-authored-by: David Suissa <[email protected]> Co-authored-by: Greg Harvey <[email protected]>
1 parent 0e923c3 commit 61fc7e6

File tree

5 files changed

+53
-19
lines changed

5 files changed

+53
-19
lines changed

templates/drupal9/ce-dev/ansible/deploy.yml.j2

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# This actually does not take any backup, but is needed to populate settings.php.
1515
- mysql_backup:
1616
handling: none
17-
credentials_handling: static
17+
credentials_handling: manual
1818
# A list of Drupal sites (for multisites).
1919
- drupal:
2020
sites:
@@ -35,17 +35,25 @@
3535
no_dev: false
3636
working_dir: "{{ deploy_path }}"
3737
apcu_autoloader: false
38+
- drush:
39+
use_vendor: true
40+
- drush_bin: "{{ deploy_path }}/vendor/drush/drush/drush"
41+
- lhci_run:
42+
# Create a list of URLs to test with LHCI
43+
test_urls:
44+
- "https://{{ _domain_name }}"
3845
pre_tasks:
3946
# You can safely remove these steps once you have a working composer.json.
4047
- name: Download composer file.
41-
get_url:
48+
ansible.builtin.get_url:
4249
url: https://raw.githubusercontent.com/drupal/recommended-project/9.3.x/composer.json
4350
dest: "{{ deploy_path }}/composer.json"
4451
force: false
4552
- name: Install drush.
46-
command:
47-
cmd: composer require drush/drush:11.*
48-
chdir: "{{ deploy_path }}"
53+
community.general.composer:
54+
command: require
55+
arguments: drush/drush:11.*
56+
working_dir: "{{ deploy_path }}"
4957
roles:
5058
- _init # Sets some variables the deploy scripts rely on.
5159
- composer # Composer install step.
@@ -54,4 +62,5 @@
5462
# - sync/database_sync # Grab database from a remote server.
5563
- database_apply # Run drush updb and config import.
5664
- _exit # Some common housekeeping.
65+
- lhci_run
5766
{% endraw %}

templates/drupal9/ce-dev/ansible/provision.yml.j2

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,9 @@
4848
cli: true
4949
- lhci:
5050
enable_vnc: true
51+
- nodejs:
52+
version: 16.x
5153
{% endraw %}
52-
pre_tasks:
53-
# Debian has nodejs 12.x installed by default.
54-
- name: Remove "node" package installed by default
55-
ansible.builtin.apt:
56-
name: nodejs
57-
state: absent
58-
purge: true
5954
tasks:
6055
- apt:
6156
update_cache: true
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# @see https://github.com/drush-ops/drush/blob/master/examples/example.drush.yml
2+
3+
options:
4+
uri: '{{ site.base_url }}'
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
/**
4+
* Include default settings.
5+
*/
6+
require __DIR__ . '/default.settings.php';
7+
8+
/**
9+
* Include default local dev settings.
10+
*/
11+
require DRUPAL_ROOT . '/sites/example.settings.local.php';
12+
13+
$databases['default']['default'] = array (
14+
'database' => '{{ build_databases[0].name }}',
15+
'username' => '{{ build_databases[0].user }}',
16+
'password' => '{{ build_databases[0].password }}',
17+
'prefix' => '',
18+
'host' => '{{ build_databases[0].host }}',
19+
'port' => '3306',
20+
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
21+
'driver' => 'mysql',
22+
);
23+
24+
$settings['file_private_path'] = '{{ build_private_file_path }}';
25+
$settings['file_public_path'] = '{{ build_public_file_path }}';
26+
$settings['config_sync_directory'] = '{{ build_config_sync_directory }}';
27+
28+
/**
29+
* Load local development override configuration, if available.
30+
*/
31+
if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) {
32+
include $app_root . '/' . $site_path . '/settings.local.php';
33+
}

templates/localgov/ce-dev/ansible/provision.yml.j2

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,6 @@
4545
- lhci:
4646
enable_vnc: true
4747
{% endraw %}
48-
pre_tasks:
49-
# Debian has nodejs 12.x installed by default.
50-
- name: Remove "node" package installed by default
51-
ansible.builtin.apt:
52-
name: nodejs
53-
state: absent
54-
purge: true
5548
tasks:
5649
- apt:
5750
update_cache: true

0 commit comments

Comments
 (0)