Currently, the build step we use to download the mhsendmail binary into each hogfrom service assumes that curl exists within said service.
This worked great until recently when bitnami removed curl from newer versions of nginx. You can see this failure demonstrated in #36. To provide a more robust service and to prep for Lando 4 we should make getting mhsendmail 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 assume apt/debian flavored images but adding apk support for alpine 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.
Currently, the build step we use to download the
mhsendmailbinary into eachhogfromservice assumes thatcurlexists within said service.This worked great until recently when bitnami removed
curlfrom 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 gettingmhsendmaila bit more sophisticated.So, the fix should be something like this:
1. Convert needed build steps into a shell script that lives in the
scriptsfolder.The script should test for the existence of
curland install it if needed, i think its probably OK to assumeapt/debianflavored images but addingapksupport foralpineimages 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
scriptsfolder in a plugin ends up in the/helpersfolder 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.