pantheon-systems / site-audit-tool
Drush global extension to run Site Audit checks on Drush 8 and 9
Installs: 13 864
Dependents: 0
Suggesters: 0
Security: 0
Stars: 11
Watchers: 47
Forks: 7
Open Issues: 2
Type:drupal-drush
Requires
- php: >=5.6
Requires (Dev)
- composer/installers: ^1.2
- drupal/core-composer-scaffold: ^8.8.1
- drupal/core-recommended: ^8.8
- drupal/php: ^1
- drush/drush: 10.4.0 || 11.x-dev
- g1a/composer-test-scenarios: ^3.0.2
- pantheon-systems/drupal-integrations: ^8
- symfony/filesystem: ^3.4.28
- webflo/drupal-finder: ^1.1.0
- webmozart/path-util: ^2.3
- yoast/phpunit-polyfills: ^1.0
- 1.x-dev
- dev-master / 1.x-dev
- 1.2.15
- 1.2.14-RC2
- 1.2.14-RC1
- 1.2.13
- 1.2.12
- 1.2.11
- 1.2.11-alpha1
- 1.2.10
- 1.2.9
- 1.2.8
- 1.2.7
- 1.2.7-RC4
- 1.2.7-RC3
- 1.2.7-RC2
- 1.2.7-RC1
- 1.2.6
- 1.2.5
- 1.2.5-RC6
- 1.2.5-RC5
- 1.2.5-RC4
- 1.2.5-RC3
- 1.2.4-RC2
- 1.2.4-RC1
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.9
- 1.1.8
- 1.1.7
- 1.1.6
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- dev-add-catalog-workflow-20241010
- dev-rename-catalog-info-20240923
- dev-add-catalog-info-20240910
- dev-remove-unused-fixtures
- dev-CdrMarks-patch-1
- dev-bugs-5461-deprecations
- dev-CMS-795-Audit-Improvements
- dev-cms-632-ingore-gitignore
- dev-cms-382-fix-duplicate-module-detection-false-positive
- dev-cms-593-folder-structure-warning-fixes
- dev-1.2.12-cms-661
- dev-1.2.11-composer-updates1
- dev-BUGS-4509-Edge-Case
- dev-BUGS-4509-Exclusion-Check
- dev-BUGS-4509-Exclusion-Fix
- dev-4509-Site-Audit-Check-Exclude
- dev-test-on-php8
- dev-test-on-php8-drush11
- dev-3381-site-audit-uid1
- dev-render
- dev-reroll-3216
- dev-3216-site-audit-views
- dev-composer2-again
- dev-site-audit-operational-fixes
- dev-version-command
- dev-core-1386-moar-tests
- dev-check-comments
- dev-fix-dev-deps
This package is auto-updated.
Last update: 2024-11-11 01:27:09 UTC
README
This is an experimental Drush extension.
Goal: Create a Global Drush command that runs all of the checks in the Site Audit 2.x branch.
Potential future goal: Share checks between the Global Drush command in the Site Audit 3.x branch.
See the #3052993 in the Site Audit issue queue.
Usage
Ideally, this Drush command will become a dependency of the Site Audit module; if that happens, it will be available once the Site Audit module is installed into a Composer-managed site.
You may also install this module to any location that Drush searches for global or site-local commands. It does not need its vendor directory.
Development
In development, clone this repository, then set up the System Under Test (sut) via:
composer install
composer drupal:scaffold
That will set up your local project to run and test with Drush 9. To use Drush 8 instead:
composer scenario drush8
The Composer Test Scenarios project is used to manage the Composer dependencies needed to test different scenarios of this project. Running composer scenario
is like running composer install
; it will install the appropriate dependencies for the requested testing scenario. Run composer install
to return to the default installation.
To use this extension as a global Drush command, set up your global drush.yml file as follows:
drush:
paths:
include:
- '${env.home}/path/to/drush-extensions'
Then install this project to ~/path/to/drush-extensions/Commands/site-audit-tool
Running Tests
Set up for 'development' as described in "Development" section. Then, run:
composer test
Ad-hoc Testing
In development:
composer drush audit:best-practices
This will run the given Drush command against a local test Drupal site, the "system under test". Run the tests once to install the Drupal site.
Testing via Tagged Deploy
- After your work is ready to test in a production environment, cut a new RC tag from your branch and push that tag to github.
- Check out the cos-framework-clis repo
- Update the
drush/Dockerfile
to use the tag you just pushed as the value forsite_audit_tool_version
- At present, you must build the containers locally to push them to
quay.io
, so from thecos-framework-clis
repo:cd drush
make build-drush10
(or whichever version needed)docker push {BUILD-TAG-NAME}
- Tag name should be something like
quay.io/getpantheon/cos-drush:v10-sandbox-eco-cef2a7a-dirty-689f4da
- If tag name is only a short name like
v10
, DO NOT PUSH OR YOU WILL DEPLOY IMMEDIATELY TO PRODUCTION.
- Tag name should be something like
- SSH into a Ygg node
ygg /sites/{SITE}/environments/{ENVIRONMENT}/workflows -X POST -d '{"type": "change_environment_image", "params": {"server_type": "appserver", "container_name": "drush", "tag": "{TAG}"}}' | jq .
- Your site will now be using the new site-audit-tool version and all related functionality can be tested.