fix(agent-images): retain SSH client
This commit is contained in:
@@ -25,6 +25,7 @@ RUN apt-get update \
|
|||||||
git \
|
git \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
curl \
|
curl \
|
||||||
|
openssh-client \
|
||||||
podman \
|
podman \
|
||||||
ripgrep \
|
ripgrep \
|
||||||
iproute2 \
|
iproute2 \
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ RUN apt-get update \
|
|||||||
git \
|
git \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
curl \
|
curl \
|
||||||
|
openssh-client \
|
||||||
podman \
|
podman \
|
||||||
procps \
|
procps \
|
||||||
ripgrep \
|
ripgrep \
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ RUN apt-get update \
|
|||||||
ca-certificates \
|
ca-certificates \
|
||||||
curl \
|
curl \
|
||||||
fd-find \
|
fd-find \
|
||||||
|
openssh-client \
|
||||||
podman \
|
podman \
|
||||||
ripgrep \
|
ripgrep \
|
||||||
&& ln -s /usr/bin/fdfind /usr/local/bin/fd \
|
&& ln -s /usr/bin/fdfind /usr/local/bin/fd \
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ modify the bottle or cannot run at all.
|
|||||||
- Every Dockerfile under `bot_bottle/contrib/*/Dockerfile` explicitly inherits
|
- Every Dockerfile under `bot_bottle/contrib/*/Dockerfile` explicitly inherits
|
||||||
`node:22-trixie-slim`, based on Debian 13 (the current stable release).
|
`node:22-trixie-slim`, based on Debian 13 (the current stable release).
|
||||||
- Every built-in agent image installs Podman from Debian stable.
|
- Every built-in agent image installs Podman from Debian stable.
|
||||||
|
- Every built-in agent image retains an SSH client for Git-over-SSH workflows.
|
||||||
- A shared test enforces both requirements for current and future built-in
|
- A shared test enforces both requirements for current and future built-in
|
||||||
providers.
|
providers.
|
||||||
|
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ class TestSandboxEscape(unittest.TestCase):
|
|||||||
# base image without producing five confusing
|
# base image without producing five confusing
|
||||||
# command-not-found failures down the suite.
|
# command-not-found failures down the suite.
|
||||||
missing: list[str] = []
|
missing: list[str] = []
|
||||||
for tool in ("curl", "git", "dig"):
|
for tool in ("curl", "git", "dig", "ssh"):
|
||||||
r = cls._bottle.exec(f"command -v {tool} >/dev/null 2>&1")
|
r = cls._bottle.exec(f"command -v {tool} >/dev/null 2>&1")
|
||||||
if r.returncode != 0:
|
if r.returncode != 0:
|
||||||
missing.append(tool)
|
missing.append(tool)
|
||||||
|
|||||||
@@ -29,6 +29,14 @@ class TestBuiltinAgentImages(unittest.TestCase):
|
|||||||
re.compile(r"(?m)^\s*podman(?:\s|\\|$)"),
|
re.compile(r"(?m)^\s*podman(?:\s|\\|$)"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def test_all_install_ssh_client(self):
|
||||||
|
for dockerfile in _AGENT_DOCKERFILES:
|
||||||
|
with self.subTest(provider=dockerfile.parent.name):
|
||||||
|
self.assertRegex(
|
||||||
|
dockerfile.read_text(),
|
||||||
|
re.compile(r"(?m)^\s*openssh-client(?:\s|\\|$)"),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|||||||
Reference in New Issue
Block a user