詹金斯在openshift上建立失败/取消

时间:2015-11-11 18:01:25

标签: jenkins openshift

我在使用jenkins将新代码推送到我的openshift应用程序时遇到问题。我已经从web控制台管理员启用了jenkins并且它可以工作(没有自定义设置)。但是,在将新更改推送到我的应用程序之前,我必须至少推送2次 我有铜牌计划。我使用3个应用程序(主应用程序,数据库应用程序,jenkins),在推送时,jenkins创建了第4个应用程序 推送新版本的应用程序需要很长时间,因为我会在每次推送后升级搜索索引。当我第一次推动时,这就是我得到的:

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

中没有看到关于jenkins的任何错误

1 个答案:

答案 0 :(得分:0)

当我先推送提交时,它会大喊BUILD FAILED/CANCELLED。在第二次推送上取得了成功。如果我在第二次之后立即第三次推送,那也是成功的。几乎像jenkins应用程序会休眠,但它不能。我有青铜计划,我试图加载jenkins网址,所以我确信jenkins应用程序正在运行 我能想到的第一次失败推送的唯一原因是我有16个应用程序中的3个,可能第4个应用程序创建需要太长时间,Jenkins不等待并以错误结束。

因此,每次我想推送新版本的应用时,我都会继续推送两次推送。

相关问题