正确的持续集成和持续部署与Git和Heroku

正确的持续集成和持续部署与Git和Heroku

本文介绍了正确的持续集成和持续部署与Git和Heroku的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用heroku和git在rails网站上开发ruby。

I am developing a ruby on rails website using heroku and git.

我应该使用哪些工具和功能来设置以下简单的开发过程?

What tools and features should I use to set up the following simple development process?

CODE> CHECK-IN> AUTO TEST> AUTO DEPLOY

CODE > CHECK-IN > AUTO TEST > AUTO DEPLOY



  • 如果测试通过,则会自动运行测试并将网站部署在我的staging heroku应用程序中

  • 如果测试失败,我想以某种方式获得通知。

您会如何做?

推荐答案

我们使用。这是一个相当简单的解决方案 - 它不会做所有的东西在阳光下,但它很容易设置和处理最常见的用例/功能。

We use Integrity. It is a pretty simple solution - it won't do everything under the sun, but it's quite easy to set up and handles the most common use cases/features. It's also pretty easy to hack on, if you want it to do more.

完整性状态:

但是:

注意

无法通过Heroku上的SSH访问存储库

这是因为您的Integrity应用程序需要SSH密钥。这不是不可能,但绝对有几个跳过。你需要给Integrity一个私钥,并把它放在应用程序,然后hack Integrity使用该ssh键,当它启动 git clone

This is because your Integrity app will need an SSH key. It's not impossible, but definitely a few hoops to jump through. You'll need to give Integrity a private key and put it in the app, and then hack Integrity to use that ssh key when it initiates the git clone.

在列出的内容中,自动部署可能是大多数人不希望其CI服务器执行的操作(Integrity不提供开箱即用)。您需要配置git以使用该ssh键,并从正确的位置(检出的存储库)启动 git push

Of the things you listed, the automatic deploy is probably the thing most people would not expect their CI server to do (and Integrity does not provide out of the box). You'll need to configure git to use that ssh key and initiate a git push from the proper location (the checked out repository).

不幸的是我不知道如何做的细节 - 我们实际上在VPS上运行Integrity。

Unfortunately I don't know the details of how to do this--we actually run Integrity on a VPS.

这篇关于正确的持续集成和持续部署与Git和Heroku的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-25 05:32