Jenkins getting test results from docker slave

眉间皱痕 提交于 2019-12-24 14:38:52

问题


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?


回答1:


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>


来源:https://stackoverflow.com/questions/29296102/jenkins-getting-test-results-from-docker-slave

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!