Skip to content

Commit 2ec599a

Browse files
ElijahLynnswirtSJWdependabot[bot]ndouglascweagans
authored
VACMS-8588: Convert all remaining lando references to ddev (2) (#9461)
Co-authored-by: Steve Wirt <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nate Douglas <[email protected]> Co-authored-by: Nathan Douglas <[email protected]> Co-authored-by: Cameron Eagans <[email protected]> Co-authored-by: Lynn Stahl <[email protected]> Co-authored-by: Tanner Heffner <[email protected]> Co-authored-by: Jill Adams <[email protected]>
1 parent 0b7dcac commit 2ec599a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+363
-967
lines changed

.ddev/commands/web/pre-commit

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
## Usage: pre-commit
55

66
set -e
7-
./scripts/lando-precommit.sh
7+
./scripts/precommit.sh

.ddev/config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ web_environment:
4141
- BLACKFIRE_CLIENT_TOKEN=~
4242
- BLACKFIRE_SERVER_ID=~
4343
- BLACKFIRE_SERVER_TOKEN=~
44-
- CMS_ENVIRONMENT_TYPE=ddev
44+
- CMS_ENVIRONMENT_TYPE=local
4545
- CMS_MARIADB_DATABASE=db
4646
- CMS_MARIADB_USERNAME=db
4747
- CMS_MARIADB_PASSWORD=db

.ddev/docker-compose.web-env.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
services:
2+
web:
3+
env_file:
4+
- ../.env

.devcontainer/devcontainer.json

+29-21
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,30 @@
11
{
2-
"name": "va.gov-cms",
3-
"settings": {
4-
"editor.formatOnSave": true,
5-
"terminal.integrated.shell.linux": "/bin/bash",
6-
"workbench.startupEditor": "readme"
7-
},
8-
"extensions": [
9-
"cweijan.vscode-mysql-client2",
10-
"dbaeumer.vscode-eslint",
11-
"eamodio.gitlens",
12-
"esbenp.prettier-vscode",
13-
"felixfbecker.php-debug",
14-
"felixfbecker.php-intellisense",
15-
"github.vscode-pull-request-github",
16-
"neilbrayfield.php-docblocker",
17-
"stylelint.vscode-stylelint",
18-
"valeryanm.vscode-phpsab"
19-
],
20-
"postCreateCommand": "/bin/bash ./.devcontainer/post-create.sh 2>&1 | tee ~/post-create.log",
21-
"postStartCommand": "/bin/bash ./.devcontainer/post-start.sh 2>&1 | tee ~/post-start.log"
22-
}
2+
"name": "va.gov-cms",
3+
// https://github.com/drud/ddev/issues/3914
4+
// https://code.visualstudio.com/remote/advancedcontainers/environment-variables
5+
"containerEnv": {
6+
"DDEV_PRETEND_GITPOD": "true"
7+
},
8+
"remoteEnv": {
9+
"DDEV_PRETEND_GITPOD": "true"
10+
},
11+
"settings": {
12+
"editor.formatOnSave": true,
13+
"terminal.integrated.shell.linux": "/bin/bash",
14+
"workbench.startupEditor": "readme"
15+
},
16+
"extensions": [
17+
"cweijan.vscode-mysql-client2",
18+
"dbaeumer.vscode-eslint",
19+
"eamodio.gitlens",
20+
"esbenp.prettier-vscode",
21+
"felixfbecker.php-debug",
22+
"felixfbecker.php-intellisense",
23+
"github.vscode-pull-request-github",
24+
"neilbrayfield.php-docblocker",
25+
"stylelint.vscode-stylelint",
26+
"valeryanm.vscode-phpsab"
27+
],
28+
"postCreateCommand": "/bin/bash ./.devcontainer/post-create.sh 2>&1 | tee ~/post-create.log",
29+
"postStartCommand": "/bin/bash ./.devcontainer/post-start.sh 2>&1 | tee ~/post-start.log"
30+
}

.devcontainer/post-create.sh

+12-13
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
#!/bin/bash
22

3-
# Download lando https://docs.lando.dev/basics/installation.html#linux
4-
wget -O /tmp/lando-stable.deb https://files.devwithlando.io/lando-stable.deb
5-
6-
# Install lando https://docs.lando.dev/basics/installation.html#docker-ce
7-
sudo dpkg -i --ignore-depends=docker-ce /tmp/lando-stable.deb
8-
9-
# Remove lando package.
10-
rm /tmp/lando-stable.deb
3+
# Install ddev.
4+
curl https://raw.githubusercontent.com/drud/ddev/master/scripts/install_ddev.sh | bash
115

