Compare commits

...

11 Commits

12 changed files with 392 additions and 4 deletions

View File

@ -106,3 +106,18 @@ Date: October 8, 2026; Contributors: MB, CDX; Task: improve Chapter 2 formatting
Date: October 10, 2026; contributors: MB, CDX; tool: OpenAI Codex using Computer Use in Safari. The user authorized completing Chapter 3 in the existing Lightsail Gitea project. Read the earlier report and dosManual version 1.18. Observed Gitea 1.22.3, Caddy 2.8.4, act runner 0.6.1, and an already registered texlive runner. The draft workflow existed only outside the repository. Prepared a versioned push workflow, pinned TeX image, Node runtime, and visible build metadata. An isolated preflight compilation succeeded. Actions run and artifact verification remain pending at this source revision; subsequent evidence will record actual results. No secrets are included. Date: October 10, 2026; contributors: MB, CDX; tool: OpenAI Codex using Computer Use in Safari. The user authorized completing Chapter 3 in the existing Lightsail Gitea project. Read the earlier report and dosManual version 1.18. Observed Gitea 1.22.3, Caddy 2.8.4, act runner 0.6.1, and an already registered texlive runner. The draft workflow existed only outside the repository. Prepared a versioned push workflow, pinned TeX image, Node runtime, and visible build metadata. An isolated preflight compilation succeeded. Actions run and artifact verification remain pending at this source revision; subsequent evidence will record actual results. No secrets are included.
Verified runs 1 and 2 passed for successive changes; run 3 failed for the intentional undefined command with upload skipped; run 4 passed after repair. Added Chapter 3, host and hint-only credential records, glossary terms, and evidence links. No credential value was written to source. Verified runs 1 and 2 passed for successive changes; run 3 failed for the intentional undefined command with upload skipped; run 4 passed after repair. Added Chapter 3, host and hint-only credential records, glossary terms, and evidence links. No credential value was written to source.
\section{Jenkins CI Implementation and Review Draft}
Date: October 20--23, 2026; contributors: MB, CDX; tool: OpenAI Codex.
Task: continue the existing Lightsail/Gitea project through Chapter 4 of
\texttt{dosManual-V1.38}. MB confirmed instructor approval of Lightsail,
selected the Python pricing example and private SSH tunnel, authorized the
dedicated pricing-app integration identity, created the Jenkins administrator
password personally, and added the local hosts entry. Codex inspected and
configured the service, tested private/public paths, and used an isolated
application branch for failure and repair. Observed PR-2 run 1 failed for
13 != 30; run 2 passed both tests on the new SHA. Codex prepared this chapter,
supporting tables, diagram, and review package from actual evidence. MB will
arrange teammate review later. No teammate approval, merge, issue closure,
SSH remediation, instructor access, or complete Chapter 4 submission is
claimed. No secret value is included in this document.

View File

@ -12,6 +12,8 @@
\usepackage{xspace} \usepackage{xspace}
\usepackage{xcolor} \usepackage{xcolor}
\usepackage{graphicx} \usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage{fancyhdr} \usepackage{fancyhdr}
\usepackage{amsmath,amssymb} \usepackage{amsmath,amssymb}
\usepackage{array} \usepackage{array}
@ -38,15 +40,15 @@
\definecolor{devopsLightBlue}{RGB}{232,240,247} \definecolor{devopsLightBlue}{RGB}{232,240,247}
% Replace these values for each assignment. % Replace these values for each assignment.
\newcommand{\AssignmentTitle}{Automated LaTeX Manual Build -- Group} \newcommand{\AssignmentTitle}{Jenkins Continuous Integration -- Group}
\newcommand{\AssignmentNumber}{5} \newcommand{\AssignmentNumber}{5}
\newcommand{\DocumentVersion}{1.9} \newcommand{\DocumentVersion}{1.11}
\newcommand{\DocumentStatus}{Group Report} \newcommand{\DocumentStatus}{Review Draft}
\newcommand{\CourseNumber}{SSW 590} \newcommand{\CourseNumber}{SSW 590}
\newcommand{\CourseName}{DevOps} \newcommand{\CourseName}{DevOps}
\newcommand{\Instructor}{Darian Muresan} \newcommand{\Instructor}{Darian Muresan}
\newcommand{\Organization}{Stevens Institute of Technology} \newcommand{\Organization}{Stevens Institute of Technology}
\newcommand{\DocumentDate}{October 10, 2026} \newcommand{\DocumentDate}{October 23, 2026}
\newcommand{\DueDate}{[Due Date and Time]} \newcommand{\DueDate}{[Due Date and Time]}
\newcommand{\VERSION}{Version \DocumentVersion+build.\buildRun.\buildCommit} \newcommand{\VERSION}{Version \DocumentVersion+build.\buildRun.\buildCommit}
@ -113,6 +115,7 @@
\include{devopsIntroduction} \include{devopsIntroduction}
\include{devopsGitea} \include{devopsGitea}
\include{devopsAutomatedManualBuild} \include{devopsAutomatedManualBuild}
\include{devopsJenkinsCI}
\include{devopsExampleAssignment} \include{devopsExampleAssignment}
\include{devopsKanbanSetup} \include{devopsKanbanSetup}
\include{devopsPasswords} \include{devopsPasswords}

View File

@ -12,6 +12,10 @@ link each entry to the changed chapter, table, figure, or controlled artifact.
\multicolumn{4}{l}{\small\itshape Document Update History (continued)}\\ \multicolumn{4}{l}{\small\itshape Document Update History (continued)}\\
\toprule \textbf{Date / Version} & \textbf{Author / contributor} & \textbf{Change} & \textbf{Sections / related tables}\\ \midrule \toprule \textbf{Date / Version} & \textbf{Author / contributor} & \textbf{Change} & \textbf{Sections / related tables}\\ \midrule
\endhead \bottomrule \endlastfoot \endhead \bottomrule \endlastfoot
October 23, 2026 / 1.11 (review update) & HS & Reviewed pricing application PR~2 and its Chapter 4 evidence; confirmed the failed run and successful repair, approved the pull request after the required check passed, and recorded that peer review is complete while merge and issue closure remain pending. Reviewed the corresponding Hosts and Passwords CI entries. & \ChapterRef{JenkinsCI}, \ChapterRef{Hosts}, \ChapterRef{Passwords}\\
October 23, 2026 / 1.10 (review draft) & MB, CDX & Added Jenkins CI deployment, private HTTPS access, Python agent, traceable failed/repaired PR checks, protected-main policy, external network tests, and operator procedures. Updated Hosts and Passwords with CI records; peer review and merge remain pending. & \ChapterRef{JenkinsCI}, \ChapterRef{Hosts}, \ChapterRef{Passwords}, \ChapterRef{AIPromptLog}\\
October 10, 2026 / 1.9 & MB, CDX & Added Automated Manual Build chapter, push workflow, visible build metadata, validation evidence, and glossary terms. Updated Hosts with verified runner resources and global scope; updated Passwords with hint-only credential boundaries. & \ChapterRef{AutomatedManualBuild}, \ChapterRef{AIPromptLog}\\ October 10, 2026 / 1.9 & MB, CDX & Added Automated Manual Build chapter, push workflow, visible build metadata, validation evidence, and glossary terms. Updated Hosts with verified runner resources and global scope; updated Passwords with hint-only credential boundaries. & \ChapterRef{AutomatedManualBuild}, \ChapterRef{AIPromptLog}\\
October 8, 2026 / 1.8 (draft) & MB, CDX & Improved Chapter 2 wording and layout, removed screenshot transcriptions that duplicated the supplied figures, and standardized contributor initials. & \ChapterRef{Gitea}, \ChapterRef{AIPromptLog}\\ October 8, 2026 / 1.8 (draft) & MB, CDX & Improved Chapter 2 wording and layout, removed screenshot transcriptions that duplicated the supplied figures, and standardized contributor initials. & \ChapterRef{Gitea}, \ChapterRef{AIPromptLog}\\

View File

