开发者

Running heroku rake db:migrate from a Jenkins build fails

开发者 https://www.devze.com 2023-04-07 21:17 出处:网络
In my Jenkins build, the last step is to push to heroku and run a db migration. The git push works fine, and the app gets deployed, but I\'m having trouble running a db migration. Below is the console

In my Jenkins build, the last step is to push to heroku and run a db migration. The git push works fine, and the app gets deployed, but I'm having trouble running a db migration. Below is the console output from Jenkins.

+ heroku run rake db:migrate --app myapp
Running rake db:migrate attached to terminal... stty: standard input: Invalid argument
up, run.6
stty: standard input: Invalid argument

If I run the same command from the server as the jenkins user, it works fine. I only get the error during the automated build process.

开发者_如何学编程

As background, this is a Rails 3.1 app running on Heroku Cedar.


I was able to work around this by redirecting the output.

heroku run rake db:migrate --app myapp > rake.log
cat rake.log
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号