Docker CICD builder agent for Jenkins
10K+
Docker CICD builder agent for Jenkins.
Inspired by:
It can be used as a Jenkins inbound agent, for use with Jenkins Cloud plugins.
This Docker image is intended to be used in conjunction with a Docker container orchestration service such as
It can also be used as a "static" Jenkins agent connected to a Jenkins master by manually launching the Docker container.
Sample with the Jenkins Pipeline Maven Plugin.
node ("cicd-docker-agent") {
git "https://github.com/cloudbees-community/game-of-life"
withMaven(mavenSettingsConfig:'my-maven-settings') {
sh "mvn clean deploy"
}
}
The docker image enables Selenium tests bundling Firefox and starting selenium-server-standalone (listening on the default port 4444).
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
WebDriver webDriver = new RemoteWebDriver(DesiredCapabilities.firefox());
webDriver.get("http://www.python.org");
webDriver.getTitle();
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
driver = webdriver.Remote(
command_executor='http://127.0.0.1:4444/wd/hub',
desired_capabilities=DesiredCapabilities.FIREFOX)
driver.get('http://python.org')
To run a Docker container
docker run cicd-docker-agent -url http://jenkins-server:port <secret> <agent name>
optional environment variables:
JENKINS_URL: url for the Jenkins server, can be used as a replacement to -url option, or to set alternate jenkins URLJENKINS_TUNNEL: (HOST:PORT) connect to this agent host and port instead of Jenkins server, assuming this one do route TCP traffic to Jenkins master. Useful when when Jenkins runs behind a load balancer, reverse proxy, etc.Content type
Image
Digest
sha256:3c1d9da18…
Size
658.6 MB
Last updated
about 14 hours ago
docker pull lj020326/jenkins-docker-cicd-agent