126
# Add upstream git remote.
137
git remote add upstream https://github.com/department-of-veterans-affairs/va.gov-cms.git
148

159
# Provide php symlink for vscode extensions.
1610
if command -v /opt/php/lts/bin/php; then sudo ln -s /opt/php/lts/bin/php /usr/bin; fi
1711

18-
# Start lando.
19-
lando start
12+
# Populate a .env file for ddev and friends.
13+
cp .env.example .env
14+
15+
# To avoid a blocking prompt. See https://ddev.readthedocs.io/en/stable/users/cli-usage/#opt-in-usage-information.
16+
ddev config global --instrumentation-opt-in=true
17+
18+
# Start ddev.
19+
ddev start
2020

2121
# Import the database.
22-
./scripts/sync-db.sh
23-
./scripts/sync-files.sh
22+
ddev pull va --skip-files -y
2423

2524
echo
26-
echo "All done! Welcome to the VA.gov CMS :-)"
25+
echo "All done! Welcome to the VA.gov CMS :-)"

.devcontainer/post-start.sh

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/bin/bash
22

3-
# Start lando if it's not already running.
4-
LANDO_SERVICE_COUNT=$( lando list --format json | jq '.[].status' | wc -l )
5-
if [[ ${LANDO_SERVICE_COUNT} -lt 4 ]]; then
6-
lando start
3+
# Start ddev if it's not already running.
4+
if [ -x "$(command -v ddev)" ] && ! docker ps | grep ddev > /dev/null; then
5+
ddev start
76
fi

.env.example

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# ddev Environment Variables
2+
#
3+
# This file is used by the file scripts/composer/EnvironmentHandler.php for setting environment variables when running the
4+
# site using the ddev local development environment.
5+
#
6+
# If you wish to override these, you can create a .env file and that will be loaded instead.
7+
8+
# Used by WEB build process.
9+
DRUPAL_ADDRESS=https://va-gov-cms.ddev.site
10+
11+
# Used by behat tests.
12+
# DO NOT use environment variable insertion here. Other systems may load this in a different order.
13+
BEHAT_PARAMS={"extensions":{"Behat\\MinkExtension":{"base_url":"https://va-gov-cms.ddev.site"},"Drupal\\DrupalExtension":{"drush":{"root":"/var/www/html/docroot","alias":"@none"},"drupal":{"drupal_root":"/var/www/html/docroot"}}}}
14+
15+
# Keep this to ensure environment type is set.
16+
CMS_ENVIRONMENT_TYPE=local
17+
18+
# You can uncomment this to develop environment-specific functionality like the
19+
# Rebuild & Deploy Page
20+
# CMS_ENVIRONMENT_TYPE=prod

.env.lando

-30
This file was deleted.

.gitignore

+2-7
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
# Ignore NPM managed dependencies
2525
node_modules/
2626

27-
# Ignore local dev files
28-
/docroot/sites/default/settings/settings.local.php
2927
# Prevent Devel from appearing anywhere.
3028
/config/dev/devel.settings.yml
3129
/config/dev/devel.toolbar.settings.yml
@@ -57,9 +55,9 @@ node_modules/
5755
/docroot/sites/*/files
5856
/docroot/sites/*/private
5957
/docroot/sites/*/drushrc.php
60-
/docroot/sites/*/aegir.services.yml
6158
/docroot/sites/*/settings.php
6259
/docroot/sites/*/local.settings.php
60+
/docroot/sites/*/settings.local.php
6361
/docroot/sites/all/drush/drushrc.php
6462

6563
!/docroot/sites/default/settings.php
@@ -80,10 +78,7 @@ node_modules/
8078
/tests/*/cypress/screenshots
8179
/tests/*/cypress/videos
8280

83-
# Ignore local lando config
84-
.lando.local.yml
85-
.lando/zzz*local.ini
86-
.lando.compose.yml
81+
# Ignore local config
8782
datadog-setup.php
8883

8984
# Cache file used by PHPUnit

.lando.local.yml.example

-45
This file was deleted.

0 commit comments

Comments
 (0)