-
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
cURL not universally available #35
Comments
I can take this one unless someone else wants it. |
@pirog @reynoldsalec - Do you know of any docs on how to do #2 above? I get that I can create a scripts folder and do a bash script in there, and that it maps to the helpers folder in the build process (weird), but looking through the other plugins that do this, they all rely on a services object being defined earlier in the builder, which this builder.js doesn't have. I can't seem to make it call the shell script. EG, right now I'm trying to do:
but it throws "ERROR ==> Cannot read properties of undefined (reading 'services')". How do I make it call the helpers /mailhog.sh script? |
@matthewgarrettks here's an example in the Pantheon builder of adding the scripts as build steps: https://github.com/lando/pantheon/blob/main/builders/pantheon.js#L42 After LMK if you have more questions! |
Sorry gang, I'm buried in other work, unassigning myself from this in hopes someone else will pick it up. |
Currently, the build step we use to download the
mhsendmail
binary into eachhogfrom
service assumes thatcurl
exists within said service.This worked great until recently when bitnami removed
curl
from newer versions ofnginx
. You can see this failure demonstrated in #36. To provide a more robust service and to prep for Lando 4 we should make gettingmhsendmail
a bit more sophisticated.So, the fix should be something like this:
1. Convert needed build steps into a shell script that lives in the
scripts
folder.The script should test for the existence of
curl
and install it if needed, i think its probably OK to assumeapt/debian
flavored images but addingapk
support foralpine
images wouldnt be horrible.Then the script should download the arch specific binary, move it into PATH and make it executable.
2. Invoke the script as a build step
Everything put into the
scripts
folder in a plugin ends up in the/helpers
folder in each container so we should switch the build step to just run that script. It's possible we need to pass in an option/arg to handle the different architectures. I'm a bit confused on how that works tbh.3. The tests should pass
We should also add the code from #36 and make sure those tests pass.
The text was updated successfully, but these errors were encountered: