Add automated LaTeX manual build workflow
Build DevOps IT Manual / Compile LaTeX PDF (push) Failing after 0s

This commit is contained in:
2026-10-09 17:19:44 -04:00
parent 8162113127
commit d1a62286bf
6 changed files with 490 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
\chapter{Operational Registers}\label{ch:registers}
\section{Hosts Table}
\begin{longtable}{p{.24\linewidth}p{.23\linewidth}p{.28\linewidth}p{.16\linewidth}}\toprule Host or service & Role & Exposure & Owner\\\midrule
\url{git.nageshwaran.dev} & Public Gitea endpoint & HTTPS 443; HTTP 80 redirects & NM\\
DigitalOcean Droplet & Ubuntu 24.04 Docker host; IPv4 143.244.173.110 & SSH 22 restricted to approved IPv4 /32 & NM\\
Gitea container & Repository and Actions service & Private container port 3000 & NM\\
Caddy container & TLS proxy & Public TCP 80/443 & NM\\
Gitea Actions runner & Pending installation & No public management port planned & Team\\\bottomrule\end{longtable}
\section{Passwords Table (hints only)}
\begin{longtable}{p{.25\linewidth}p{.20\linewidth}p{.46\linewidth}}\toprule Service & Owner & Secret-handling hint\\\midrule
Droplet SSH & NM & Key-based login; private key remains on owner device.\\
Gitea accounts & NM / SP & Individual credentials held outside the repository.\\
Caddy ACME & NM & Account material persists in restricted Caddy data directory.\\
Runner registration & Team & Token must be kept outside repository, logs, and PDF; location to document after setup.\\\bottomrule\end{longtable}
\noindent\textbf{Controls:} The runner row is a planned addition, not evidence that a runner has been registered.\index{secrets}
+17
View File
@@ -0,0 +1,17 @@
\chapter{Startup Foundation with Gitea}\label{ch:gitea}
\section{Student Pack Domain and DNS}
The team uses the domain \texttt{nageshwaran.dev} and subdomain \url{https://git.nageshwaran.dev}. A DNS A record maps the subdomain to \texttt{143.244.173.110}. The domain was obtained through a GitHub Student Developer Pack offer at Name.com. Registration and renewal terms should be rechecked against the registrar account before final submission.
\section{Pinned Gitea Deployment}
The Ubuntu 24.04 Droplet uses Docker Compose. Gitea runs with \texttt{docker.gitea.com/gitea:1.27.3-rootless}; Caddy uses \texttt{caddy:2.10.2-alpine}. Gitea's port 3000 is not published on the host. Caddy publishes TCP 80/443 and proxies to \texttt{gitea:3000} on the private Docker network.
\section{Database and Persistence}
The deployed Gitea instance uses SQLite. Host bind mounts preserve repository and application data across container recreation. The previously documented test confirmed that the \texttt{persistence-test} repository directory survived replacement; separate issue persistence verification remains outstanding.
\section{HTTPS and Certificate Renewal}
Caddy terminates HTTPS and redirects HTTP requests to HTTPS. Earlier evidence recorded an HTTP 308 redirect, HTTPS 200 response, and a Let's Encrypt certificate issued September 30, 2026, expiring December 29, 2026. Automatic renewal scheduling was observed; an actual renewal or dry-run test was not recorded.\index{HTTPS}
\section{Firewall and External Exposure}
The DigitalOcean Cloud Firewall allows public HTTP/HTTPS and restricts SSH to an approved IPv4 source. External testing previously showed port 3000 unreachable. The approved SSH source address may change and must be maintained in the Cloud Firewall.
\section{Startup Team Workflow}
The organization \texttt{SSW590-Startup} has repository \texttt{startup-product} and two members. Five issues were created; pull requests \#6 and \#7 were peer reviewed and merged. The repository is at \url{https://git.nageshwaran.dev/SSW590-Startup/startup-product}.
\section{Architecture and Operation}
\begin{center}\fbox{\begin{minipage}{.83\linewidth}\centering Git clients (HTTPS 443) $\longrightarrow$ Caddy TLS proxy $\longrightarrow$ Gitea (private 3000)\\[.5em]Gitea $\longrightarrow$ persistent SQLite and Git repositories\\[.5em]Gitea Actions $\longleftrightarrow$ external runner (planned)\end{minipage}}\end{center}
\section{Manual Quality and Controls}
The current chapter summarizes the existing Version 1.2 manual. The full evidence screenshots remain in the previously submitted manual PDF; they have not been silently recreated in this source project. Before final submission, insert dated, labeled evidence figures and confirm the deployed public root URL configuration.\index{Gitea}
+33
View File
@@ -0,0 +1,33 @@
\chapter{Automated LaTeX Manual Builds with Gitea Actions}\label{ch:actions}
\noindent\textbf{Evidence status:} This chapter is an implementation plan and reporting scaffold. No runner registration, successful Actions build, artifact, or failure-and-repair demonstration is claimed until the relevant logs and screenshots are captured.
\section{Source and Trigger}
The source-of-truth repository is \url{https://git.nageshwaran.dev/SSW590-Startup/startup-product}. Main document: \texttt{manual/main.tex}. Planned workflow path: \texttt{.gitea/workflows/manual-build.yml}; selected branch: \texttt{main}. Team members push over HTTPS on TCP 443 to Caddy, which forwards to Gitea on private port 3000. The runner polls or requests work outbound and requires no public submission port.
\textbf{Evidence to add:} commit page, source links, workflow link, and triggered run URL.
\section{Runner Setup}
A separately managed runner on the team's Mac is proposed because the Gitea Droplet has 458 MiB physical memory, with approximately 213 MiB available at the last check. Record the actual runner version, registration scope, label, execution mode, available capacity, and network reachability once installed. Containerized jobs are preferable to installing TeX inside Gitea.
\textbf{Evidence to add:} online runner screenshot, runner label and version, assigned job log, and resource check. Never show registration tokens.
\section{Reproducible Compilation}
The project compiles with \texttt{latexmk -pdf -interaction=nonstopmode -halt-on-error -file-line-error main.tex} from the \texttt{manual/} directory. The expected PDF is \texttt{manual/main.pdf}. The Actions job must pin and document its TeX Live image or toolchain version, check out the triggering revision, and exit nonzero on TeX errors or a missing PDF. The compiler runs in the runner's job environment, not the Gitea application container. Source checkout and artifact upload occur through Gitea Actions over HTTPS; no shared Gitea filesystem is assumed.
\textbf{Evidence to add:} pinned image reference, compile log, and PDF existence check.
\section{PDF Version Traceability}
The human-maintained version is \texttt{\ManualVersion}. Build metadata is injected into a generated, uncommitted \texttt{build\_metadata.tex} file before compilation. The current PDF displays:\par\medskip
\noindent\textbf{Build identifier:} \BuildIdentifier\\
\textbf{Triggering commit:} \BuildCommit\\
\textbf{Workflow run number:} \BuildRun\par\medskip
The workflow must use the triggering commit's short hash and Gitea's run number. Generated metadata must never be pushed to the triggering branch, preventing an automatic build loop.
\textbf{Evidence to add:} PDF title page and matching run/commit URLs.
\section{Downloadable Artifact}
A successful workflow must upload the compiled PDF as a named Actions artifact. The job must fail if the file is missing. The team should download the artifact from the corresponding Gitea Actions run, open the PDF, and document the observed artifact retention setting. Artifacts are not permanent backups.
\textbf{Evidence to add:} successful run URL, named artifact screenshot, downloaded PDF verification.
\section{Change, Failure, and Repair}
\begin{longtable}{p{.19\linewidth}p{.24\linewidth}p{.24\linewidth}p{.23\linewidth}}\toprule Test & Commit & Run / PDF build ID & Actual result\\\midrule
Successful push 1 & PENDING & PENDING & Not run\\
Successful push 2 & PENDING & PENDING & Not run\\
Controlled TeX failure & PENDING & PENDING & Not run\\
Repair push & PENDING & PENDING & Not run\\\bottomrule\end{longtable}
Introduce a deliberate LaTeX syntax error on a branch covered by the workflow; capture the failed run; repair the error and capture the next passing run. Do not change the deployed Gitea service for this test.
\section{Runner and Secret Boundary}
Only trusted maintainers should be able to edit the workflow because workflow changes can execute commands in the runner's job environment. Keep runner registration tokens and any repository secrets out of Git, logs, and PDFs. A Docker socket grants powerful host privileges; avoid mounting it into jobs without careful isolation and access control. Update the Hosts and Passwords tables using non-revealing hints only.
\section{Manual Quality and Controls}
This chapter follows the eight required rubric subsections. Before final submission, update the dated document history and runner entry in the Hosts and Passwords tables, include sanitized screenshots and clickable run links, and record any artifact retention policy.\par\medskip
\textbf{Troubleshooting:} (1) confirm Actions is enabled; (2) check the runner is online and its label matches \texttt{runs-on}; (3) verify the runner and job container can resolve the Gitea HTTPS URL; (4) inspect the first LaTeX error in the job log; (5) confirm \texttt{main.pdf} exists before upload; (6) repair the source and push a new commit.\index{runner}\index{artifact}