1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00
dockerfiles/jenkins/agent
2024-05-16 18:51:01 +08:00
..
docker-compose.yml update jenkins 2024-05-16 18:51:01 +08:00
README.md update jenkins 2024-05-16 18:51:01 +08:00

jenkins/inbound-agent

inbound-agent is for Jenkins agents using TCP or WebSockets to establish inbound connection to the Jenkins controller. This agent is powered by the Jenkins Remoting library, which version is being taken from the base Docker Agent image.

how to

for (aSlave in hudson.model.Hudson.instance.slaves){
  println aSlave.name + "," + aSlave.getComputer().getJnlpMac()
}

up and running

$ mkdir -p data/agent
$ chown -R 1000:1000 data
$ docker-compose up -d

proxy

Edit two files in container to support proxy.

$ docker-compose exec --user root inbound-agent bash
>>> apt update
>>> apt install ncat vim
>>> exit
$ docker-compose exec inbound-agent bash
>>> mkdir -m 700 ~/.ssh
>>> vim -p ~/.ssh/config ~/.gitconfig
>>> exit

File: ~/.ssh/config

Host github.com
    Hostname github.com
    User git
    Proxycommand ncat --proxy x.x.x.x:1080 --proxy-type socks5 %h %p

File: ~/.gitconfig

[http "https://github.com"]
	proxy = http://x.x.x.x:8123