Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Commit

Permalink
Update to latest version of docker/agent (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
timja authored Sep 6, 2021
1 parent f00d79f commit ee8ab6c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 54 deletions.
41 changes: 0 additions & 41 deletions 11/windows/windowsservercore-1809/Dockerfile

This file was deleted.

23 changes: 14 additions & 9 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,23 @@ pipeline {
steps {
script {
def branchName = "${env.BRANCH_NAME}"
if (branchName ==~ 'master') {
// publish the images to Dockerhub
infra.withDockerCredentials {
infra.withDockerCredentials {
if (branchName ==~ 'master') {
// publish the images to Dockerhub
sh '''
docker buildx create --use
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker buildx bake --push --file docker-bake.hcl linux
'''
} else if (env.TAG_NAME == null) {
sh 'make build'
sh 'make test'
sh '''
docker buildx create --use
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker buildx bake --push --file docker-bake.hcl linux
docker buildx create --use
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker buildx bake --file docker-bake.hcl linux
'''
}
} else if (env.TAG_NAME == null) {
sh 'make build'
sh 'make test'
}

if(env.TAG_NAME != null) {
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ To run a Docker container

Windows agent:

docker run jenkins/inbound-agent:windowsservercore-1809 -Url http://jenkins-server:port -Secret <secret> -Name <agent name>
docker run jenkins/inbound-agent:windowsservercore-ltsc2019 -Url http://jenkins-server:port -Secret <secret> -Name <agent name>

To run a Docker container with [Work Directory](https://github.com/jenkinsci/remoting/blob/master/docs/workDir.md)

Expand All @@ -34,7 +34,7 @@ To run a Docker container with [Work Directory](https://github.com/jenkinsci/rem

Windows agent:

docker run jenkins/inbound-agent:windowsservercore-1809 -Url http://jenkins-server:port -WorkDir=C:/Jenkins/agent -Secret <secret> -Name <agent name>
docker run jenkins/inbound-agent:windowsservercore-ltsc2019 -Url http://jenkins-server:port -WorkDir=C:/Jenkins/agent -Secret <secret> -Name <agent name>

Optional environment variables:

Expand Down
4 changes: 2 additions & 2 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ group "linux-ppc64le" {

# update this to use a newer build number for jenkins/docker image
variable "AGENT_IMAGE_BUILD_NUMBER" {
default = "1"
default = "4"
}

variable "REGISTRY" {
Expand Down Expand Up @@ -104,5 +104,5 @@ target "debian_jdk11" {
"${REGISTRY}/${JENKINS_REPO}:latest",
"${REGISTRY}/${JENKINS_REPO}:latest-jdk11",
]
platforms = ["linux/amd64", "linux/arm64"]
platforms = ["linux/amd64", "linux/arm64", "linux/s390x"]
}

0 comments on commit ee8ab6c

Please sign in to comment.