-
-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: build both agent and inbound agent #570
Merged
lemeurherve
merged 191 commits into
jenkinsci:master
from
lemeurherve:feat-build-both-agent-and-inbound-agent
Jan 12, 2024
Merged
Changes from all commits
Commits
Show all changes
191 commits
Select commit
Hold shift + click to select a range
f598243
initial implementation, mostly inspired by https://github.com/carloss…
ndeloof cec8c0e
Adding udpate ECS container agent suggestion to README
chrishenzie a91dbd0
Merge pull request jenkinsci/docker-inbound-agent#2 from chrishenzie/…
ndeloof b37e78c
Upgrade remoting to 2.62 and disable JNLP3 protocol by default (#12)
oleg-nenashev 2ec748c
Rename JENKINS_NAME to JENKINS_AGENT_NAME
carlossg 542c469
Update the description, use Agents instead of Slaves where possible
oleg-nenashev 29e9ca1
Merge pull request jenkinsci/docker-inbound-agent#24 from jenkinsci/e…
oleg-nenashev 25b37d5
Merge branch 'master' into readme
oleg-nenashev e473a4a
Merge pull request jenkinsci/docker-inbound-agent#25 from oleg-nenash…
oleg-nenashev 6dd9686
REadme: Fix typo noticed by @jglick
oleg-nenashev 0849e20
Merge pull request jenkinsci/docker-inbound-agent#27 from oleg-nenash…
oleg-nenashev f603b13
[JENKINS-44114] - Add the WorkDir option example
oleg-nenashev ca434ab
Merge branch 'master' into alpine
oleg-nenashev 10d856a
Document new env variable JENKINS_AGENT_WORKDIR
oli-g f9b762a
Update jenkinsci/jnlp-slave -> jenkins/jnlp-slave
carlossg 9d4b7e8
Update Remoting to 3.15 + fix documentation
oleg-nenashev 94fabc8
Merge pull request jenkinsci/docker-inbound-agent#53 from oleg-nenash…
oleg-nenashev f1d715b
Merge branch 'master' into workdir-env-var
oleg-nenashev 313caf7
Merge pull request jenkinsci/docker-inbound-agent#54 from oleg-nenash…
oleg-nenashev 89547f6
Merge branch 'master' into alpine
oleg-nenashev d5900ba
Fix #57 Clarify image name deprecation
carlossg 7921939
Merge pull request jenkinsci/docker-inbound-agent#58 from jenkinsci/c…
oleg-nenashev 5043700
Merge branch 'master' into alpine
oleg-nenashev c6490e3
Initial Windows agent support
slide 15ebbef
Merge pull request jenkinsci/docker-inbound-agent#91 from slide/master
slide 0ca658b
[JENKINS-42846] - Rename the jenkins-slave script to jenkins-agent
oleg-nenashev 2882d8e
Revert "[JENKINS-42846] - Rename the jenkins-slave script to jenkins-…
oleg-nenashev 638f970
[JENKINS-42846] - Rename the jenkins-slave script to jenkins-agent
oleg-nenashev aea520e
Add Gitter and GitHub Releases badges to README
oleg-nenashev 0c9eade
Merge branch 'master' into alpine-to-master
oleg-nenashev 49e1552
Merge pull request jenkinsci/docker-inbound-agent#112 from oleg-nenas…
oleg-nenashev 4ac025d
Merge branch 'master' into JENKINS-42846-script-renaming
oleg-nenashev 61dd2a8
[JENKINS-42846] - Remove the debug code
oleg-nenashev 8ee2a92
Merge pull request jenkinsci/docker-inbound-agent#106 from oleg-nenas…
oleg-nenashev 763659d
Adjusted jenkins-agent script for direct connection
alxsap 2135156
JENKINS_WEB_SOCKET=true
jglick 7312f65
Fix spelling mistake
rbywater a118d3d
Fix the Gitter chat link in the documentation
oleg-nenashev bfb513a
Merge pull request jenkinsci/docker-inbound-agent#134 from jenkinsci/…
slide e4ad809
Noting new variable in documentation.
jglick 9a76e73
Merge branch 'master' of github.com:jenkinsci/docker-jnlp-slave into …
jglick f104777
Update to Remoting 3.40.
jeffret-b 8fa077f
Improve README
jeffret-b 0da278c
Fix copyright.
jeffret-b de8055c
Merge pull request jenkinsci/docker-inbound-agent#138 from jeffret-b/…
oleg-nenashev d3c82c5
Pass --init to docker-run to reap zombies.
alex3d 2705724
Remove docker run --init flag (it's ignored on Windows)
alex3d f9f870e
Added tests
63202c2
Add `zombie reaping` note
alex3d 8deb0d0
Removed hidden tabs
25ea266
Merge branch 'master' of github.com:jenkinsci/docker-jnlp-slave into …
jglick c4bf751
Script seems to be using tabs not spaces
jglick b153932
Also patch the PowerShell script
jglick aeac3ab
-eq rather than .Equals
jglick d7d74e4
Merge pull request jenkinsci/docker-inbound-agent#142 from krufab/add…
oleg-nenashev b05c5d9
Increased timeout in the netcat-helper container to 30s to execute co…
ce374c3
Corrected typo in the test file
14e26df
Merge pull request jenkinsci/docker-inbound-agent#148 from krufab/bug…
slide fdf9ed8
Merge pull request jenkinsci/docker-inbound-agent#130 from jglick/web…
MarkEWaite a0386dc
Directory updates for Linux containers
31aeff7
Rework directory structure and Windows containers
slide 9194817
Merge pull request jenkinsci/docker-inbound-agent#139 from alex3d/ale…
slide 95384db
Merge branch 'master' into directory_changes
oleg-nenashev 7e0a363
Merge pull request jenkinsci/docker-inbound-agent#154 from slide/dire…
oleg-nenashev 39b118c
INFRA-1105 - Rename the image to jenkins/inbound-agent
oleg-nenashev f8bd62e
Merge pull request jenkinsci/docker-inbound-agent#158 from jenkinsci/…
oleg-nenashev 7dbb627
[INFRA-1105] - Rename Windows agents in README
oleg-nenashev 5c86c5f
Cleanup Docker badges in README (#161)
oleg-nenashev 341c81d
Update README.md
oleg-nenashev c62311f
Fix tests after renaming of the base image
oleg-nenashev 3f98eec
Merge pull request jenkinsci/docker-inbound-agent#159 from oleg-nenas…
oleg-nenashev a12a9eb
Merge pull request jenkinsci/docker-inbound-agent#160 from jenkinsci/…
oleg-nenashev b8765a4
Show GitHub stars and repo quick link on the DockerHub landing page
oleg-nenashev 23c8736
Merge pull request jenkinsci/docker-inbound-agent#164 from jenkinsci/…
slide 70171b5
fixes jenkins/inbound-agent link in README
marshallford 2ca8d6b
Merge pull request jenkinsci/docker-inbound-agent#166 from marshallfo…
slide 3ae76e7
Fix issue with protocols value not being supplied to agent.jar
slide 3b85772
Update jenkins-agent.ps1
slide ced2fdb
Merge pull request jenkinsci/docker-inbound-agent#170 from jenkinsci/…
slide 59b285a
Rename test file
slide 927180f
Merge pull request jenkinsci/docker-inbound-agent#195 from slide/wind…
slide 0d728ff
Fixup docker image name and tag to correct
nwton 3a46b5f
Remove unused spaces
nwton 3e836be
Merge pull request jenkinsci/docker-inbound-agent#203 from nwton/fixu…
slide 416747e
Upgrade to Remoting 4.6.
jeffret-b 375b2b6
Update tests/tests.bats
jeffret-b 91bca71
Update tests/inboundAgent.Tests.ps1
slide cd46ee2
Merge pull request jenkinsci/docker-inbound-agent#209 from jeffret-b/…
slide 3d43dda
chore: bumped agent version to 4.6-2
garethjevans ef57093
Merge pull request jenkinsci/docker-inbound-agent#212 from garethjeva…
slide b8bbded
Upgrade to Remoting 4.7.
jeffret-b 063b065
Merge pull request jenkinsci/docker-inbound-agent#225 from jeffret-b/…
slide 045ccc2
Allows to pass JAVA_OPTS to the JVM
Vlatombe 02af84c
Upgrade remoting to 4.9
b89bc58
Merge pull request jenkinsci/docker-inbound-agent#233 from agentgonzo…
slide 5a841fb
Specify JENKINS_JAVA_BIN to run the agent using a specific JRE (#234)
Vlatombe 88497e9
Update jenkins-agent.ps1 (#226)
kevit 9151e67
Add publishing for linux via Jenkins (#236)
timja 47313b5
Do not prevent execution if the single argument is an option (#219)
felipecrs 946255b
Fix error with jenkins-agent syntax (#239)
felipecrs b55164b
Update to latest version of docker/agent (#240)
timja 850d2a2
Merge branch 'master' into windows_javaopts
MarkEWaite 4f3e562
Add Java 17 alpine (#252)
ecab800
Allow the use of multiple arguments (#254)
basil 8fefb6a
Revert "Allow the use of multiple arguments" (#257)
timja 44f8779
Specify JENKINS_JAVA_OPTS to pass JVM options that apply to the agent…
Dohbedoh 921b076
Remove `--add-opens` directives on Java 17 (#263)
basil 8502a12
Remove Java 8 (#278)
slide b4a507b
fix: only deploy to DockerHub on tag-triggered builds
dduportal 9e6e950
Merge pull request jenkinsci/docker-inbound-agent#280 from dduportal/…
dduportal 55207ce
fixup
dduportal ec675a4
Merge pull request jenkinsci/docker-inbound-agent#285 from dduportal/…
dduportal ef20208
chore(test) fix build argument tests by using an old version
dduportal 9333b0e
Merge pull request jenkinsci/docker-inbound-agent#286 from dduportal/…
dduportal c1d4904
chore(linux tests) apply shellcheck and fix concurency issues
dduportal 3ed3d99
fixup
dduportal 3bafcfc
Merge pull request jenkinsci/docker-inbound-agent#299 from dduportal/…
dduportal e2e0f16
Add Java 17 alpine (#252)
9bbd324
Allow the use of multiple arguments (#254)
basil 51774e3
Revert "Allow the use of multiple arguments" (#257)
timja 9c88589
Specify JENKINS_JAVA_OPTS to pass JVM options that apply to the agent…
Dohbedoh 3dd8b43
Remove `--add-opens` directives on Java 17 (#263)
basil 86f5ddc
Remove Java 8 (#278)
slide c1f2329
fix: only deploy to DockerHub on tag-triggered builds
dduportal 52b909f
fixup
dduportal 3309026
chore(test) fix build argument tests by using an old version
dduportal b32baf3
chore(linux tests) apply shellcheck and fix concurency issues
dduportal ca52fd6
fixup
dduportal b65ad20
Fixup command line processing and add test
slide 18b0c18
Merge branch 'master' into windows_javaopts
slide d80c959
documentation(README): complement `JENKINS_JAVA_OPTS` usage for Windo…
smerle33 fab30ac
cleanup(windows) remove custom user (feature parity with Linux and de…
dduportal 106db6b
chore(windows tests) fix harness to use long flags, no more interacti…
dduportal 4e6cad0
Merge pull request jenkinsci/docker-inbound-agent#344 from dduportal/…
dduportal 0de5d15
Merge branch 'master' into cleanup/remove-user-creation
dduportal 7afdf6e
Merge pull request jenkinsci/docker-inbound-agent#343 from dduportal/…
dduportal 9aaaaa2
chore(windows) factorize JDK specification to make.ps1
dduportal 94765e0
Merge pull request jenkinsci/docker-inbound-agent#347 from dduportal/…
dduportal c3a2767
[Windows] Allow JENKINS_URL to not be set when JENKINS_DIRECT_CONNECT…
krische b7157d3
build Windows images with docker compose like docker-agent and regrou…
lemeurherve 07d810a
refactor builds like https://github.com/jenkinsci/docker-agent/pull/445
lemeurherve bd892f8
revert images regroupment by OS type
lemeurherve 1b61b1c
restore jenkins-agent.ps1 location at root folder
lemeurherve 344561b
clean comments
lemeurherve ea39792
restore docker-bake & jenkins-agent script location
lemeurherve 61f7e3f
replace DOCKER_AGENT_VERSION by PARENT_IMAGE_VERSION
lemeurherve 8543246
replace 'VERSION' by 'version'
lemeurherve 0213d3c
restore 'version' case in tests.bats
lemeurherve 2d3e872
Merge pull request jenkinsci/docker-inbound-agent#363 from lemeurherv…
dduportal cb1ef87
chore: output JAVA_MAJOR_VERSION in tests
lemeurherve 077c013
chore: remove duplicated space
lemeurherve b3d78f7
chore: show `JAVA_MAJOR_VERSION` in tests output
lemeurherve 3a6170f
chore: show `JAVA_MAJOR_VERSION` in tests output
lemeurherve 60c4e1b
Merge branch 'master' into fix-tag-and-publish
lemeurherve f64c55e
Merge pull request jenkinsci/docker-inbound-agent#374 from lemeurherv…
dduportal 2378fb0
chore: fix link title in README (#381)
lemeurherve 67cc801
Sync README.md with docker hub (#385)
NotMyFault 2c87f97
Fix incorrect link (#392)
slide 3df8ead
refactor like jenkinsci/docker-agent#459
lemeurherve 4237940
fix: switch to the docker-agent version which has nanoserver-ltsc2019…
lemeurherve ef3f841
fix bad rebase
lemeurherve 375eb8f
run slow tests at the end
lemeurherve c9c45ca
remove unwanted CONTAINER_SHELL arg
lemeurherve 1455e10
debug
lemeurherve 04858bb
more debug
lemeurherve 70904e4
try fixing pester failing to encode junit xml because of 0x1b char in…
lemeurherve 49c5e7d
Revert "run slow tests at the end"
lemeurherve 631b01a
fix(tests): Image not found.
gounthar 3db7a8d
fix(tests): Image not found.
gounthar c9c4e5b
Merge pull request jenkinsci/docker-inbound-agent#397 from gounthar/j…
dduportal 29f5399
comment out for now the failing test
lemeurherve 26735e3
remove debug
lemeurherve a031462
Merge branch 'master' into refactor-like-docker-agent-pr-459
lemeurherve c7c6697
Merge pull request jenkinsci/docker-inbound-agent#396 from lemeurherv…
dduportal 06c2be7
chore(deps): bump actions/checkout from 3 to 4
dependabot[bot] c785c9c
Merge pull request jenkinsci/docker-inbound-agent#401 from jenkinsci/…
dduportal 80592ab
documentation(README): add description for secret
limejuny f854ceb
Store images in the repository
MarkEWaite 0ffeb94
update first parent image version suffix containing all tags in tests
lemeurherve f196961
Merge pull request jenkinsci/docker-inbound-agent#418 from jenkinsci/…
dduportal b748ef7
feat!: set Java 17 as default (#419)
lemeurherve b85fad6
Remove usage of deprecated `-headless` argument (#428)
basil fcce536
fix linux tests by bumpiung the reference version containing all tags
lemeurherve 9c47353
Merge pull request jenkinsci/docker-inbound-agent#436 from lemeurherv…
dduportal cbde922
Migrate to new Remoting calling convention
basil 776b37b
Merge pull request jenkinsci/docker-inbound-agent#445 from basil/remo…
dduportal b490aae
chore: replace `master` by `controller` (#456)
lemeurherve 5e06d07
rename `docker-inbound-agent` files before import
lemeurherve 7510ba1
rename `docker-agent` files before import
lemeurherve 326edf7
import prepared `docker-inbound-agent` files
lemeurherve 2f13f7f
feat: build both `agent` and `inbound-agent` images
lemeurherve File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Update Docker Hub Description | ||
on: | ||
release: | ||
types: [ published ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
dockerHubDescription: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Update Docker Hub description for agent | ||
uses: peter-evans/dockerhub-description@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
enable-url-completion: true | ||
short-description: This is a base image, which provides the Jenkins agent executable (agent.jar) | ||
repository: jenkins/agent | ||
readme-filepath: ./README_agent.md | ||
- name: Update Docker Hub description for inbound-agent | ||
uses: peter-evans/dockerhub-description@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
enable-url-completion: true | ||
short-description: This is an image for Jenkins agents using TCP or WebSockets to establish inbound connection to the Jenkins controller | ||
repository: jenkins/inbound-agent | ||
readme-filepath: ./README_inbound-agent.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
bats-core/ | ||
bats/ | ||
target/ | ||
build-windows-current.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,135 +1,21 @@ | ||
# Jenkins Agent Docker image | ||
# Jenkins Agent and Inbound Agent Docker images | ||
|
||
[![Join the chat at https://gitter.im/jenkinsci/docker](https://badges.gitter.im/jenkinsci/docker.svg)](https://gitter.im/jenkinsci/docker?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
[![GitHub stars](https://img.shields.io/github/stars/jenkinsci/docker-agent?label=GitHub%20stars)](https://github.com/jenkinsci/docker-agent) | ||
[![Docker Pulls](https://img.shields.io/docker/pulls/jenkins/agent.svg)](https://hub.docker.com/r/jenkins/agent/) | ||
[![GitHub release](https://img.shields.io/github/release/jenkinsci/docker-agent.svg?label=changelog)](https://github.com/jenkinsci/docker-agent/releases/latest) | ||
|
||
This is a base image for Docker, which includes JDK and the Jenkins agent executable (agent.jar). | ||
This executable is an instance of the [Jenkins Remoting library](https://github.com/jenkinsci/remoting). | ||
JDK version depends on the image and the platform, see the _Configurations_ section below. | ||
|
||
:exclamation: **Warning!** This image used to be published as [jenkinsci/slave](https://hub.docker.com/r/jenkinsci/slave/) and [jenkins/slave](https://hub.docker.com/r/jenkins/slave/). | ||
These images are now deprecated, use [jenkins/agent](https://hub.docker.com/r/jenkins/agent/). | ||
|
||
## Changelog | ||
|
||
See [GitHub releases](https://github.com/jenkinsci/docker-agent/releases) for versions `3.35-1` and above. | ||
There is no changelog for previous versions, see the commit history. | ||
|
||
Jenkins remoting changelogs are available [here](https://github.com/jenkinsci/remoting/releases). | ||
|
||
## Usage | ||
|
||
This image is used as the basis for the [Docker Inbound Agent](https://github.com/jenkinsci/docker-inbound-agent/) image. | ||
In that image, the container is launched externally and attaches to Jenkins. | ||
|
||
This image may instead be used to launch an agent using the **Launch method** of **Launch agent via execution of command on the controller**. For example on Linux you can try | ||
|
||
```sh | ||
docker run -i --rm --name agent --init jenkins/agent java -jar /usr/share/jenkins/agent.jar | ||
``` | ||
|
||
after setting **Remote root directory** to `/home/jenkins/agent`. | ||
|
||
or if using Windows Containers | ||
|
||
```powershell | ||
docker run -i --rm --name agent --init jenkins/agent:jdk17-windowsservercore-ltsc2019 java -jar C:/ProgramData/Jenkins/agent.jar | ||
``` | ||
|
||
after setting **Remote root directory** to `C:\Users\jenkins\Agent`. | ||
|
||
### Agent Work Directories | ||
|
||
Starting from [Remoting 3.8](https://github.com/jenkinsci/remoting/blob/master/CHANGELOG.md#38) there is a support of Work directories, | ||
which provides logging by default and change the JAR Caching behavior. | ||
This repository contains the definition of two images: | ||
|
||
Call example for Linux: | ||
|
||
```sh | ||
docker run -i --rm --name agent1 --init -v agent1-workdir:/home/jenkins/agent jenkins/agent java -jar /usr/share/jenkins/agent.jar -workDir /home/jenkins/agent | ||
``` | ||
|
||
Call example for Windows Containers: | ||
|
||
```powershell | ||
docker run -i --rm --name agent1 --init -v agent1-workdir:C:/Users/jenkins/Work jenkins/agent:jdk11-windowsservercore-ltsc2019 java -jar C:/ProgramData/Jenkins/agent.jar -workDir C:/Users/jenkins/Work | ||
``` | ||
|
||
## Configurations | ||
|
||
The image has several supported configurations, which can be accessed via the following tags: | ||
|
||
* Linux Images: | ||
* `latest` (`jdk17`, `bookworm-jdk17`, `latest-bookworm`, `latest-bookworm-jdk17`, `latest-jdk17`): Latest version with the newest remoting and JDK17 (based on `debian:bookworm-${builddate}`) | ||
* `alpine` (`alpine-jdk17`, `latest-alpine`, `latest-alpine-jdk17`): Small image based on Alpine Linux with JDK17 (based on `alpine:${version}`) | ||
* `archlinux` (`archlinux-jdk11`, `latest-archlinux`, `latest-archlinux-jdk11`): Image based on Arch Linux with JDK11 (based on `archlinux:latest`) | ||
* `bookworm-jdk11` (`latest-bookworm-jdk11`, `latest-jdk11`): JDK11 version with the newest remoting (based on `debian:bookworm-${builddate}`) | ||
* `alpine-jdk11` (`latest-alpine-jdk11`): Small image based on Alpine Linux with JDK11 (based on `alpine:${version}`) | ||
|
||
From version 4.11.2, the alpine images are tagged using the alpine OS version as well (i.e. `alpine` ==> `alpine3.16`, `alpine-jdk11` ==> `alpine3.16-jdk11`). | ||
|
||
* Windows Images: | ||
* JDK11: | ||
* `jdk11-nanoserver-1809`: Latest version with the newest remoting with Windows Nano Server and Java 11 (based on `mcr.microsoft.com/windows/nanoserver:1809` and `eclipse-temurin:11.xxx-jdk-nanoserver-1809`) | ||
* `jdk11-nanoserver-ltsc2019`: Latest version with the newest remoting with Windows Nano Server and Java 11 (based on `mcr.microsoft.com/windows/nanoserver:ltsc2019` and `eclipse-temurin:11.xxx-jdk-nanoserver-1809`) | ||
* `jdk11-nanoserver-ltsc2022`: Latest version with the newest remoting with Windows Nano Server and Java 11 (based on `mcr.microsoft.com/windows/nanoserver:ltsc2022` and `eclipse-temurin:11.xxx-jdk-nanoserver-ltsc2022`) | ||
* `jdk11-windowsservercore-1809`: Latest version with the newest remoting and Java 11 (based on `mcr.microsoft.com/windows/servercore:1809` and `eclipse-temurin:11.xxx-jdk-windowsservercore-1809`) | ||
* `jdk11-windowsservercore-ltsc2019`: Latest version with the newest remoting and Java 11 (based on `mcr.microsoft.com/windows/servercore:ltsc2019` and `eclipse-temurin:11.xxx-jdk-windowsservercore-1809`) | ||
* `jdk11-windowsservercore-ltsc2022`: Latest version with the newest remoting and Java 11 (based on `mcr.microsoft.com/windows/servercore:ltsc2022` and `eclipse-temurin:11.xxx-jdk-windowsservercore-ltsc2022`) | ||
* JDK17 (default): | ||
* `jdk17-nanoserver-1809` (`nanoserver-1809`): Latest version with the newest remoting with Windows Nano Server and Java 17 (based on `mcr.microsoft.com/windows/nanoserver:1809` and `eclipse-temurin:17.xxx-jdk-nanoserver-1809`) | ||
* `jdk17-nanoserver-ltsc2019` (`nanoserver-ltsc2019`): Latest version with the newest remoting with Windows Nano Server and Java 17 (based on `mcr.microsoft.com/windows/nanoserver:ltsc2019` and `eclipse-temurin:17.xxx-jdk-nanoserver-1809`) | ||
* `jdk17-nanoserver-ltsc2022` (`nanoserver-ltsc2022`): Latest version with the newest remoting with Windows Nano Server and Java 17 (based on `mcr.microsoft.com/windows/nanoserver:ltsc2022` and `eclipse-temurin:17.xxx-jdk-nanoserver-ltsc2022`) | ||
* `jdk17-windowsservercore-1809` (`windowsservercore-1809`): Latest version with the newest remoting and Java 17 (based on `mcr.microsoft.com/windows/servercore:1809` and `eclipse-temurin:17.xxx-jdk-windowsservercore-1809`) | ||
* `jdk17-windowsservercore-ltsc2019` (`windowsservercore-ltsc2019`): Latest version with the newest remoting and Java 17 (based on `mcr.microsoft.com/windows/servercore:ltsc2019` and `eclipse-temurin:17.xxx-jdk-windowsservercore-1809`) | ||
* `jdk17-windowsservercore-ltsc2022` (`windowsservercore-ltsc2022`): Latest version with the newest remoting and Java 17 (based on `mcr.microsoft.com/windows/servercore:ltsc2022` and `eclipse-temurin:17.xxx-jdk-windowsservercore-ltsc2022`) | ||
* JDK21: | ||
* `jdk21-nanoserver-1809`: Latest version with the newest remoting with Windows Nano Server and Java 21 (based on `mcr.microsoft.com/windows/nanoserver:1809` and `eclipse-temurin:21.xxx-jdk-nanoserver-1809`) | ||
* `jdk21-nanoserver-ltsc2019`: Latest version with the newest remoting with Windows Nano Server and Java 21 (based on `mcr.microsoft.com/windows/nanoserver:ltsc2019` and `eclipse-temurin:21.xxx-jdk-nanoserver-1809`) | ||
* `jdk21-nanoserver-ltsc2022`: Latest version with the newest remoting with Windows Nano Server and Java 21 (based on `mcr.microsoft.com/windows/nanoserver:ltsc2022` and `eclipse-temurin:21.xxx-jdk-nanoserver-ltsc2022`) | ||
* `jdk21-windowsservercore-1809`: Latest version with the newest remoting and Java 21 (based on `mcr.microsoft.com/windows/servercore:1809` and `eclipse-temurin:21.xxx-jdk-windowsservercore-1809`) | ||
* `jdk21-windowsservercore-ltsc2019`: Latest version with the newest remoting and Java 21 (based on `mcr.microsoft.com/windows/servercore:ltsc2019` and `eclipse-temurin:21.xxx-jdk-windowsservercore-1809`) | ||
* `jdk21-windowsservercore-ltsc2022`: Latest version with the newest remoting and Java 21 (based on `mcr.microsoft.com/windows/servercore:ltsc2022` and `eclipse-temurin:21.xxx-jdk-windowsservercore-ltsc2022`) | ||
|
||
The file `docker-bake.hcl` defines all the configuration for Linux images and their associated tags. | ||
|
||
There are also versioned tags in DockerHub, and they are recommended for production use. | ||
See the full list [here](https://hub.docker.com/r/jenkins/agent/tags) | ||
|
||
## Timezones | ||
|
||
### Using directly the `jenkins/agent` image | ||
|
||
By default, the image is using the `Etc/UTC` timezone. | ||
If you want to use the timezone of your machine, you can mount the `/etc/localtime` file from the host (as per [this comment](https://github.com/moby/moby/issues/12084#issuecomment-89697533)) and the `/etc/timezone` from the host too. | ||
In this example, the machine is using the `Europe/Paris` timezone. | ||
|
||
```bash | ||
docker run --rm --tty --interactive --entrypoint=date --volume=/etc/localtime:/etc/localtime:ro --volume=/etc/timezone:/etc/timezone:ro jenkins/agent | ||
Fri Nov 25 18:27:22 CET 2022 | ||
``` | ||
## agent | ||
[![Docker Pulls](https://img.shields.io/docker/pulls/jenkins/agent.svg)](https://hub.docker.com/r/jenkins/agent/) | ||
|
||
You can also set the `TZ` environment variable to the desired timezone. | ||
`TZ` is a standard POSIX environment variable used by many images, see [Wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for a list of valid values. | ||
The next command is run on a machine using the `Europe/Paris` timezone a few seconds after the previous one. | ||
This is a base image for Docker, which includes JDK and the Jenkins agent executable (agent.jar). | ||
|
||
```bash | ||
docker run --rm --tty --interactive --env TZ=Asia/Shanghai --entrypoint=date jenkins/agent | ||
Sat Nov 26 01:27:58 CST 2022 | ||
``` | ||
See [the `agent` README](./README_agent.md) | ||
|
||
### Using the `jenkins/agent` image as a base image | ||
## inbound-agent | ||
[![Docker Pulls](https://img.shields.io/docker/pulls/jenkins/inbound-agent.svg)](https://hub.docker.com/r/jenkins/inbound-agent/) | ||
|
||
Should you want to adapt the `jenkins/agent` image to your local timezone while creating your own image based on it, you could use the following command (inspired by issue #[291](https://github.com/jenkinsci/docker-inbound-agent/issues/291)): | ||
This is an image based on `agent` for [Jenkins](https://jenkins.io) agents using TCP or WebSockets to establish inbound connection to the Jenkins master. | ||
|
||
```dockerfile | ||
FROM jenkins/agent as agent | ||
[...] | ||
ENV TZ=Asia/Shanghai | ||
[...] | ||
RUN ln -snf /usr/share/zoneinfo/"${TZ}" /etc/localtime && echo "${TZ}" > /etc/timezone \ | ||
&& dpkg-reconfigure -f noninteractive tzdata \ | ||
[...] | ||
``` | ||
See [the `inbound-agent` README](./README_inbound-agent.md) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep junit Linux test results too