Install mongodb on azure devops host for testrun

喜夏-厌秋 提交于 2020-05-16 05:16:31

问题


I am trying to switch to azure devops and I need a mongodb instance running for some integration tests. The hosts, that are supplied by azure devops do not contain an installation of mongodb and I do not know where I could supply a new docker image with VS and mongodb. Is this even the way to go? Is there no way to change the docker file of the images, so they install mongodb aswell? I allready tried to add a new pool and add an image there, but this does not seem to be the right direction :/

Can anybody give me an hint on what I have to do, to get a mongodb for integration tests?


回答1:


With the Azure pipeline container Jobs, you can start service containers next to your builds.




回答2:


The Windows hosted agents all have Chocolatey on them, so you can install MongoDB from there: https://chocolatey.org/packages/mongodb. The Linux agents have apt, so you can apt-get install whatever.

You could also use the Windows Container image and tell it to pull and run a MongoDB image.

These options all involve downloading stuff, so it will probably be slower than you'd like. The worst case option is that you can set up your own private build agent that has whatever software you need pre-installed.



来源:https://stackoverflow.com/questions/54934007/install-mongodb-on-azure-devops-host-for-testrun

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