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>
19 lines
928 B
Docker
19 lines
928 B
Docker
# Official Jenkins LTS image plus what the controller executor needs to run the
|
|
# pipeline: python3 for the tests and the pinned plugin lockfile.
|
|
FROM jenkins/jenkins:2.580.1-lts-jdk21@sha256:a660310e39ade10631f774bacd5219de767dfd08947ea5c32a739b5e5bb382c1
|
|
|
|
USER root
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends python3 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
USER jenkins
|
|
|
|
# ponytail: curl + sha256sum instead of jenkins-plugin-cli, which needs >128 MiB heap
|
|
# just to parse the update-center JSON on a 512 MB droplet.
|
|
COPY plugins.txt /tmp/plugins.txt
|
|
RUN mkdir -p /usr/share/jenkins/ref/plugins && cd /usr/share/jenkins/ref/plugins \
|
|
&& tr -d '\r' < /tmp/plugins.txt | grep -Ev '^(#|$)' | while IFS=: read -r name ver sha; do \
|
|
curl -fsSL -o "$name.jpi" "https://updates.jenkins.io/download/plugins/$name/$ver/$name.hpi" \
|
|
&& echo "$sha $name.jpi" | sha256sum -c --quiet || exit 1; \
|
|
done
|