简体   繁体   中英

Git push deploy randomly failing on Heroku with TeamCIty

We're seeing git pushes fail when pushing with our node apps from out CI server (TeamCity). It happens once in a while (about 1 out of every 10 builds) and I haven't been able to determine what is causing it. I've added a "retry if failed" step to the build and it always works on the 2nd try.

If I change TeamCity to do a fresh checkout on each build, it never errors out but more than doubls the build time.

FYI, the build process does a checkout, does a grunt build then commits the build locally so that the built code gets pushed to Heroku. I'm doing a force push which should cover that scenario:

git push -f git@heroku.com:myapp.git trunk:master

Here's the log excerpt coming back from Heroku:

[[08:27:37][Step 7/7] Dependencies installed
[08:27:37][Step 7/7] -----> Building runtime environment
[08:27:37][Step 7/7] -----> Discovering process types
[08:27:37][Step 7/7] Procfile declares types -> web
[08:27:42][Step 7/7] 
[08:27:42][Step 7/7] ! Heroku push rejected due to an unrecognized error.
[08:27:42][Step 7/7] ! We've been notified, see http://support.heroku.com if the problem persists.
[08:27:42][Step 7/7] 
[08:27:42][Step 7/7] 
[08:27:42][Step 7/7] To git@heroku.com:devgrade.git
[08:27:42][Step 7/7] ! [remote rejected] trunk -> master (pre-receive hook declined)
[08:27:42][Step 7/7] error: failed to push some refs to 'git@heroku.com:myapp.git'
[08:27:42][Step 7/7] Process exited with code 1
[08:27:42][Step 7/7] Step Push to Heroku (Command Line) failed

通过使用Heroku Push推送来绕开Git管道,您可能会有更多的运气: https : //github.com/ddollar/heroku-push

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM