You may define one or more environments in this file,
an environment's settings will override those of a release
when building in that environment, this combination of release
and environment configuration is called a profile
environment :dev do
If you are running Phoenix, you should make sure that
server: true is set and the code reloader is disabled,
even in dev mode.
It is recommended that you build with MIX_ENV=prod and pass
the --env flag to Distillery explicitly if you want to use
dev mode.
set dev_mode: true
set include_erts: false
set cookie: :"6=e1x}GQ^Ks>u{MGCU<6}4z9giA,q$QCm7;4k&iV;%aSc}vPS8ffX<((t7unWf"
end
environment :prod do
set include_erts: true
set includesrc: false
set cookie: :"GNon%8:0.uV,ey2p,L9$ezJ%:PWN?HD^W%/jwKD=15k.<`@KpenAY$C$&IQa$Me"
end
You may define one or more releases in this file.
If you have not set a default release, or selected one
when running mix release, the first release in the file
will be used by default
release :infinity_one do
set version: current_version(:infinity_one)
set applications: [
:runtime_tools,
:logger,
:coherence,
:earmark,
:exjsx,
:gen_state_machine_helpers,
:license_manager,
:neotoma,
:sbroker,
:elixir_make
]
set commands: [
"migrate": "rel/commands/migrate.sh",
"setup": "rel/commands/setup.sh",
"create": "rel/commands/create.sh",
"drop_database": "rel/commands/drop_database.sh",
"config_ha": "rel/commands/config_ha.sh",
"remove_ha": "rel/commands/remove_ha.sh"
]
plugin Conform.ReleasePlugin
end
Is there documentation that says one thing, but Distillery does
another? If so, please link the doc here so it can be updated if
it's a documentation issue, or so that the fix can be based around
what's documented.
No
If this is a runtime configuration issue, please also provide your config file
(with any sensitive information stripped of course). This is almost
always necessary to understand why some configuration may not be working.
No
If you do not provide the above information and I need it to help troubleshoot, it may delay things significantly,
as I will have to ask you for all of these things anyway. Help me help you!
Steps to reproduce
Build of application rpm package
Verbose Logs
........ Generated artificery app ==> distillery Compiling 33 files (.ex) Generated distillery app ==> rebel Compiling 18 files (.ex) ......... ==> Assembling release.. ==> Building release infinity:1.1.0-dev2 using environment dev ==> Plugin failed: no function clause matching in Keyword.get/3 (elixir) lib/keyword.ex:179: Keyword.get(nil, :vsn, nil) lib/conform/releases/plugin.ex:51: Conform.ReleasePlugin.before_assembly/1 lib/mix/lib/releases/plugins/plugin.ex:193: Mix.Releases.Plugin.call/3 lib/mix/lib/releases/plugins/plugin.ex:184: Mix.Releases.Plugin.call/2 lib/mix/lib/releases/assembler.ex:27: Mix.Releases.Assembler.pre_assemble/1 lib/mix/lib/releases/assembler.ex:46: Mix.Releases.Assembler.assemble/1 lib/distillery/tasks/release.ex:130: Mix.Tasks.Release.do_release/2 (mix) lib/mix/task.ex:314: Mix.Task.run_task/3 (mix) lib/mix/cli.ex:80: Mix.CLI.run_task/2 (elixir) src/elixir_compiler.erl:85: :elixir_compiler.dispatch/6 (elixir) src/elixir_lexical.erl:18: :elixir_lexical.run/3 (elixir) src/elixir_compiler.erl:27: :elixir_compiler.quoted/3 (elixir) lib/code.ex:677: Code.require_file/2 (elixir) lib/kernel/cli.ex:504: Kernel.CLI.wrapper/1 (elixir) lib/enum.ex:1294: Enum."-map/2-lists^map/1-0-"/2 (elixir) lib/kernel/cli.ex:68: Kernel.CLI.process_commands/1 (elixir) lib/kernel/cli.ex:26: anonymous fn/2 in Kernel.CLI.main/1 (elixir) lib/kernel/cli.ex:105: anonymous fn/3 in Kernel.CLI.exec_fun/2
!/bin/sh
RPM_SOURCE_DIR="/root/rpmbuild/SOURCES" RPM_BUILD_DIR="/root/rpmbuild/BUILD" RPM_OPT_FLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic" RPM_ARCH="x86_64" RPM_OS="linux" export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS RPM_DOC_DIR="/usr/share/doc" export RPM_DOC_DIR RPM_PACKAGE_NAME="infinity" RPM_PACKAGE_VERSION="1.1.0" RPM_PACKAGE_RELEASE="0dev2.el6" export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE LANG=C export LANG unset CDPATH DISPLAY ||: RPM_BUILD_ROOT="/root/rpmbuild/BUILDROOT/infinity-1.1.0-0dev2.el6.x86_64" export RPM_BUILD_ROOT
PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/usr/lib64/pkgconfig:/usr/share/pkgconfig" export PKG_CONFIG_PATH
set -x umask 022 cd "/root/rpmbuild/BUILD" cd 'infinity' LANG=C export LANG unset DISPLAY
MIX_ENV=prod mix do deps.get, deps.compile, compile
MIX_ENV=prod mix do phx.digest, conform.configure, release --env=prod
Description of issue
What are the expected results? Successful completion of mix release
What version of Distillery? 2.0
What OS, Erlang/Elixir versions are you seeing this issue on? Centos 6 Linux, Erlang OTP 20, Elixir 1.6.2
If possible, also provide your
rel/config.exs
, as it is often my first troubleshooting question, and you'll save us both time :)cat rel/config.exs
Import all plugins from
rel/plugins
They can then be used by adding
plugin MyPlugin
toeither an environment, or release definition, where
MyPlugin
is the name of the plugin module.Path.join(["rel", "plugins", "*.exs"]) |> Path.wildcard() |> Enum.map(&Code.eval_file(&1))
use Mix.Releases.Config,
This sets the default release built by
mix release
For a full list of config options for both releases
and environments, visit https://hexdocs.pm/distillery/configuration.html
You may define one or more environments in this file,
an environment's settings will override those of a release
when building in that environment, this combination of release
and environment configuration is called a profile
environment :dev do
If you are running Phoenix, you should make sure that
server: true is set and the code reloader is disabled,
even in dev mode.
It is recommended that you build with MIX_ENV=prod and pass
the --env flag to Distillery explicitly if you want to use
dev mode.
set dev_mode: true set include_erts: false set cookie: :"6=e1x}GQ^Ks>u{MGCU<6}4z9giA,q$QCm7;4k&iV;%aSc}vPS8ffX<((t7unWf" end
environment :prod do set include_erts: true set includesrc: false set cookie: :"GNon%8:0.uV,ey2p,L9$ezJ%:PWN?HD^W%/jwKD=15k.<`@KpenAY$C$&IQa$Me" end
You may define one or more releases in this file.
If you have not set a default release, or selected one
when running
mix release
, the first release in the filewill be used by default
release :infinity_one do set version: current_version(:infinity_one) set applications: [ :runtime_tools, :logger, :coherence, :earmark, :exjsx, :gen_state_machine_helpers, :license_manager, :neotoma, :sbroker, :elixir_make ] set commands: [ "migrate": "rel/commands/migrate.sh", "setup": "rel/commands/setup.sh", "create": "rel/commands/create.sh", "drop_database": "rel/commands/drop_database.sh", "config_ha": "rel/commands/config_ha.sh", "remove_ha": "rel/commands/remove_ha.sh" ] plugin Conform.ReleasePlugin end
Is there documentation that says one thing, but Distillery does another? If so, please link the doc here so it can be updated if it's a documentation issue, or so that the fix can be based around what's documented. No
If this is a runtime configuration issue, please also provide your config file (with any sensitive information stripped of course). This is almost always necessary to understand why some configuration may not be working. No
If you do not provide the above information and I need it to help troubleshoot, it may delay things significantly, as I will have to ask you for all of these things anyway. Help me help you!