Skip to content

Commit

Permalink
Merge branch 'master' into feature/jenkins-agent-jar-file
Browse files Browse the repository at this point in the history
  • Loading branch information
dduportal committed Aug 16, 2024
2 parents 71cbe75 + 4ace7e1 commit 9785210
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ RUN mkdir -p /home/"${user}"/.jenkins && mkdir -p "${AGENT_WORKDIR}"
VOLUME /home/"${user}"/.jenkins
VOLUME "${AGENT_WORKDIR}"
WORKDIR /home/"${user}"
ENV user=${user}
ENV USER=${user}
LABEL \
org.opencontainers.image.vendor="Jenkins project" \
org.opencontainers.image.title="Official Jenkins Agent Base Docker image" \
Expand Down
2 changes: 1 addition & 1 deletion archlinux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ RUN mkdir /home/"${user}"/.jenkins && mkdir -p "${AGENT_WORKDIR}"
VOLUME /home/"${user}"/.jenkins
VOLUME "${AGENT_WORKDIR}"
WORKDIR /home/"${user}"
ENV user=${user}
ENV USER=${user}
LABEL \
org.opencontainers.image.vendor="Jenkins project" \
org.opencontainers.image.title="Official Jenkins Agent Base Docker image" \
Expand Down
2 changes: 1 addition & 1 deletion debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ RUN mkdir -p /home/"${user}"/.jenkins && mkdir -p "${AGENT_WORKDIR}"
VOLUME /home/"${user}"/.jenkins
VOLUME "${AGENT_WORKDIR}"
WORKDIR /home/"${user}"
ENV user=${user}
ENV USER=${user}
LABEL \
org.opencontainers.image.vendor="Jenkins project" \
org.opencontainers.image.title="Official Jenkins Agent Base Docker image" \
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_agent.bats
Original file line number Diff line number Diff line change
Expand Up @@ -171,5 +171,5 @@ ARCH=${ARCH:-x86_64}
}

@test "[${SUT_IMAGE}] default user is exposed in the environment" {
docker inspect --format '{{ .Config.Env }}' "${SUT_IMAGE}" | grep 'user=jenkins'
docker inspect --format '{{ .Config.Env }}' "${SUT_IMAGE}" | grep 'USER=jenkins'
}
6 changes: 3 additions & 3 deletions windows/nanoserver/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ ARG AGENT_FILENAME=agent.jar
ARG AGENT_HASH_FILENAME=$AGENT_FILENAME.sha1

RUN net accounts /maxpwage:unlimited ; `
net user "$env:user" /add /expire:never /passwordreq:no ; `
net localgroup Administrators /add $env:user ; `
net user "$env:USER" /add /expire:never /passwordreq:no ; `
net localgroup Administrators /add $env:USER ; `
New-Item -ItemType Directory -Path C:/ProgramData/Jenkins | Out-Null

ARG AGENT_ROOT=C:/Users/$user
Expand All @@ -117,7 +117,7 @@ RUN git config --global core.longpaths true
VOLUME "${AGENT_ROOT}"/.jenkins
VOLUME "${AGENT_WORKDIR}"
WORKDIR "${AGENT_ROOT}"
ENV user=${user}
ENV USER=${user}
LABEL `
org.opencontainers.image.vendor="Jenkins project" `
org.opencontainers.image.title="Official Jenkins Agent Base Docker image" `
Expand Down
8 changes: 4 additions & 4 deletions windows/windowsservercore/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ ARG AGENT_FILENAME=agent.jar
ARG AGENT_HASH_FILENAME=$AGENT_FILENAME.sha1

RUN net accounts /maxpwage:unlimited ; `
net user "$env:user" /add /expire:never /passwordreq:no ; `
net localgroup Administrators /add $env:user ; `
Set-LocalUser -Name $env:user -PasswordNeverExpires 1; `
net user "$env:USER" /add /expire:never /passwordreq:no ; `
net localgroup Administrators /add $env:USER ; `
Set-LocalUser -Name $env:USER -PasswordNeverExpires 1; `
New-Item -ItemType Directory -Path C:/ProgramData/Jenkins | Out-Null

ARG AGENT_ROOT=C:/Users/$user
Expand All @@ -110,7 +110,7 @@ RUN git config --global core.longpaths true
VOLUME "${AGENT_ROOT}"/.jenkins
VOLUME "${AGENT_WORKDIR}"
WORKDIR "${AGENT_ROOT}"
ENV user=${user}
ENV USER=${user}
LABEL `
org.opencontainers.image.vendor="Jenkins project" `
org.opencontainers.image.title="Official Jenkins Agent Base Docker image" `
Expand Down

0 comments on commit 9785210

Please sign in to comment.