-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: Add a Tugboat scaffold #96 #123
Conversation
It turns out Tugboat validates configurations by sending them to a tugboat API. We'll need to generate and provide an access token for the new job to pass. |
TIL'ed you have to opt in via your job config for repository secrets to be visible. It's not mentioned on the settings UI at all. Eventually I found it at https://docs.github.com/en/actions/security-guides/encrypted-secrets#using-encrypted-secrets-in-a-workflow. |
The Readme has already been updated, with the new Tugboat variables and it is in a pull request. And also in the composer, you can support "acquia" and "tugboat" |
@deviantintegral I don't understand what this code would be for, if you can please explain it to me in more detail. Thank you |
Update the configs so if those variables aren't set we run a site:install instead. |
By default in the current Tugboat image, `/var/www/html` is a symlink to `/var/www/html.original`, so the `[ -d ]` (is file) shell test prevents the new symlink from being created. Let's just always go ahead and create the symlink, removing the shell test to abort when an existing symlink is found.
😮 tests are passing! Well, except the env one which I think is unrelated and being fixed elsewhere. |
strategy: | ||
matrix: | ||
php-version: [7.3, 7.4, 8.0] | ||
php-version: ["7.3", "7.4", "8.0"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this actions was treating these as numbers and dropping the .0
from 8.0
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦♀️
cd /usr/local/bin | ||
curl -O https://dashboard.tugboatqa.com/cli/linux/tugboat.tar.gz | ||
tar xzvf tugboat.tar.gz | ||
- name: Validate Tugboat file generation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These could be turned into matrix parameters in the future, but it's fast now and saves burning CI time on the setup steps.
"tugboat": { | ||
"provider": { | ||
"host": "acquia", | ||
"downsync": true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It turns out we don't actually have a task command to downsync from Acquia. @marcoscano or @hawkeyetwolf think that's something you'd like to contribute based on your other project work?
@@ -11,11 +11,13 @@ | |||
}, | |||
"require": { | |||
"php": "^7.3||^8.0", | |||
"ext-json": "*", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved this up as it's common to group php and extensions together.
I'm currently working on building a tugboat nginx + php image. I have it building, but nginx is not fully configured yet. Once I have something I can point the tugboat image too I will update this PR. |
This PR adds support for Tugboat resolving #96.
To turn it on, add
tugboat
to Drainpipe'sextra
section incomposer.json
following the README such as:This PR adds twig as a dependency to assist in rendering configuration files. I first tried to make it so each section was composed "simply" by concatenating files, but that didn't work well. Twig is already part of Drupal so it's not being added completely new. I still refactored the commands out just to save having to edit tugboat command steps directly in YAML.
We talked about pulling in the PHP version from hosting provider files, but that won't cover Acquia hosts. Instead, we use composer to determine the PHP version.
If you set the host to
acquia
, you get mysql and memcached. If you setpantheon
you getmariadb
andredis
.Testing:
I turned on memcache admin and see it working for Acquia. I need to double check that for Pantheon too:
bats
or similar.To do:
settings.php
.tugboat.acquia-example.yml
file that includes memcache.tugboat.pantheon-example.yml
file that includes redis.acquia
ortugboat
in the tugboat composer array to select one.