Skip to content

Commit

Permalink
VACMS-8588: Convert all remaining lando references to ddev (2) (#9461)
Browse files Browse the repository at this point in the history
Co-authored-by: Steve Wirt <swirtSJW@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nate Douglas <ndouglas@users.noreply.github.com>
Co-authored-by: Nathan Douglas <github@darkdell.net>
Co-authored-by: Cameron Eagans <me@cweagans.net>
Co-authored-by: Lynn Stahl <lynn.stahl@agile6.com>
Co-authored-by: Tanner Heffner <tanner.heffner@agile6.com>
Co-authored-by: Jill Adams <85581471+jilladams@users.noreply.github.com>
  • Loading branch information
9 people authored Jun 16, 2022
1 parent 0b7dcac commit 2ec599a
Showing 61 changed files with 363 additions and 967 deletions.
2 changes: 1 addition & 1 deletion .ddev/commands/web/pre-commit
Original file line number Diff line number Diff line change
@@ -4,4 +4,4 @@
## Usage: pre-commit

set -e
./scripts/lando-precommit.sh
./scripts/precommit.sh
2 changes: 1 addition & 1 deletion .ddev/config.yaml
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ web_environment:
- BLACKFIRE_CLIENT_TOKEN=~
- BLACKFIRE_SERVER_ID=~
- BLACKFIRE_SERVER_TOKEN=~
- CMS_ENVIRONMENT_TYPE=ddev
- CMS_ENVIRONMENT_TYPE=local
- CMS_MARIADB_DATABASE=db
- CMS_MARIADB_USERNAME=db
- CMS_MARIADB_PASSWORD=db
4 changes: 4 additions & 0 deletions .ddev/docker-compose.web-env.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
services:
web:
env_file:
- ../.env
50 changes: 29 additions & 21 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
{
"name": "va.gov-cms",
"settings": {
"editor.formatOnSave": true,
"terminal.integrated.shell.linux": "/bin/bash",
"workbench.startupEditor": "readme"
},
"extensions": [
"cweijan.vscode-mysql-client2",
"dbaeumer.vscode-eslint",
"eamodio.gitlens",
"esbenp.prettier-vscode",
"felixfbecker.php-debug",
"felixfbecker.php-intellisense",
"github.vscode-pull-request-github",
"neilbrayfield.php-docblocker",
"stylelint.vscode-stylelint",
"valeryanm.vscode-phpsab"
],
"postCreateCommand": "/bin/bash ./.devcontainer/post-create.sh 2>&1 | tee ~/post-create.log",
"postStartCommand": "/bin/bash ./.devcontainer/post-start.sh 2>&1 | tee ~/post-start.log"
}
"name": "va.gov-cms",
// https://github.com/drud/ddev/issues/3914
// https://code.visualstudio.com/remote/advancedcontainers/environment-variables
"containerEnv": {
"DDEV_PRETEND_GITPOD": "true"
},
"remoteEnv": {
"DDEV_PRETEND_GITPOD": "true"
},
"settings": {
"editor.formatOnSave": true,
"terminal.integrated.shell.linux": "/bin/bash",
"workbench.startupEditor": "readme"
},
"extensions": [
"cweijan.vscode-mysql-client2",
"dbaeumer.vscode-eslint",
"eamodio.gitlens",
"esbenp.prettier-vscode",
"felixfbecker.php-debug",
"felixfbecker.php-intellisense",
"github.vscode-pull-request-github",
"neilbrayfield.php-docblocker",
"stylelint.vscode-stylelint",
"valeryanm.vscode-phpsab"
],
"postCreateCommand": "/bin/bash ./.devcontainer/post-create.sh 2>&1 | tee ~/post-create.log",
"postStartCommand": "/bin/bash ./.devcontainer/post-start.sh 2>&1 | tee ~/post-start.log"
}
25 changes: 12 additions & 13 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
#!/bin/bash

# Download lando https://docs.lando.dev/basics/installation.html#linux
wget -O /tmp/lando-stable.deb https://files.devwithlando.io/lando-stable.deb

# Install lando https://docs.lando.dev/basics/installation.html#docker-ce
sudo dpkg -i --ignore-depends=docker-ce /tmp/lando-stable.deb

# Remove lando package.
rm /tmp/lando-stable.deb
# Install ddev.
curl https://raw.githubusercontent.com/drud/ddev/master/scripts/install_ddev.sh | bash

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

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

# Start lando.
lando start
# Populate a .env file for ddev and friends.
cp .env.example .env

# To avoid a blocking prompt. See https://ddev.readthedocs.io/en/stable/users/cli-usage/#opt-in-usage-information.
ddev config global --instrumentation-opt-in=true

# Start ddev.
ddev start

# Import the database.
./scripts/sync-db.sh
./scripts/sync-files.sh
ddev pull va --skip-files -y

echo
echo "All done! Welcome to the VA.gov CMS :-)"
echo "All done! Welcome to the VA.gov CMS :-)"
7 changes: 3 additions & 4 deletions .devcontainer/post-start.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash

# Start lando if it's not already running.
LANDO_SERVICE_COUNT=$( lando list --format json | jq '.[].status' | wc -l )
if [[ ${LANDO_SERVICE_COUNT} -lt 4 ]]; then
lando start
# Start ddev if it's not already running.
if [ -x "$(command -v ddev)" ] && ! docker ps | grep ddev > /dev/null; then
ddev start
fi
20 changes: 20 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# ddev Environment Variables
#
# This file is used by the file scripts/composer/EnvironmentHandler.php for setting environment variables when running the
# site using the ddev local development environment.
#
# If you wish to override these, you can create a .env file and that will be loaded instead.

# Used by WEB build process.
DRUPAL_ADDRESS=https://va-gov-cms.ddev.site

# Used by behat tests.
# DO NOT use environment variable insertion here. Other systems may load this in a different order.
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"}}}}

# Keep this to ensure environment type is set.
CMS_ENVIRONMENT_TYPE=local

# You can uncomment this to develop environment-specific functionality like the
# Rebuild & Deploy Page
# CMS_ENVIRONMENT_TYPE=prod
30 changes: 0 additions & 30 deletions .env.lando

This file was deleted.

9 changes: 2 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -24,8 +24,6 @@
# Ignore NPM managed dependencies
node_modules/

# Ignore local dev files
/docroot/sites/default/settings/settings.local.php
# Prevent Devel from appearing anywhere.
/config/dev/devel.settings.yml
/config/dev/devel.toolbar.settings.yml
@@ -57,9 +55,9 @@ node_modules/
/docroot/sites/*/files
/docroot/sites/*/private
/docroot/sites/*/drushrc.php
/docroot/sites/*/aegir.services.yml
/docroot/sites/*/settings.php
/docroot/sites/*/local.settings.php
/docroot/sites/*/settings.local.php
/docroot/sites/all/drush/drushrc.php

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

# Ignore local lando config
.lando.local.yml
.lando/zzz*local.ini
.lando.compose.yml
# Ignore local config
datadog-setup.php

# Cache file used by PHPUnit
45 changes: 0 additions & 45 deletions .lando.local.yml.example

This file was deleted.

Loading

0 comments on commit 2ec599a

Please sign in to comment.