问题
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:
- Go to
Manage Jenkins > Manage Nodes > New Node
. - Configure a node.
- Go to the list of nodes.
- Select your newly configured node. It should be offline at this moment.
- Run the java command displayed on the interface on your host machine.
- Your Host machine is now a slave.
来源:https://stackoverflow.com/questions/57431612/jenkins-through-docker-how-to-configure-own-host-as-agent-for-jenkins