1

I have some build hosts where I cannot install a Java JDK (for various reasons). Therefore the Jenkins Agent cannot be started there. How can I use these hosts with Jenkins CI?

Is there an non-Java implementation of the agent available? Or is there an agent available that uses eg. only SSH to execute commands on the build hosts?

2 Answers 2

1

There are several plugins in Jenkins, which allow executing commands via SSH on the remote server and copying files from / to those servers.

You cannot implement full Jenkins agent functionality with these, but they allow you to perform actions on remote hosts with Jenkins interface.

For example, I use Jenkins to deploy website code on multiple servers via SSH.

0

I have now solved this by running the agent on another host, and then using scp and ssh in my Jenkins build commands to start the build on the actual target host. Also, the build command compares env output on the agent's host and on the build host, and sets all environment variables that are missing. This way the env vars set by Jenkins are available to my build script.

It's definitely not pretty, but it works for my specific use case.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .