-
Notifications
You must be signed in to change notification settings - Fork 124
META: Reduce boilerplate in composer.json and circle.yml #61
Comments
Related to #14 |
A couple of words on goals. Ultimately, for source code repositories, we would like to support:
For CI services, we would like to support:
And, of course, for each of these, we want to support:
That's plenty of permutations, and it doesn't even count the distributions! For all of those service, it is beneficial to move code/scripts that will not be customized by the user out of composer.json / circle.yml (or equivalent) and into a Terminus plugin or Quicksilver script or an external repository that can be cloned, as suggested in the OP. In instances where end-user customization is necessary, it's better to put it in composer.json rather than circle.yml, as there will be multiple variants of the CI script file (for different services), but all will use the same composer.json file. I'm strongly in favor of this effort as a whole. Let's discuss each potential improvement in its own issue, as suggested. We should be cautious about optimizations that introduce complexity, and do so only where necessary. |
Agreed.
Double agreed. I put my thoughts on testing the permutations over in pantheon-systems/terminus-build-tools-plugin#5 |
Summary of discussion on reducing boilerplate.
There are some items that will need additional thought / work to migrate. composer.json items Drupal Scaffold Currently, our example project includes the configuration settings that the drupal-scaffold tool uses to determine which files to scaffold. Currently, drupal-scaffold checks only the root-level composer.json for this file list. We could allow drupal-composer/drupal-project to scaffold the Drupal 8 files from the standard drupal.org repository, and then fix up the Pantheon customizations / additional files as a separate step handled by our project. rvtraveller/qs-composer-installer Composer installers need to be included from the top-level composer.json file. We'd probably need to make our Installation steps The Terminus Build Tools Plugin currently reads the Configuration export The Terminus Build Tools Plugin exports configuration at the end of the Commit Comment Scripts PR Workflow We wouldn't need to support the PR workflow as part of an MVP for our
Behat Tests Presumably behat test templates are provided by the project that the user selects to install (contenta, lightning et. al.) |
Looking at the composer installer documentation again, it looks like composer installers can perhaps be included from a sub-project, although the info in |
This package looks like a promising boilerplate reducer: https://github.com/hussainweb/drupal-composer-helper |
Although they are both less than 100 lines, both
composer.json
andcircle.yml
have a lot of complexity that we are likely to copy into other repos for WordPress, Drupal 7, and many Drupal distributions like Lightning and commerce. To make the maintenance of a growing number of Composer examples more sustainable, we should reevaluate dependencies and places code can be shared. I will make individual issues for specific topics likeinstaller-paths
config from composer.json and moving it to a package (since we are already relying an a Pantheon-specific package to provide Quicksilver installer-paths)The text was updated successfully, but these errors were encountered: