Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Feature Idea: PAReview.sh as installed extra #1197

Closed
PieterDC opened this issue Mar 3, 2017 · 10 comments
Closed

Feature Idea: PAReview.sh as installed extra #1197

PieterDC opened this issue Mar 3, 2017 · 10 comments

Comments

@PieterDC
Copy link

PieterDC commented Mar 3, 2017

Issue Type

Feature Idea

Summary

Support PAReview.sh as optional extra because the Drupal project application checklist recommends it as a way to check coding standards and style. And it's better to be able to check those things before pushing Drupal code to a repo.

@geerlingguy
Copy link
Owner

@PieterDC - Definitely a valid request. I've considered adding a few workflow-specific tools to Drupal VM in the past (it is, after all, "Drupal" VM and not "generic PHP CMS VM"). However, since the tool would probably be used only by a small percentage of all Drupal VM users, I'd rather not maintain a separate role and/or functionality to grab the script, put it in place, etc.

However, I would like to document how it can be done quickly/easily in this ticket for those who want to use it—either via a post provision script or task file...

@geerlingguy
Copy link
Owner

Also, note that this script is a wrapper around some tooling that is usually best as part of a Drupal project itself (e.g. how Acquia BLT wraps up coding standards reviews, PHPUnit tests, and Behat tests in a Drupal project codebase)—therefore I've been shying away from adding things like that directly to Drupal VM.

@geerlingguy
Copy link
Owner

geerlingguy commented Mar 13, 2017

Working on this now... I think we can get a script in the example scripts dir that will do 99% of the work, and then you just copy and paste a few variables into your config.yml to get the rest done :)

Testing this on Honeypot now. Apparently I still have a master branch lurking in that project! See: https://www.drupal.org/node/2860293

@geerlingguy
Copy link
Owner

geerlingguy commented Mar 13, 2017

Tested and working! Basically, you add the following to config.yml, and you're off to the races!

post_provision_scripts:
  - "../examples/scripts/pareview.sh"

composer_global_packages:
  - { name: hirak/prestissimo, release: '^0.3' }
  - { name: drupal/coder, release: '^8.2' }

nodejs_version: "6.x"
nodejs_npm_global_packages:
  - name: eslint

See full docs here: https://github.com/geerlingguy/drupal-vm/blob/master/examples/scripts/pareview.sh

@PieterDC
Copy link
Author

Wow. Thanks!

I created an internal task for our team to check this out with a suggestion on how to integrate this in our continuous deployment flow.

@geerlingguy
Copy link
Owner

Blog post with a detailed guide and more notes: Drupal's Contrib floodgates are open, PAReview your projects in Drupal VM!.

@attheshow
Copy link

A note to anyone else trying to use this...

The mention of eslint in the config.yml needs to be formatted like this:

nodejs_npm_global_packages:
  - name: eslint

See: #1301

@geerlingguy
Copy link
Owner

@attheshow - Is this documented incorrectly somewhere? I think I fixed my blog post (the one place I know I had mistyped the variable), but I want to try to make it so others don't run into the same issue :)

@oxyc
Copy link
Collaborator

oxyc commented Apr 17, 2017

In your comment here #1197 (comment)

@geerlingguy
Copy link
Owner

@oxyc oops! Fixed it.

sonfd pushed a commit to sonfd/drupal-vm that referenced this issue May 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants