How do I automatically deploy from Travis CI with the container-based infrastructure?

帅比萌擦擦* 提交于 2019-12-06 13:35:40

问题


When I use the Travis CI "container-based" infrastructure, I must have

sudo: false

set in my .travis.yml; but this appears to be incompatible with automatic deployment using, for example

deploy:
  provider: hackage

which causes my build to fail with

Installing deploy dependencies
sudo: must be setuid root

How can I use automatic deployment from Travis CI with the container-based infrastructure?


The final lines of the build log, starting with successful completion of the code build and test are:

The command "stack $ARGS --no-terminal --install-ghc test --haddock" exited with 0.
#cache.2
store build cache
83.58schanges detected, packing new archive
.
#...
.
uploading archive
#dpl.0
Fetching: dpl-1.8.7.gem (100%)
Successfully installed dpl-1.8.7
1 gem installed
#dpl.1
Installing deploy dependencies
sudo: must be setuid root
#dpl.2
Preparing deploy
No stash found.
cabal check failed
failed to deploy

回答1:


This isn't possible with the Travis CI "container-based" infrastructure, because Hackage depends on cabal, which requires sudo.



来源:https://stackoverflow.com/questions/33437022/how-do-i-automatically-deploy-from-travis-ci-with-the-container-based-infrastruc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!