Jenkins through docker: How to configure own host as agent for jenkins?

允我心安 提交于 2021-01-29 17:13:47

问题


I'm using Jenkins with pipelines on a mac-mini. All builds are working fine with docker agents (backend, frontend, android app, etc)

The only thing I haven't been able to achieve is to use my own mac-mini as build-agent/slave for the IOS app (I need to build on OSX). Jenkins itself runs through docker as well, so I would need to connect to the host (the OS of the mac-mini) and use that as an agent...

I know one option would be to install jenkins instead of using docker, but I would prefer to keep Jenkins running in a docker container.

Does someone has experience with this or knows any good documentation on how to set this up?


回答1:


  1. Go to Manage Jenkins > Manage Nodes > New Node.
  2. Configure a node.
  3. Go to the list of nodes.
  4. Select your newly configured node. It should be offline at this moment.
  5. Run the java command displayed on the interface on your host machine.
  6. Your Host machine is now a slave.


来源:https://stackoverflow.com/questions/57431612/jenkins-through-docker-how-to-configure-own-host-as-agent-for-jenkins

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