如何使用基于容器的基础设施自动部署Travis CI? [英] How do I automatically deploy from Travis CI with the container-based infrastructure?

查看:194
本文介绍了如何使用基于容器的基础设施自动部署Travis CI?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用 Travis CI 基于容器的基础设施,我必须有

sudo: false

设置在我的 .travis.yml ;但这似乎与自动部署不兼容,例如

deploy:
  provider: hackage

这导致我的构建失败与


安装部署依赖关系

sudo:必须setuid root

Installing deploy dependencies
sudo: must be setuid root

如何使用Travis CI自动部署基于容器的基础设施?

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


推荐答案

这不是Travis CI基于容器的基础设施,因为黑客取决于 cabal ,这需要 sudo

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

这篇关于如何使用基于容器的基础设施自动部署Travis CI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