Add Jenkins CI service, pricing app, tests and Jenkinsfile (refs #14)
Deploy Jenkins LTS 2.580.1 beside Gitea on The-Ocean: - deploy/jenkins: official image pinned by digest plus python3 and a hashed 60-plugin lockfile (Pipeline + Gitea bundle tested by ci/jenkins-capacity, plus matrix-auth for named roles) - compose: jenkins service with persistent jenkins-home, no published ports, 512 MiB RAM / 768 MiB RAM+swap / 0.75 CPU, 256 MiB heap - Gitea webhooks restricted to the private jenkins host; Caddy alias keeps Jenkins->Gitea checkout and status traffic on the droplet - Caddy serves ci.yebilly.me only to Stevens 155.246.0.0/16 and team IPs from the untracked .env Add the instructor's pricing example, unit tests and Declarative Jenkinsfile (checkout, syntax check, unit tests). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,7 @@ services:
|
||||
- GITEA__server__ROOT_URL=https://git.yebilly.me/
|
||||
- GITEA__server__HTTP_PORT=3000
|
||||
- GITEA__server__DISABLE_SSH=true # Git over HTTPS only
|
||||
- GITEA__webhook__ALLOWED_HOST_LIST=jenkins # only private webhook target allowed
|
||||
volumes:
|
||||
- gitea-data:/data
|
||||
networks: [web]
|
||||
@@ -27,13 +28,41 @@ services:
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
||||
- caddy-data:/data # certificates + ACME account
|
||||
- caddy-config:/config
|
||||
networks: [web]
|
||||
environment:
|
||||
- CI_TEAM_IPS=${CI_TEAM_IPS:-} # team source IPs for ci.yebilly.me, kept in untracked .env
|
||||
networks:
|
||||
web:
|
||||
# Jenkins resolves git.yebilly.me to Caddy here, so checkout and status
|
||||
# calls stay on the droplet instead of hairpinning through the public IP.
|
||||
aliases: [git.yebilly.me]
|
||||
depends_on: [gitea]
|
||||
|
||||
# Jenkins LTS controller (Assignment 6). Builds run on its single executor.
|
||||
# Bounded so Gitea keeps memory on the 512 MB droplet.
|
||||
jenkins:
|
||||
build: ./jenkins
|
||||
image: ssw590-jenkins:2.580.1
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
# The capacity test's 128 MiB heap ran builds, but the web UI hit "OutOfMemoryError:
|
||||
# Java heap space" once the update-center catalog loaded (2026-10-22), so the
|
||||
# persistent service gets twice the test bounds on the 1 GiB droplet.
|
||||
- JAVA_OPTS=-Xms64m -Xmx256m -XX:+UseSerialGC -Djava.awt.headless=true
|
||||
volumes:
|
||||
- jenkins-home:/var/jenkins_home
|
||||
networks: [web]
|
||||
mem_limit: 512m
|
||||
memswap_limit: 768m
|
||||
cpus: 0.75
|
||||
pids_limit: 256
|
||||
# ponytail: no ports: on purpose -- Caddy and the Gitea webhook reach jenkins:8080 privately;
|
||||
# agent port 50000 is never published.
|
||||
|
||||
volumes:
|
||||
gitea-data:
|
||||
caddy-data:
|
||||
caddy-config:
|
||||
jenkins-home:
|
||||
|
||||
networks:
|
||||
web:
|
||||
|
||||
Reference in New Issue
Block a user