@ -11,3 +11,7 @@
\newglossaryentry{rollback}{name={rollback},description={A controlled return to a known acceptable version or state after a failed or harmful change}} \newglossaryentry{rollback}{name={rollback},description={A controlled return to a known acceptable version or state after a failed or harmful change}}
\newglossaryentry{runbook}{name={runbook},description={A documented operational procedure for a repeatable task or incident response}} \newglossaryentry{runbook}{name={runbook},description={A documented operational procedure for a repeatable task or incident response}}
\newglossaryentry{synonyms}{name={synonyms},description={Equivalent terms used in this assignment; record preferred terms to avoid ambiguity in instructions and evidence}} \newglossaryentry{synonyms}{name={synonyms},description={Equivalent terms used in this assignment; record preferred terms to avoid ambiguity in instructions and evidence}}
\newglossaryentry{cimergegate}{name={merge gate},description={A protected-branch rule requiring specified verification results before normal pull-request merge}}
\newglossaryentry{ciwebhook}{name={webhook},description={An event-triggered HTTP delivery used here to notify Jenkins of Gitea repository changes}}
\newglossaryentry{ciprhead}{name={pull-request head},description={The latest proposed source commit, which must receive a fresh CI result after each corrective push}}

View File

@ -56,3 +56,14 @@ Runner & lightsail-actions-runner, act runner 0.6.1; global scope; texlive label
Job container & Digest-pinned TeX image; limit 1 GB RAM and one CPU; no published runner port.\\ Job container & Digest-pinned TeX image; limit 1 GB RAM and one CPU; no published runner port.\\
Services & Existing Gitea 1.22.3 and Caddy 2.8.4 remain on this host.\\ Services & Existing Gitea 1.22.3 and Caddy 2.8.4 remain on this host.\\
\end{longtable} \end{longtable}
\section{Verified Chapter 4 CI Components}
\begin{longtable}{p{0.27\textwidth}p{0.63\textwidth}}
\textbf{Component} & \textbf{Observed October 23, 2026}\\\hline
\texttt{ci.590hcm.dev} & Jenkins on existing Lightsail Gitea-Project, 184.193.0.32; DNS A TTL 300. Browser URL \url{https://ci.590hcm.dev:8443/login} through an approved SSH tunnel and local hostname mapping. Direct public CI HTTPS returns 403.\\
Controller & Official Jenkins 2.580.1 LTS; 768 MiB/1 CPU limit; zero executors; host-loopback 8080 only; named persistent home; inbound agent port disabled.\\
\texttt{jenkins-python-agent} & Private SSH 22, no host-published port; one exclusive python executor; 384 MiB/0.75 CPU limit; persistent workspace and host keys; Python 3.13.5.\\
External exposure & IPv4: 22/80/443 reachable; 3000/8080/50000 timed out. IPv6: 22/80 reachable; 443/3000/8080/50000 timed out. Unrestricted SSH remains open remediation.\\
Ownership / recovery & Existing Lightsail administrator owns CI. Restart persistence verified; no backup/restore claim. No new cloud instance or plan purchased; billing not audited.\\
\end{longtable}
See \ChapterRef{JenkinsCI} for the actual deployment diagram and test evidence.

331
devopsJenkinsCI.tex Normal file
View File

@ -0,0 +1,331 @@
\chapter{Continuous Integration with Jenkins}
\ChapterLabel{JenkinsCI}
\index{Jenkins}\index{continuous integration}\index{merge gate}
This chapter records the Jenkins CI implementation and the controlled failure
and repair observed on October 23, 2026. The team continues on AWS Lightsail;
MB reported instructor approval for that substitution for DigitalOcean.
The application is the assignment's Python pricing example in
\href{https://git.590hcm.dev/SSW590Team/pricing-app}{\texttt{SSW590Team/pricing-app}}.
\textbf{Review status: the required Jenkins check passed, and PR~2 received teammate
approval on October 23, 2026. The merge into main remains pending. This chapter remains
a review draft until the merge is completed and documented.}
\section{Jenkins Deployment and Persistence}
Jenkins runs as a controlled Docker service alongside the existing Gitea,
Caddy, and Actions runner. Its official image is
\texttt{jenkins/jenkins:2.580.1-lts-jdk21}, pinned to digest
{\footnotesize\path{sha256:a660310e39ade10631f774bacd5219de767dfd08947ea5c32a739b5e5bb382c1}}.
The reviewed
\href{https://git.590hcm.dev/SSW590Team/pricing-app/src/branch/main/deploy}{deployment directory}
contains the non-secret Compose configuration, agent Dockerfile, initialization
procedure, proxy configuration, and plugin record. The live stack is under
\path{/home/ubuntu/jenkins-deploy}. The complete plugin inventory is retained
with this review package; installed integration components include Gitea
\texttt{286.v0740a\_413c1eb\_} and Workflow Multibranch
\texttt{842.v3a\_b\_59b\_57b\_e6e}.
The Lightsail host has 2 vCPUs, 2 GB RAM, and a 60 GB disk. On October 23,
external verification and host inspection found about 44 GB disk free.
Observed container memory was about 498 MiB for Jenkins and 125 MiB for its
Python agent. The controller has a 768 MiB limit, one CPU limit, and Java heap
\texttt{-Xms128m -Xmx384m}; the agent has a 384 MiB limit and 0.75 CPU limit.
The existing 1 GB TeX jobs should not overlap with CI unnecessarily on this
small host. These observations are capacity checks, not a sustained load test.
\begin{verbatim}
restart: unless-stopped
ports:
- "127.0.0.1:8080:8080"
volumes:
- jenkins_home:/var/jenkins_home
\end{verbatim}
The actual named volume is \texttt{jenkins-deploy\_jenkins\_home}.
The named administrator account is \texttt{max}; the user personally created
its password. Registration is disabled. Jenkins currently grants full control
to authenticated users; only the named administrator has been provisioned.
Do not add other accounts without reviewing that authorization strategy.
A controller restart test on October 23 retained the configuration, named
administrator, Python node, multibranch job, and successful build history.
The verification package includes before/after records, with a new test
repeated after the PR failure and repair. Expected result: service restarts
without loss of these objects. Actual result is recorded in the matching
runtime JSON files. \textbf{Restart persistence is not a backup or restore test.}
\section{HTTPS, Access, and Firewall}
The complete Jenkins login URL is
\url{https://ci.590hcm.dev:8443/login}. It requires the approved SSH tunnel.
Name.com DNS has an A record for \texttt{ci.590hcm.dev} pointing to
\texttt{184.193.0.32}, TTL 300. On the accessing computer, map the CI name to
loopback in the hosts file, then run the following with that operator's own
approved Lightsail SSH key. The instructor needs approved SSH access to this
path, but no Jenkins account merely to view the login page. Access for a new
person must be arranged by the host owner; the owner's private key must not
be shared.
\begin{verbatim}
# Local hosts entry:
127.0.0.1 ci.590hcm.dev
# Use the operator's approved key file:
ssh -i /path/to/approved-key.pem -N \
-L 127.0.0.1:8443:127.0.0.1:443 ubuntu@184.193.0.32
\end{verbatim}
Caddy terminates TLS and forwards to \texttt{jenkins:8080}. It accepts the
CI application route only when the connection arrives from the Docker bridge
gateway \texttt{172.18.0.1}, as it does for host-loopback SSH forwarding.
Other CI requests receive HTTP 403. This boundary trusts the host and its
container network. The Jenkins URL is set to
\url{https://ci.590hcm.dev:8443/}; Caddy supplies its standard forwarded
request headers. The certificate was validated with the normal system trust
store: issuer Let's Encrypt YE2, valid from October 23, 2026 at 15:18:29 UTC
through January 21, 2027 at 15:18:28 UTC.
The live public HTTP endpoint returned 308 with
\url{https://ci.590hcm.dev/login} as its Location; a direct public HTTPS
request returned 403. The tunnel URL returned 200 and rendered the login
page. Caddy automatic HTTPS handles renewal with its existing persistent data
volume; this was inspected as configuration, not demonstrated by waiting for
a certificate renewal cycle \cite{caddy-ci-autohttps}. \begin{figure}[htbp]\centering
\includegraphics[width=0.85\linewidth]{prism-uploads/ch4-https-login.jpg}
\caption{October 23, 2026: Jenkins login form opened through the approved
SSH tunnel at the complete HTTPS hostname. This proves web availability,
not application test success.}\label{Figure:CILogin}
\end{figure}
The temporary
\texttt{127.0.0.1:18080} tunnel used for initial setup is not the published
operational URL.
\begin{table}[htbp]\centering\small
\begin{tabular}{lcc}
\toprule External TCP test, October 23, 2026 & IPv4 & IPv6\\\midrule
SSH 22 & reachable & reachable\\
HTTP 80 & reachable & reachable\\
HTTPS 443 & reachable & timed out\\
Gitea backend 3000 & timed out & timed out\\
Jenkins backend 8080 & timed out & timed out\\
Inbound agent 50000 & timed out & timed out\\\bottomrule
\end{tabular}
\caption{Tests from the user's Mac, outside Lightsail, at 21:14:56 UTC.
Timeouts show lack of reachability from this vantage, not a universal firewall proof.}
\label{Table:CIExposure}
\end{table}
The host is dual-stack. Cloud rules previously observed allow 80 and 22 from
any IPv4/IPv6 address and 443 from any IPv4 address. UFW is inactive. Docker
publishes Caddy 80/443 and binds Jenkins 8080 only to host loopback; the
Python agent publishes no port. Jenkins' inbound agent listener is disabled.
\textbf{Unrestricted SSH remains a corrective action inherited from Chapter 2.}
Verify another approved administrator can still connect before narrowing it.
No claim is made that HTTPS or the CI proxy replaces cloud and host controls.
\section{Gitea Trigger and Traceability}
The repository-scoped Gitea webhook posts JSON to
{\footnotesize\path{http://jenkins:8080/gitea-webhook/post}} on the shared container bridge.
Its selected events are create, delete, push, pull request, and pull-request
synchronization; the branch filter is \texttt{*}. Gitea's webhook destination
allowlist is narrowed to \texttt{jenkins}. The network is named
\texttt{gitea-deploy\_internal}, but its Docker \texttt{Internal} setting is
false; it is not an egress-isolated network.
The dedicated restricted non-admin Gitea identity is \texttt{jenkins-ci}.
It has write collaboration on pricing-app only. Its token scopes are
\texttt{read:user} and \texttt{write:repository}; the latter is needed because
this Gitea version groups commit-status writing with repository write.
Automatic webhook administration is disabled for this identity. The human
repository administrator configures the hook.
Jenkins uses the Gitea plugin with a Multibranch Pipeline. The API endpoint is
\path{http://gitea:3000}; checkout uses the same private route. PR discovery
uses strategy \texttt{HEAD}, not a synthetic merge revision. Fork PR
discovery is not enabled. For the repair, webhook delivery
\path{86a0253b-7fd1-430b-a019-1c5fb4329727} recorded
\texttt{pull\_request\_sync}, HTTP 200, body \texttt{Processed}, at
21:14:24 UTC. It triggered
\href{https://ci.590hcm.dev:8443/job/pricing-app/job/PR-2/2/}{PR-2 build 2}
for commit \texttt{747ed9a82f}. A delivered webhook only proves transport;
the matching run and status below prove verification.
\begin{figure}[htbp]\centering
\begin{tikzpicture}[node distance=9mm,box/.style={draw,rounded corners,align=center,font=\scriptsize,inner sep=5pt},>=stealth]
\node[box] (browser) {\textless\textless device\textgreater\textgreater\\Team browser + SSH tunnel};
\node[box,below=of browser] (proxy) {\textless\textless container\textgreater\textgreater\\Caddy TLS proxy};
\node[box,below left=13mm and 5mm of proxy] (gitea) {\textless\textless container\textgreater\textgreater\\Gitea 1.22.3};
\node[box,below right=13mm and 5mm of proxy] (controller) {\textless\textless container\textgreater\textgreater\\Jenkins controller\\0 executors};
\node[box,below=19mm of controller] (agent) {\textless\textless container\textgreater\textgreater\\Python SSH agent\\checkout + tests; 1 executor};
\node[box,below=19mm of gitea] (data) {\textless\textless volume\textgreater\textgreater\\Gitea repositories + SQLite};
\node[box,right=10mm of controller] (home) {\textless\textless volume\textgreater\textgreater\\Jenkins home};
\draw[->] (browser)--node[right,font=\tiny]{SSH to host; local 8443 to host 443}(proxy);
\draw[->] (proxy)--node[above right,font=\tiny]{private 8080}(controller);
\draw[->] (proxy)--node[above left,font=\tiny]{private 3000}(gitea);
\draw[->] (gitea)--node[above,font=\tiny]{webhook 8080}(controller);
\draw[->] (controller) to[bend left=18] node[below,font=\tiny]{API status 3000}(gitea);
\draw[->] (controller)--node[right,font=\tiny]{private SSH 22}(agent);
\draw[->] (agent) to[bend left=12] node[below,font=\tiny]{checkout 3000}(gitea);
\draw[->] (gitea)--(data);\draw[->] (controller)--(home);
\end{tikzpicture}
\caption{Actual deployment on the AWS Lightsail device Gitea-Project.
Caddy is reached through the approved access path; webhook, agent, and data
connections stay on the container bridge. Public CI requests are denied.}
\label{Figure:CIDeployment}
\end{figure}
\section{Versioned Pipeline and Tests}
The root
\href{https://git.590hcm.dev/SSW590Team/pricing-app/src/branch/main/Jenkinsfile}{Jenkinsfile}
uses the \texttt{python} agent label. Checkout fetches the selected revision;
the run prints its exact commit and Python version. The next stage compiles
\texttt{pricing.py}; the final stage runs unittest discovery. These checks
use Python 3.13.5 and its standard library, with no pip dependency. The
agent image derives from official Jenkins SSH Agent digest
{\footnotesize\path{sha256:5af828cead1f8f69162f6e1d827b8a6712007c13438ca9db01ae34e11ed07fd3}}
and installs Debian's \texttt{python3=3.13.5-1}. Transitive Debian packages
are not fully locked; record an image digest on rebuild.
To reproduce from a clean checkout of the linked commit on an executor with
Python installed:
\begin{verbatim}
python3 --version
python3 -m py_compile pricing.py
python3 -m unittest discover -s tests -v
\end{verbatim}
Expected passing output is two tests and \texttt{OK}. The intentional
regression passed syntax checking but failed \texttt{test\_total}:
\texttt{AssertionError: 13 != 30}; Jenkins returned FAILURE. The repaired
commit passed both stages and returned SUCCESS. The run uses
\path{/home/jenkins/agent} in the agent container; the controller does not
execute application tests \cite{jenkins-ci-isolation}.
\begin{figure}[htbp]\centering
\includegraphics[width=\linewidth]{prism-uploads/ch4-jenkins-repair-run.jpg}
\caption{October 23, 2026: PR-2 build 2 shows SUCCESS, the private webhook
origin, and repair commit 747ed9a82feee9018ac8fe0d9eab8c007d23caf8.
The Jenkins UI displays its own timezone; the narrative uses UTC explicitly.}
\label{Figure:CIRepairRun}
\end{figure}
\section{Required Merge Gate}
The \texttt{main} protection rule disables direct pushes, requires one
approval, dismisses stale approvals, blocks rejected reviews, and requires
the exact context \path{pricing-app/pipeline/pr-main}. The branch build's
\path{pricing-app/pipeline/head} context is distinct and cannot satisfy
that PR-specific rule. The Gitea plugin publishes pending and final results
using the integration identity; after repair, the successful required status
belongs to the new PR head commit, not the earlier failed commit.
\textbf{Administrator exception:} this Gitea 1.22 installation displays an
administrator override. The screenshots were captured from the owner's
account, so they show that exception. No override was used. The required
check is configured for the normal merge process, but an absolute guarantee
that administrators cannot bypass it has not been demonstrated. Peer review
was completed on October 23, 2026. The normal merge remains necessary before final submission.
\begin{figure}[htbp]\centering
\includegraphics[width=\linewidth]{prism-uploads/ch4-failed-check.jpg}
\caption{October 23, 2026: failed commit 5c837eaae7a49a1a24b9aa1d9ac2b886b5b9be14;
required context pricing-app/pipeline/pr-main is red. The normal conditions
are unmet; the owner interface separately exposes its administrator override.
See \href{https://git.590hcm.dev/SSW590Team/pricing-app/pulls/2}{PR 2} and
\href{https://ci.590hcm.dev:8443/job/pricing-app/job/PR-2/1/}{failed run 1}.}
\label{Figure:CIFailedGate}
\end{figure}
\begin{figure}[htbp]\centering
\includegraphics[width=\linewidth]{prism-uploads/ch4-passing-check.jpg}
\caption{October 23, 2026: repair commit 747ed9a82feee9018ac8fe0d9eab8c007d23caf8;
required context pricing-app/pipeline/pr-main is green. Teammate approval was recorded on October 23, 2026. See the same PR and
\href{https://ci.590hcm.dev:8443/job/pricing-app/job/PR-2/2/}{passing run 2}.}
\label{Figure:CIPassingGate}
\end{figure}
\section{Failure, Repair, and Review}
\href{https://git.590hcm.dev/SSW590Team/pricing-app/issues/1}{Issue 1}
defines the exercise. \href{https://git.590hcm.dev/SSW590Team/pricing-app/pulls/2}{PR 2}
contains \texttt{Closes \#1}.
The source branch is:
\begin{verbatim}
feature/issue-1-ci-validation
\end{verbatim}
Its base is \texttt{main}.
The controlled change replaced multiplication with addition, then a second
commit restored multiplication on that same branch. Thus the final net code
diff is empty while the two commits and both build outcomes remain auditable.
\begin{longtable}{L{2.3cm}L{3.1cm}L{6.5cm}}
\toprule October 23 (UTC) & Commit / run & Expected and actual result\\\midrule
21:10--21:11 & \texttt{5c837eaae7}; PR-2/1 & Syntax passes; test\_total fails, 13 instead of 30. Jenkins FAILURE and required PR status failure observed.\\
21:14 & \texttt{747ed9a82f}; PR-2/2 & Correction restores multiplication. New webhook, checkout of new head, two tests pass, Jenkins SUCCESS and required PR status success observed.\\
Completed & Peer review & Hailey reviewed and approved PR 2 on October 23, 2026, after confirming the intentional Jenkins failure, successful repair, and passing required check.\\
Pending & Merge / closure & Merge through the normal reviewed flow, confirm merge SHA and automatic issue closure, then finalize this chapter.\\\bottomrule
\end{longtable}
Both PR runs are retained and their sanitized console logs are in the review
package. Application code was changed in a feature branch; neither Gitea nor
Jenkins was intentionally broken. A controller restart was an operational
persistence test, not the failure exercise.
\section{Credentials and Build Boundary}
The Gitea token is in Jenkins credentials under
\texttt{gitea-jenkins-ci-token}; the agent SSH key is a SYSTEM credential
\texttt{python-agent-ssh}. Values are excluded from this manual and source
control. The host's protected secrets directory retains bootstrap/operator
material outside the repository; temporary controller bootstrap files were
removed after import. Restrict that directory to administrators and review
retention when rotating credentials.
The controller has zero executors and its inbound agent TCP listener is
disabled. The agent has one exclusive \texttt{python} executor and a pinned
SSH host key. Neither CI container mounts the Docker socket or the host's
administrative SSH key. The Jenkinsfile can execute arbitrary commands:
pricing-app writers, including the explicitly approved integration identity,
must be trusted. Do not give untrusted contributions credentials; fork PR
discovery is disabled. Separate containers reduce exposure but do not make
malicious trusted pipeline code safe.
The operator's plugin check compares the recorded installed versions with
Jenkins' official update-center metadata, refreshed through Check now on October 23. The evidence records the
check time and any version differences; this is a check, not an automatic
upgrade. Review advisories, compatibility, and available capacity before
updating. The check found Pipeline API 1413.v2ff1a\_5e720fa\_ installed and 1429.v7a\_1b\_efb\_a\_f7c5 available; installation was deferred for compatibility review. Retain the known-good image and plugin record for rollback.
\begin{enumerate}
\item Failed webhook: inspect its delivery status/body and event type in Gitea;
check the allowed destination \texttt{jenkins}, Docker DNS/network, container
state, and Jenkins webhook logs. Correlate the delivery with its SHA and run.
Do not publish 8080 as a shortcut.
\item Checkout failure: verify the integration account still has pricing-app
access, token scope and Jenkins credential ID, and agent reachability to
\texttt{gitea:3000}. Do not print tokens while testing.
\item Test failure: identify the failing stage and assertion, fix code on the
same feature branch, and push. Confirm the new run/status matches the new SHA.
\item Offline agent or memory pressure: check the private SSH host key,
credential, node log, container limits, disk space, and concurrent TeX builds.
Do not disable host-key verification or grant Docker privileges.
\item Restart: from \path{/home/ubuntu/jenkins-deploy}, run
\texttt{docker compose restart} for the \texttt{jenkins} and \texttt{python-agent} services; verify login, agent
online state, job history, and a new check. Never remove named volumes as
routine troubleshooting.
\end{enumerate}
\section{Manual Quality and Controls}
This revision records the implementation narrative, actual deployment
diagram, links to configuration and matching runs, dated failed/passing check
screenshots, and the known limits above. The Hosts and Passwords CI entries,
history, glossary/index, and citations support the chapter. The existing AI-use
log records the original drafting work. Version 1.11 remains a review draft
until the normal merge and issue closure are recorded.
The original chapters remain part of the existing manual.
The service owner is the existing Lightsail administrator. No new cloud
instance or paid plan was purchased; actual billing remains in the owner's
account and was not audited here. Cleanup after the course requires an owner
decision: preserve/export required evidence and configuration before removing
the CI service. Do not delete Gitea data or Jenkins volumes as part of this
review. Password hints identify storage and purpose only.
Remaining finalization items are merge and issue-closure evidence,
verification of the instructor's own approved private access path, and a
decision on the inherited unrestricted SSH exposure and administrator merge
override. These remain open; green CI and peer approval do not complete them.

View File

@ -59,3 +59,14 @@ Gitea push identity & Existing project account max; authenticate only to git.590
Runner registration & Existing runner-data volume, .runner registration file; restrict to administrators; never commit or publish.\\ Runner registration & Existing runner-data volume, .runner registration file; restrict to administrators; never commit or publish.\\
Actions checkout & Job authentication supplied by Gitea; checkout disables credential persistence. No custom workflow secret required.\\ Actions checkout & Job authentication supplied by Gitea; checkout disables credential persistence. No custom workflow secret required.\\
\end{longtable} \end{longtable}
\section{Chapter 4 CI Credential Boundaries}
\begin{longtable}{p{0.27\textwidth}p{0.63\textwidth}}
\textbf{Account / credential} & \textbf{Scope and non-secret storage hint}\\\hline
Jenkins \texttt{max} & Named administrator; user created the secret privately. Signup disabled. Current authenticated-user authorization grants full control; review before adding users.\\
Gitea \texttt{jenkins-ci} & Restricted non-admin integration identity; write collaborator on pricing-app only. Token scopes read:user and write:repository; no repository-administration scope.\\
{\small\path{gitea-jenkins-ci-token}} & Jenkins credential ID for source checkout/API status reporting. Protected host secrets directory is outside Git; never include its values in reports or logs.\\
\path{python-agent-ssh} & SYSTEM credential for Jenkins-to-agent SSH only; host key pinned. Not the owner's Lightsail administration key.\\
Operator SSH key & Each operator needs their own approved Lightsail access for the private browser tunnel. Do not share the owner's private key or embed it in CI containers.\\
\end{longtable}
These rows record actual CI account purposes and storage references, not secret values.

View File

@ -109,3 +109,12 @@
howpublished = {\url{https://caddyserver.com/docs/caddyfile/options}}, howpublished = {\url{https://caddyserver.com/docs/caddyfile/options}},
note = {Use the documented Let's Encrypt staging ACME directory for testing; accessed October 8, 2026} note = {Use the documented Let's Encrypt staging ACME directory for testing; accessed October 8, 2026}
} }
@misc{caddy-ci-autohttps,
author={{Caddy Project}}, title={Automatic HTTPS},
howpublished={\url{https://caddyserver.com/docs/automatic-https}},
note={Accessed October 23, 2026}}
@misc{jenkins-ci-isolation,
author={{Jenkins Project}}, title={Controller Isolation},
howpublished={\url{https://www.jenkins.io/doc/book/security/controller-isolation/}},
note={Accessed October 23, 2026}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB