Add trusted delivery agent for #24
Scrap-Web/pipeline/head This commit looks good

This commit is contained in:
2026-11-11 13:23:25 -05:00
parent 6553b4400c
commit 459838dfcd
5 changed files with 79 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
# Trusted delivery agent. Connects to the existing Jenkins controller over the
# internal gitea-net network (WebSocket), so no new port is published.
services:
jenkins-agent:
build:
context: ..
dockerfile: agent/Dockerfile
image: ssw590/jenkins-delivery-agent:1
container_name: jenkins-agent
restart: unless-stopped
env_file: [agent.secrets.env] # JENKINS_SECRET only; not in Git
environment:
JENKINS_URL: "http://jenkins:8080/"
JENKINS_AGENT_NAME: "delivery-agent"
JENKINS_WEB_SOCKET: "true"
JENKINS_AGENT_WORKDIR: "/home/jenkins/agent"
# Host Docker socket: needed to build/push images. This is effectively root
# on the Droplet, so only reviewed main-branch delivery jobs may use this agent.
group_add: ["${DOCKER_GID:?set DOCKER_GID in .env}"]
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- agent_home:/home/jenkins # workspace, known_hosts, registry login
networks: [gitea-net]
networks:
gitea-net:
external: true
name: gitea-net
volumes:
agent_home: