Skip to content
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

fix(debian) Add missing packages to allow git cloning by ssh #326

Merged
merged 2 commits into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 11/archlinux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ RUN groupadd -g "${gid}" "${group}" \

ARG AGENT_WORKDIR=/home/"${user}"/agent

RUN pacman -Syu curl git git-lfs --noconfirm
RUN pacman -Syu curl git git-lfs openssh --noconfirm

ARG VERSION=3071.v7e9b_0dc08466
ADD --chown="${user}":"${group}" "https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/${VERSION}/remoting-${VERSION}.jar" /usr/share/jenkins/agent.jar
Expand Down
15 changes: 10 additions & 5 deletions 11/bullseye/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,19 @@ RUN groupadd -g "${gid}" "${group}" \

ARG AGENT_WORKDIR=/home/${user}/agent

## Always use the latest Alpine packages: no need for versions
## Always use the latest Debian packages: no need for versions
# hadolint ignore=DL3008
RUN apt-get update \
&& apt-get --yes --no-install-recommends install \
git-lfs \
curl \
ca-certificates \
fontconfig \
ca-certificates \
curl \
fontconfig \
git \
git-lfs \
less \
netbase \
openssh-client \
patch \
&& rm -rf /var/lib/apt/lists/*

ARG VERSION=3071.v7e9b_0dc08466
Expand Down
9 changes: 7 additions & 2 deletions 17/bullseye/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,15 @@ ARG AGENT_WORKDIR=/home/"${user}"/agent
# hadolint ignore=DL3008
RUN apt-get update \
&& apt-get --yes --no-install-recommends install \
git-lfs \
curl \
ca-certificates \
curl \
fontconfig \
git \
git-lfs \
less \
netbase \
openssh-client \
patch \
&& rm -rf /var/lib/apt/lists/*

ARG VERSION=3071.v7e9b_0dc08466
Expand Down
11 changes: 8 additions & 3 deletions tests/tests.bats
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ARCH=${ARCH:-x86_64}
assert_equal "${output}" "UTF-8"
}

@test "[${SUT_IMAGE}] image has bash, curl and java installed and in the PATH" {
@test "[${SUT_IMAGE}] image has bash, curl, ssh and java installed and in the PATH" {
local cid
cid="$(docker run -d -it -P "${SUT_IMAGE}" /bin/bash)"

Expand All @@ -45,13 +45,18 @@ ARCH=${ARCH:-x86_64}

run docker exec "${cid}" sh -c "command -v curl"
assert_success
run docker exec "${cid}" sh -c "curl --version"
run docker exec "${cid}" curl --version
assert_success

run docker exec "${cid}" sh -c "command -v java"
assert_success

run docker exec "${cid}" sh -c "java -version"
run docker exec "${cid}" java -version
assert_success

run docker exec "${cid}" sh -c "command -v ssh"
assert_success
run docker exec "${cid}" ssh -V
assert_success

run docker exec "${cid}" sh -c "printenv | grep AGENT_WORKDIR"
Expand Down