Jenkins通过docker:如何将自己的主机配置为jenkins的代理? [英] Jenkins through docker: How to configure own host as agent for jenkins?

查看:85
本文介绍了Jenkins通过docker:如何将自己的主机配置为jenkins的代理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Mac mini上使用Jenkins和管道.所有构建都可以与Docker代理正常工作(后端,前端,Android应用程序等)

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

我唯一无法实现的就是将自己的mac-mini用作IOS应用程序的构建代理/从属(我需要在OSX上构建). Jenkins本身也通过docker运行,因此我需要连接到主机(mac-mini的操作系统)并将其用作代理...

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...

我知道一种选择是安装jenkins而不是使用docker,但我宁愿让Jenkins在docker容器中运行.

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. 转到Manage Jenkins > Manage Nodes > New Node.
  2. 配置节点.
  3. 转到节点列表.
  4. 选择新配置的节点.此刻它应该处于离线状态.
  5. 运行主机界面上显示的java命令.
  6. 您的主机现在是从属计算机.
  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.

这篇关于Jenkins通过docker:如何将自己的主机配置为jenkins的代理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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