by honkycat · 4y ago · 0 comments
Unfortunately, we rejected it at our organization due to how verbose the commands are. I want my users to be able to say `earthly plan-stage` for a terraform repo, and for it to work. But you cannot.
You cannot have earthly automatically use environment variables from your env, you have to explicitly list the commands yourself using flags:
$ earthly \
--build-arg AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
--build-arg AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
--build-arg AWS_DEFAULT_REGION=us-west-2 \
--build-arg AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN \
--build-arg AWS_SECURITY_TOKEN=$AWS_SECURITY_TOKEN \
+plan-stage
This means if I want to `terraform plan` something, I need to explicitly set all of my AWS environment variables.Compare this to `task plan-stage` or `make plan-stage`.
It is much too verbose and will only get worse as we add features to our pipelines.
earthly \
--secret-file config=/home/user/.aws/config \
+build
But yes, Earthly optimizes for reproducibility, so implicitly pulling in ENVs is not something it does.Earthly seems very useful to work around issues like cross-compiling. A simple example that I'd expect a lot of people to run into is running into libc/stdlibc++ differences with Alpine containers. That is easy to come across when doing something as simple as pulling in a Python pip dependency that wants to compile native C/C++ code. I find this extremely difficult to learn to do in Bazel.
However if you're in the league of complex cross-compiling, then you may already be on CMake and/or Bazel and have the dev resources to define the toolchains as needed.
I think you’re better of using something like taskfile w/ earthly for a really good workflow, it gives you the best of both worlds.
(Actually I think I saw this on their slack)
They sell it as a make replacement. Bazel constantly says "you don't need hazel, it is a big tool" and earthly does not. Which is fine.
Either way, I already said earthly is a great tool. This is just my feedback around why it doesnt fit my use case.
Worth watching the reported issue at https://github.com/earthly/earthly/issues/707
Thumbs-ups on tickets and comments help us prioritize features.
We already have a PR up for the `earthly ls` feature.