本文介绍了在Heroku上部署时,DPL不能与新的Farady版本配合使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在GitLab上的CI/CD使用DPL在Heroku上部署代码。在新版本的法拉第(我猜这就是原因)问世之前,它一直像一个护身符一样发挥着作用。
这是我的GitLab CI终端工作时(昨天)的情况:
...
$ dpl --provider=heroku --app=$HEROKU_STAGING_APP --api-key=$HEROKU_API_KEY
Installing deploy dependencies
Successfully installed rendezvous-0.1.3
Successfully installed netrc-0.11.0
Successfully installed multipart-post-2.1.1
Successfully installed faraday-rack-1.0.0
Successfully installed faraday-patron-1.0.0
Successfully installed faraday-net_http_persistent-1.2.0
Successfully installed faraday-net_http-1.0.1
Successfully installed faraday-httpclient-1.0.1
Successfully installed faraday-excon-1.1.0
Successfully installed faraday-em_synchrony-1.0.0
Successfully installed faraday-em_http-1.0.0
Successfully installed faraday-1.8.0
Successfully installed dpl-heroku-1.10.16
13 gems installed
authentication succeeded
checking for app XXX
found app XXX
Preparing deploy
...
以下是我今天得到的信息:
...
$ dpl --provider=heroku --app=$HEROKU_STAGING_APP --api-key=$HEROKU_API_KEY
Installing deploy dependencies
Successfully installed rendezvous-0.1.3
Successfully installed netrc-0.11.0
Successfully installed faraday-2.0.0
Successfully installed dpl-heroku-1.10.16
4 gems installed
Preparing deploy
No stash entries found.
/usr/local/bundle/gems/faraday-2.0.0/lib/faraday/rack_builder.rb:230:in `ensure_adapter!': An attempt to run a request with a Faraday::Connection without adapter has been made. (RuntimeError)
Please set Faraday.default_adapter or provide one when initializing the connection.
...
我试图将--SKIP_CLEANUP添加到DPL调用as seen here,但它不起作用。也许我可以强制使用老版本的法拉第?但我找不到任何来源来尝试这一点。推荐答案
这对此情况可能很有用
https://github.com/travis-ci/dpl/issues/1247
这篇关于在Heroku上部署时,DPL不能与新的Farady版本配合使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!