Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/jenkins/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在openshift上Jenkins构建失败/取消_Jenkins_Openshift - Fatal编程技术网

在openshift上Jenkins构建失败/取消

在openshift上Jenkins构建失败/取消,jenkins,openshift,Jenkins,Openshift,我与jenkins一起将新代码推送到openshift应用程序时遇到问题。我已经从web控制台管理员启用了jenkins,它没有自定义设置。但是,在它向我的应用程序推送新的更改之前,我必须推送至少2次。 我有一个计划。我使用3个应用程序:主应用程序、数据库应用程序、jenkins,推送时,jenkins创建第4个应用程序。 推送新版本的应用程序需要很长时间,因为每次推送后我都会升级搜索索引。当我第一次推动时,我得到的是: git push origin Counting objects: 38,

我与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的任何错误,当我推第一次提交时,它会大叫BUILD FAILED/CANCELLED。第二次推动是成功的。如果我在第二次之后做第三次推,那也是成功的。就像詹金斯的应用程序一样,它会休眠,但它不能。我有青铜计划,我试图加载詹金斯网址,所以我确信詹金斯应用程序正在运行。 我能想到的第一次推送失败的唯一可能原因是,我有16个应用中的3个,可能创建第四个应用需要太长时间,Jenkins没有等待,并以错误结束


所以每次我想要推送我的应用程序的新版本时,我会继续推两次,而不是一次

尝试登录Jenkins web控制台并查看构建日志,看看是否有更多有用的信息可用于确定问题,或者在此处发布供其他人尝试帮助您。我只看到4个构建,所有构建都成功。我将在下一次推送时检查控制台日志。也许jenkins完成了任务,但git引发了错误?我试图再次将新版本推送到openshift。第一次推送时出现相同错误。Jenkins日志是空的,我在Jenkins web控制台的任何地方都看不到新的构建。