问题
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