-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically run drush inside of ddev #174
Conversation
@becw I think there might be a mismatch with the DDEV server name. When trying to spin this up, DDEV sets its URL to http://drupal-skeleton.ddev.site; however, the install commands seem to be trying to access http://example.ddev.site (or whatever you named the project during the I'm also seeing errors when trying to run |
That drush ev issue looks likely! The underlying issue is also described here: ddev/ddev#2547 |
As far as the URL mismatch goes, that happens because the |
@becw Unfortunately, I'm running into some issues with the Devel version and it's compatibility with D9, and it's preventing the install. I actually ran into this the other day when I was setting up Hampshire and opened a PR for the-build and drupal-skeleton. Can you take a look at those and see if these are valid solutions? |
@becw I merged |
@becw I tested this with an existing project, and it worked great for @eric-schmidt I haven't tested this on a first Drupal install yet, but I think this is an issue with the symlink that is created outside of DDEV here: I'm not exactly sure how we can figure out what the actual directory name will be inside of DDEV from outside. Maybe we could make it relative somehow? |
Does this matter (maybe this is exactly what you were already discussing above)?
It seems to correctly detect whether Drupal has been installed in spite of the error. I can confirm that the symlink is created from the host machine perspective and results in: Here is the step from earlier in the Phing task:
I'm looking into a way to possibly fix that symlink. |
Blergh. It looks like relative symlinking is only available in Phing 3: That PR fixes this issue, which is exactly what we are trying to do, though: |
So, it turns out we can use the changes in the commit above as a patch for Phing 2, and it solves this issue with the missing |
@becw @eric-schmidt, I created a PR (#179) to patch Phing, but it will also require updating the skeleton to add I had to use a URL instead of a relative path, because Composer will install the patch from the perspective of the project root, not the-build's root. It would be better if the patch could be added to Phing 2 in the vendor's repo, but I'm not sure how long that would take, and we would need to wait on a release to use it in the-build. |
I confirmed the patch gets installed when running: After that, all that is needed to test is I'm opening a PR against the skeleton for testing. |
I opened a PR for Phing against what I think is the branch for version 2. I don't know if they are still doing bugfixes and releases, so it may not get merged. |
@becw @eric-schmidt we will need to do something similar for Behat when running |
Patch Phing to fix relative symlinks
If this is a ddev project, and we're outside of ddev, run ddev's drush command from phing instead of running drush directly.
After merging, we'll need to update and merge palantirnet/drupal-skeleton#121 in palantirnet/drupal-skeleton.
This actually seems to work! You can test this with:
Set up the codebase
Install Drupal at the prompt
When you're prompted to Install Drupal now (y,n)?, say y.
The site has been installed without ever logging in to ddev
Visit https://example.ddev.site/
Run other phing commands
For example: