Skip to content

schiavo/va.gov-cms

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is an Aquia Lightning based implementation of Drupal 8 that uses Lando for local container management.

Get Started

How to start:

Example workflow:

  • git fetch --all
  • git checkout --branch <VAGOV-000-name> origin/develop
  • lando composer install
  • lando sync-db
  • lando sync-files # (optional)

What it does:

  • Spins up php, mysql, and node containers
  • Dependencies (including components project) are pulled in via composer
  • Base config installs uswds and sets a subtheme for this project (project is headless, so this isn't critical)

How to use:

  • visit the site by clicking one of the urls provided (aliased and https options are available)
  • compile scss to css by going to theme dir and running lando gulp
  • drush commands are prefixed with lando, e.g.: lando drush cr
  • composer is used for project management, e.g.: composer require drupal/uswds

Theme structure (project is headless, so this isn't critical):

Running Behat Tests:

  • cd tests/behat
  • lando behat --tags=name-of-tag

Running Phpunit Tests:

  • cd tests
  • lando phpunit {Path-to-test} to run a test group use
  • lando phpunit . --group security

groups include

  • migration
  • performance
  • security

Triggering Metalsmith static site builds at /admin/config/build-trigger

  • @see va_gov_build_trigger.module
  • Uncomment the va-socks-proxy code in .lando.yml
  • Uncomment the "VA_CMS_BOT_GITHUB_AUTH_TOKEN" in the appserver container in .lando.yml
  • export the following local environment variables from va.gov-cms-devops Ansible Vault and then run lando rebuild --yes. Contact Mouncif or Elijah in Slack #cms-engineering to obtain these ENV variables:
    • VA_CMS_BOT_GITHUB_AUTH_TOKEN
    • VA_SOCKS_PROXY_PRIVATE_KEY
    • VA_SOCKS_PROXY_SSH_CONFIG

Trigger local build of Drupal content in vets-website yarn build --pull-drupal

Naming Conventions:

  • Modules: vagov_modulename
  • Content types: vagov_contentype
  • Fields: field_[contenttypename]_fieldname

Xdebug:

  • Setup:
    • Enable Xdebug by uncommenting the xdebug: true line in .lando.yml
    • Run lando rebuild
    • Configure PHPStorm: Go to Settings > Languages & Frameworks > PHP > Debug
    • Check "allow connections" and ensure max connections is 2
    • Enable "Start listening for PHP debug connections"
  • Browser:
    • Open index.php and set a test breakpoint on the first line ($autoloader)
    • Go to vagovcms.lndo.site in your browser (no extension needed) and it should trigger an "incoming connection" in PHPStorm, accept it
  • CLI:
    • Open Settings > Languages & Frameworks > PHP > Servers and change the server name to "appserver"
    • Set a test breakpoint on /docroot/vendor/drush/drush/drush
    • Run lando drush status and it should trigger the breakpoint

Troubleshooting:

Workflow:

Todo:

  • decide how we are going to sync files across environments
  • work out settings.php for various environments - lando db settings are stored in settings.lando.php

About

CMS for va.gov

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CSS 49.5%
  • PHP 31.0%
  • Gherkin 10.6%
  • HTML 5.0%
  • Shell 2.3%
  • JavaScript 1.4%
  • Other 0.2%