GoogleCloudPlatform / elixir-runtime

The community-supported runtime for Elixir on Google App Engine.
https://cloud.google.com/elixir
Apache License 2.0
180 stars 14 forks source link

App Deployment using distillery fails due to missing mix task #25

Closed ghost closed 5 years ago

ghost commented 5 years ago

When trying to deploy a distillery release, the deployment fails as step 12 with no mix release task found.

Step #1: Generated qi3_gateway app Step #1: Removing intermediate container 19db97fb2f2e Step #1: ---> 6cea423d2424 Step #1: Step 12/15 : RUN mix release --env=dev --verbose Step #1: ---> Running in 6504cc6ddb1c Step #1: ** (Mix) The task "release" could not be found Step #1: The command '/bin/sh -c mix release --env=dev --verbose' returned a non-zero code: 1 Finished Step #1 ERROR ERROR: build step 1 "gcr.io/cloud-builders/docker:latest" failed: exit status 1 Step #1:

devx-opensource commented 5 years ago

We faced the same issue and had to fix the dependency to distillery to a version prior to 2.1.x: {:distillery, "~> 2.0.0"}

dazuma commented 5 years ago

Thanks for the report. It looks like distillery 2.1.0 changed the names of these mix tasks (presumably to avoid clashing with new Elixir 1.9 tasks). I'll see what I can do, but in the meantime, yes, I recommend pinning to ~> 2.0.0.

dazuma commented 5 years ago

I just pushed a new release of the runtime. It adjusts what task it calls based on what version of distillery is present in your mix.lock (and it also supports calling the Elixir 1.9 release task if distillery is not present at all).

hisapy commented 5 years ago

Thanks for this. I'm not using this runtime but had a (Mix) The task "release" could not be found when building my Docker image and I didn't notice that Distillery changed its mix tasks names.