#elixir #appveyor
#elixir #appveyor
Вопрос:
Я пытаюсь настроить конвейер CI / CD с помощью AppVeyor для пользовательского плагина RabbitMQ, написанного как приложение Erlang / OTP. Для этого я использовал базовый образ Linux, но я должен установить множество зависимостей.
Основная проблема заключается в установке правильной версии Elixir.
Несмотря на то, что я установил Elixir с помощью ASDF и скорректировал PATH
переменную среды, команда все еще не найдена в процессе сборки.
Вот выдержка из журнала:
[00:00:04] mkdir ./sources
[00:00:04] git clone https://github.com/asdf-vm/asdf.git ./sources/asdf --branch v0.4.3
[00:00:04] Cloning into './sources/asdf'...
[00:00:04] Note: checking out 'bcc959f6ef743d5362e5f08667fc8beb9dee07dc'.
[00:00:04]
[00:00:04] You are in 'detached HEAD' state. You can look around, make experimental
[00:00:04] changes and commit them, and you can discard any commits you make in this
[00:00:04] state without impacting any branches by performing another checkout.
[00:00:04]
[00:00:04] If you want to create a new branch to retain commits you create, you may
[00:00:04] do so (now or later) by using -b with the checkout command again. Example:
[00:00:04]
[00:00:04] git checkout -b <new-branch-name>
[00:00:04]
[00:00:04] ./sources/asdf/bin/asdf plugin-add elixir
[00:00:04] initializing plugin repository...
[00:00:04] Cloning into '/home/appveyor/projects/amqp-filter-exchange/sources/asdf/repository'...
[00:00:05] Cloning into '/home/appveyor/projects/amqp-filter-exchange/sources/asdf/plugins/elixir'...
[00:00:05] ./sources/asdf/bin/asdf install elixir 1.6.6
[00:00:05] ==> Checking whether specified Elixir release/reference exists...
[00:00:06] ==> Downloading 1.6.6 to /tmp/elixir_build_kz98B0/elixir-precompiled-1.6.6.zip
[00:00:06] % Total % Received % Xferd Average Speed Time Time Time Current
[00:00:06] Dload Upload Total Spent Left Speed
[00:00:06]
[00:00:06] 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
[00:00:06] 20 5071k 20 1055k 0 0 3758k 0 0:00:01 --:--:-- 0:00:01 3755k
[00:00:06] 100 5071k 100 5071k 0 0 16.2M 0 --:--:-- --:--:-- --:--:-- 16.1M
[00:00:06] ==> Copying release into place
[00:00:07] ./sources/asdf/bin/asdf global elixir 1.6.6
[00:00:07] export PATH="$PATH:./sources/asdf/shims"
[00:00:07] which elixir
[00:00:07] ./sources/asdf/shims/elixir
[00:01:08] git clone https://github.com/rabbitmq/rabbitmq-public-umbrella.git ./sources/rabbitmq-public-umbrella
[00:01:08] Cloning into './sources/rabbitmq-public-umbrella'...
[00:01:14] which elixir
[00:01:14] ./sources/asdf/shims/elixir
[00:01:17] make -C ./sources/rabbitmq-public-umbrella co
[00:01:17] make: Entering directory '/home/appveyor/projects/amqp-filter-exchange/sources/rabbitmq-public-umbrella'
[00:01:17] DEP rabbit_common
[00:01:18] DEP amqp_client
[00:01:19] DEP amqp10_common
[00:01:20] DEP amqp10_client
[00:02:19] DEP rabbitmq_shovel
[00:02:23] DEP rabbitmq_web_dispatch
DEP ... many rabbitmq dependencies ...
[00:02:24] DEP rabbitmq_web_mqtt
[00:02:24] DEP rabbitmq_web_mqtt_examples
[00:02:25] DEP rabbitmq_web_stomp
[00:02:26] DEP rabbitmq_web_stomp_examples
[00:02:26] DEP rabbitmq_website
[00:02:30] make[1]: Entering directory '/home/appveyor/projects/amqp-filter-exchange/sources/rabbitmq-public-umbrella/deps/amqp_client'
[00:02:30] make[1]: elixir: Command not found
[00:02:30] make[2]: Entering directory '/home/appveyor/projects/amqp-filter-exchange/sources/rabbitmq-public-umbrella/deps/rabbit_common'
[00:02:30] make[2]: elixir: Command not found
Комментарии:
1. asdf устанавливает elixir в домашнюю директорию пользователя. Это правильно?
2. Вы добавили относительный путь к папке
$PATH
, это может быть проблематично. Работает ли это, если выexport PATH="$PATH:/home/appveyor/projects/amqp-filter-exchange/sources/asdf/shims"
?