詹金斯从码头奴隶获得测试结果 [英] Jenkins getting test results from docker slave

查看:141
本文介绍了詹金斯从码头奴隶获得测试结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个jenkins设置与码头奴隶,但不知何故不是所有的工件都可以从詹金斯。



我们的设置:




  • Jenkins Master在单个虚拟机上运行

  • 多个Docker主机设置在不同的虚拟机上

  • 我们正在使用php-template

  • Docker容器配置为运行所有我们的项目需要测试。

  • 当一个项目正在构建时,Docker容器在Docker主机之间旋转,运行测试,将结果复制回主机docker容器承诺一个映像,并且正在运行的容器被销毁。

  • 我们正在使用复制到从属插件将我们的构建目录从从设备复制到主设备,以便所有必需的工件在Jenkins大师身上。



问题是,当构建完成后,我们无法查看工作区文件(其中我们将副本复制到奴隶插件)我们也无法链接到已复制到主服务器的图形文件。

 < img t ype =image / svg + xmlheight =300src =ws / build / pdepend / overview-pyramid.svgwidth =500>< / img> 
< img type =image / svg + xmlheight =300src =ws / build / pdepend / dependencies.svgwidth =500>< / img>

当Docker容器仍在运行时,我们可以在构建期间看到这些图像。



我们缺少什么?

解决方案

要更新并关闭此题。
我已经通过将所需的文件添加到jenkins主机作为报告资源发布HTML报告来解决此问题。这样我们可以链接到缺少的文件。

 < img type =image / svg + xmlheight =300src =Pdepend_files / overview-pyramid。 svgwidth =500>< / img> 
< img type =image / svg + xmlheight =300src =Pdepend_files / dependencies.svgwidth =500>< / img>


We have a jenkins setup with docker slaves, but somehow not all artifacts are available from within jenkins.

Our setup:

  • Jenkins Master running on a single VM
  • multiple Docker hosts setup on different VM's
  • We are using php-template
  • Docker containers are configured to run all tests required for our projects.
  • When a project is being build a docker container is spun up on one of the Docker hosts, tests are run, phing results are copied back to the host, the docker container is committed to an image and the running container is destroyed.
  • We are using the "copy to slave plugin" to copy our build directory from the slave to the master so all required artifacts are on the Jenkins master.

The problem is that when the build is completed that we are not able to view the workspace files (which we copied with the copy to slave plugin) We are also unable to link to the graphics files which have been copied to the master.

<img type="image/svg+xml" height="300" src="ws/build/pdepend/overview-pyramid.svg" width="500"></img>
<img type="image/svg+xml" height="300" src="ws/build/pdepend/dependencies.svg" width="500"></img>

We can however see these images during build when the docker container is still running.

What are we missing?

解决方案

To update and close this question. I have solved this by adding the required files to the jenkins master as an reporting resource "Publish HTML reports" This way we can link to the missing files.

<img type="image/svg+xml" height="300" src="Pdepend_files/overview-pyramid.svg" width="500"></img>
<img type="image/svg+xml" height="300" src="Pdepend_files/dependencies.svg" width="500"></img>

这篇关于詹金斯从码头奴隶获得测试结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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