Add the trusted delivery agent image (#15)
seat-back-trivia/pipeline/head This commit looks good
seat-back-trivia/pipeline/head This commit looks good
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
88ae7f9158
commit
bb5b9f3026
@@ -0,0 +1,6 @@
|
||||
# Trusted delivery agent: Docker CLI, Ansible, Trivy, and pip-audit. All tools are
|
||||
# in the image, so recreating the container loses nothing.
|
||||
FROM jenkins/inbound-agent:3395.v6e5377b_0fb_3c-3-jdk21
|
||||
USER root
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends python3 python3-venv openssh-client curl ca-certificates && rm -rf /var/lib/apt/lists/* && curl -fsSL https://download.docker.com/linux/static/stable/x86_64/docker-29.8.1.tgz | tar xz --strip-components=1 -C /usr/local/bin docker/docker && curl -fsSLo /tmp/trivy.tgz https://github.com/aquasecurity/trivy/releases/download/v0.75.0/trivy_0.75.0_Linux-64bit.tar.gz && echo "c6e65abddb348e25f10549df887045629cf28cc72453cd1c63acb717316b3f3f /tmp/trivy.tgz" | sha256sum -c - && tar xzf /tmp/trivy.tgz -C /usr/local/bin trivy && rm /tmp/trivy.tgz && python3 -m venv /opt/delivery && /opt/delivery/bin/pip install --no-cache-dir ansible-core==2.22.0 pip-audit==2.10.1
|
||||
USER jenkins
|
||||
@@ -0,0 +1,36 @@
|
||||
# Inbound Jenkins agent for the delivery stages. The Docker socket makes this
|
||||
# container equivalent to host root, so only reviewed main-branch stages use its
|
||||
# credentials. DOCKER_GID and JENKINS_SECRET come from an untracked .env file.
|
||||
name: jenkins-agent
|
||||
|
||||
services:
|
||||
agent:
|
||||
build: .
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- JENKINS_URL=http://jenkins:8080
|
||||
- JENKINS_AGENT_NAME=delivery-agent
|
||||
- JENKINS_SECRET=${JENKINS_SECRET}
|
||||
- JENKINS_WEB_SOCKET=true
|
||||
- JAVA_OPTS=-Xmx96m
|
||||
group_add:
|
||||
- "${DOCKER_GID}"
|
||||
volumes:
|
||||
- agent-data:/home/jenkins/agent
|
||||
- trivy-cache:/home/jenkins/.cache/trivy
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
networks:
|
||||
- gitea-net
|
||||
logging:
|
||||
options:
|
||||
max-size: 10m
|
||||
max-file: "3"
|
||||
|
||||
volumes:
|
||||
agent-data:
|
||||
trivy-cache:
|
||||
|
||||
networks:
|
||||
gitea-net:
|
||||
external: true
|
||||
name: gitea_gitea-net
|
||||
Reference in New Issue
Block a user