Jenkins在开班制上失败/取消 [英] Jenkins BUILD FAILED/CANCELLED on openshift

查看:128
本文介绍了Jenkins在开班制上失败/取消的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法使用jenkins将新代码推送到我的openshift应用程序中.我已经从Web控制台admin启用了jenkins,它可以正常工作(无自定义设置).但是,我必须至少推送2次才能将新更改推送到我的应用.
我有青铜计划.我使用3个应用程序(主应用程序,数据库应用程序,jenkins),并且在推送时,jenkins创建了第4个应用程序.
推送新版本的应用程序需要花费很长时间,因为每次推送后我都会升级搜索索引.当我第一次按下时,这就是我得到的:

I have problems pushing new code to my openshift application with jenkins. I have enabled jenkins from web console admin and it works(no custom settings). However I have to push at least 2 times before it pushes new changes to my app.
I have bronze plan. I use 3 apps (main app, database app, jenkins) and when pushing, jenkins creates 4th app.
Pushing new version of app takes a long time, since I upgrade search index after every push. When I push for the first time, this is what I get:

git push origin
Counting objects: 38, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (18/18), done.
Writing objects: 100% (20/20), 2.33 KiB | 0 bytes/s, done.
Total 20 (delta 15), reused 0 (delta 0)
remote: Syncing git content to other proxy gears
remote: Executing Jenkins build.
remote: 
remote: You can track your build at https://jenkins-myapp.rhcloud.com/job/digrin-build
remote: 
remote: Waiting for build to schedule.....................................................................
remote: **BUILD FAILED/CANCELLED**
remote: Please see the Jenkins log for more details via 'rhc tail'
remote: !!!!!!!!
remote: Deployment Halted!
remote: If the build failed before the deploy step, your previous
remote: build is still running.  Otherwise, your application may be
remote: partially deployed or inaccessible.
remote: Fix the build and try again.
remote: !!!!!!!!
remote: An error occurred executing 'gear postreceive' (exit code: 1)
remote: Error message: CLIENT_ERROR: Failed to execute: 'control post-receive' for /var/lib/openshift/55a0310e4...4/jenkins-client
remote: 
remote: For more details about the problem, try running the command again with the '--trace' option.

这是我的第二次推动:

$ git push origin
Counting objects: 11, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 481 bytes | 0 bytes/s, done.
Total 6 (delta 5), reused 0 (delta 0)
remote: Syncing git content to other proxy gears
remote: Executing Jenkins build.
remote: 
remote: You can track your build at https://jenkins-myapp.rhcloud.com/job/digrin-build
remote: 
remote: Waiting for build to schedule......Done
remote: Waiting for job to complete.............................................................................................................................................................................Retrying job 3 lookup....Done.
remote: .................................Retrying job 3 lookup....Done.
remote: ............................................................................................Retrying job 3 lookup....Done.
remote: ..................................................Retrying job 3 lookup....Done.
remote: ................................................................Retrying job 3 lookup....Done.
remote: ........................................Retrying job 3 lookup....Done.
remote: ........Retrying job 3 lookup....Done.
remote: ..................................Retrying job 3 lookup....Done.
remote: .........................................................................................................Retrying job 3 lookup....Done.
remote: .....Retrying job 3 lookup....Done.
remote: ...............................................................................................................Done
remote: SUCCESS
remote: New build has been deployed.
remote: -------------------------
remote: Git Post-Receive Result: success
remote: Deployment completed with status: success
To ssh://55a000094@digrin-myapp.rhcloud.com/~/git/digrin.git/
   af390d4..f47120e  master -> master

为什么我的第一次推送总是失败?我没有在rhc tail myapp

Why my first push always fails? I do not see any error regarding jenkins in rhc tail myapp

推荐答案

当我首先推送提交时,它大喊BUILD FAILED/CANCELLED.在第二次按下时,它是成功的.如果我紧接着第二次第三次按下,那也是成功的.几乎像詹金斯(Jenkins)应用程序会休眠一样,但它不会休眠.我有青铜计划,并且尝试加载jenkins url,所以我确定jenkins应用程序正在运行.
我能想到的第一个失败推送的唯一可能原因是,我有16个应用程序中有3个,而第4个应用程序的创建可能花费的时间太长,Jenkins不会等待并以错误结束.

When I push first commit, it yells BUILD FAILED/CANCELLED. On second push it is a success. If I do third push right after second, it is success too. Almost like jenkins app would hibernate, but it cannot. I have bronze plan and I tried to load jenkins url so I was sure jenkins app is running.
Only possible reason for first failed push that I can think of is that I have 3 out of 16 apps and probably 4th app creation takes too long and Jenkins does not wait and ends with error.

因此,我将只继续执行两次推送,而不是每次要推送新版本的应用程序时都要推送一次.

这篇关于Jenkins在开班制上失败/取消的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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