【问题标题】:Checkout from Git and deploy to Heroku从 Git 签出并部署到 Heroku
【发布时间】:2012-01-08 12:44:00
【问题描述】:

我想从 Git 服务器克隆一个项目,然后执行一些测试,然后部署到 Heroku。

我已经能够从 Git 获取我的项目,然后执行成功的“捆绑安装”。离开中间测试部分,我无法部署到 Heroku。要部署,我正在做一个命令行构建运行器,我的“命令可执行文件”设置为“git”,“命令参数”设置为“push git@heroku-#{new_project}:#{new heroku project's name}.git master ”。我在哪里设置了我的项目名称和 heroku 项目名称。这是构建日志:

[21:22:28]: Checking for changes
[21:22:29]: Clean build enabled: removing old files from /home/teamcity/TeamCity/buildAgent/work/c463bb084d1493f0
[21:22:29]: Clearing temporary directory: /home/teamcity/TeamCity/buildAgent/temp/buildTmp
[21:22:29]: Checkout directory: /home/teamcity/TeamCity/buildAgent/work/c463bb084d1493f0
[21:22:29]: Updating sources: server side checkout...
[21:22:29]: [Updating sources: server side checkout...] Will perform clean checkout
[21:22:29]: [Updating sources: server side checkout...] Clean checkout reasons
[21:22:29]: [Clean checkout reasons] Checkout directory is empty or doesn't exist
[21:22:29]: [Clean checkout reasons] "Clean all files before build" turned on
[21:22:29]: [Updating sources: server side checkout...] Building clean patch for VCS root: PROJECTNAME Git Repo
[21:22:29]: [Updating sources: server side checkout...] Repository sources transferred: 76.91Kb total
[21:22:29]: [Updating sources: server side checkout...] Removing /home/teamcity/TeamCity/buildAgent/work/c463bb084d1493f0
[21:22:29]: [Updating sources: server side checkout...] Updating /home/teamcity/TeamCity/buildAgent/work/c463bb084d1493f0
[21:22:29]: Parameter "system.teamcity.build.checkoutDir" is undefined.
[21:22:29]: Publishing internal artifacts
[21:22:29]: [Publishing internal artifacts] Sending build.start.properties.gz file
[21:22:29]: Step 1/2: Bundle Install (Command Line)
[21:22:29]: [Step 1/2] Starting: /home/teamcity/.rvm/gems/ruby-1.9.2-p290@ PROJECTNAME/bin/bundle install
[21:22:29]: [Step 1/2] in directory: /home/teamcity/TeamCity/buildAgent/work/c463bb084d1493f0
[21:22:30]: [Step 1/2] Using rake (0.9.2.2)
[21:22:30]: [Step 1/2] Using multi_json (1.0.3)
[21:22:30]: [Step 1/2] Using activesupport (3.1.1)
[21:22:30]: [Step 1/2] Using builder (3.0.0)
[21:22:30]: [Step 1/2] Using i18n (0.6.0)
[21:22:30]: [Step 1/2] Using activemodel (3.1.1)
[21:22:30]: [Step 1/2] Using erubis (2.7.0)
[21:22:30]: [Step 1/2] Using rack (1.3.5)
[21:22:30]: [Step 1/2] Using rack-cache (1.1)
[21:22:30]: [Step 1/2] Using rack-mount (0.8.3)
[21:22:30]: [Step 1/2] Using rack-test (0.6.1)
[21:22:30]: [Step 1/2] Using hike (1.2.1)
[21:22:30]: [Step 1/2] Using tilt (1.3.3)
[21:22:30]: [Step 1/2] Using sprockets (2.0.3)
[21:22:30]: [Step 1/2] Using actionpack (3.1.1)
[21:22:30]: [Step 1/2] Using mime-types (1.17.2)
[21:22:30]: [Step 1/2] Using polyglot (0.3.3)
[21:22:30]: [Step 1/2] Using treetop (1.4.10)
[21:22:30]: [Step 1/2] Using mail (2.3.0)
[21:22:30]: [Step 1/2] Using actionmailer (3.1.1)
[21:22:30]: [Step 1/2] Using arel (2.2.1)
[21:22:30]: [Step 1/2] Using tzinfo (0.3.31)
[21:22:30]: [Step 1/2] Using activerecord (3.1.1)
[21:22:30]: [Step 1/2] Using activeresource (3.1.1)
[21:22:30]: [Step 1/2] Using ansi (1.4.1)
[21:22:30]: [Step 1/2] Using bundler (1.0.21)
[21:22:30]: [Step 1/2] Using coffee-script-source (1.1.3)
[21:22:30]: [Step 1/2] Using execjs (1.2.9)
[21:22:30]: [Step 1/2] Using coffee-script (2.2.0)
[21:22:30]: [Step 1/2] Using rack-ssl (1.3.2)
[21:22:30]: [Step 1/2] Using json (1.6.1)
[21:22:30]: [Step 1/2] Using rdoc (3.11)
[21:22:30]: [Step 1/2] Using thor (0.14.6)
[21:22:30]: [Step 1/2] Using railties (3.1.1)
[21:22:30]: [Step 1/2] Using coffee-rails (3.1.1)
[21:22:30]: [Step 1/2] Using jquery-rails (1.0.18)
[21:22:30]: [Step 1/2] Using libv8 (3.3.10.4)
[21:22:30]: [Step 1/2] Using pg (0.11.0)
[21:22:30]: [Step 1/2] Using rails (3.1.1)
[21:22:30]: [Step 1/2] Using sass (3.1.10)
[21:22:30]: [Step 1/2] Using sass-rails (3.1.5)
[21:22:30]: [Step 1/2] Using sqlite3 (1.3.4)
[21:22:30]: [Step 1/2] Using sqlite3-ruby (1.3.3)
[21:22:30]: [Step 1/2] Using therubyracer (0.9.9)
[21:22:30]: [Step 1/2] Using turn (0.8.3)
[21:22:30]: [Step 1/2] Using uglifier (1.1.0)
[21:22:30]: [Step 1/2]  [32mYour bundle is complete! It was installed into /root/.rvm/gems/ruby-1.9.2-p290@ PROJECTNAME [0m
[21:22:30]: [Step 1/2] Process exited with code 0
[21:22:30]: Step 2/2: Deploy to Heroku (Command Line)
[21:22:30]: [Step 2/2] Starting: git push git@heroku-PROJECTNAME:HEROKUPROJECTNAME.git master
[21:22:30]: [Step 2/2] in directory: /home/teamcity/TeamCity/buildAgent/work/c463bb084d1493f0
[21:22:30]: [Step 2/2] fatal: Not a git repository (or any of the parent directories): .git
[21:22:30]: [Step 2/2] Process exited with code 128
[21:22:30]: [Step 2/2] Step Deploy to Heroku (Command Line) failed
[21:22:30]: Publishing internal artifacts
[21:22:30]: [Publishing internal artifacts] Sending build.finish.properties.gz file
[21:22:30]: Build finished

它似乎找不到我的项目 .git 文件。我不确定如何“让它找到它”。 有人可以帮忙吗?

【问题讨论】:

    标签: ruby git heroku teamcity


    【解决方案1】:

    日志中的这一行:

    Updating sources: server side checkout...
    

    表明您正在使用服务器端签出,其中克隆发生在服务器上并将文件复制到代理。

    在您的 VCS 设置中将其更改为代理结帐,它应该可以工作。

    【讨论】:

    • 感谢您的回答,但是一旦我进行代理结帐,我就会收到 VCS (GIT) 错误,因为我使用的是代理结帐不支持的密码方法。显然我必须做默认私钥。有谁知道如何设置?这样做我遇到了很多问题。我得到了私钥,但不是默认私钥。编辑:我收到 VCS 连接错误。
    猜你喜欢
    • 1970-01-01
    • 2014-12-06
    • 2020-10-20
    • 2012-10-25
    • 1970-01-01
    • 2013-04-14
    • 1970-01-01
    • 1970-01-01
    • 2011-06-18
    相关资源
    最近更新 更多