diff --git a/ci/manual/README.md b/ci/manual/README.md index c56c038..52a320f 100644 --- a/ci/manual/README.md +++ b/ci/manual/README.md @@ -24,8 +24,9 @@ Verified on October 7, 2026: - TeX Live 2022/Debian, latexmk 4.79, Node.js 22.23.3, Git 2.39.5. - Full document compiled locally; intentional LaTeX failure and repair passed, stale PDF/checksum were removed on failure, and a mismatched SHA was rejected. -- Runner 2.3.0 parsed and listed the push workflow successfully. Checkout and - artifact upload/download have not yet been demonstrated in a Gitea run. +- Runner 2.3.0 parsed and listed the push workflow successfully. Gitea run 1 subsequently + verified checkout, compilation, both artifact uploads, and the downloaded + PDF/checksum for commit `828f6c5`. ## Workflow @@ -46,8 +47,8 @@ Compilation runs in a disposable source copy under `build/manual/intermediate` so the installed minted version finds its temporary files in the current directory. The source checkout remains unchanged by metadata generation. Checkout and upload actions are pinned to full commits. The artifact action -uses the v3-node20 legacy protocol for Gitea; actual upload and download still -need a real Gitea run to establish compatibility. +uses the v3-node20 legacy protocol for Gitea; upload and download compatibility was + demonstrated by successful Gitea run 1 on October 7, 2026. ## Local compiler check diff --git a/manual/README.md b/manual/README.md index 633f867..b861516 100644 --- a/manual/README.md +++ b/manual/README.md @@ -17,10 +17,15 @@ is copied. Hints-only Hosts/Passwords records are retained. ## Build and status See [compiler and workflow instructions](../ci/manual/README.md). -Local compiler tests do not prove a Gitea Actions run. The workflow and its -downloadable artifacts still require validation after an authorized push. -The Automated Manual Build chapter and its real run evidence will be added -after those runs, including two source changes and a failure/repair exercise. +Gitea run 1 succeeded for commit `828f6c5` (issue #12), including checkout, +compilation, PDF upload, and diagnostics upload. The downloaded PDF was +verified against its ZIP and recorded checksum. It retains the original +Assignment 4 title and version `3.1+build.1.828f6c5` as initial-run evidence. -The human document version remains 3.1 during preparation. Actions appends its -actual run number and triggering short commit without committing metadata back. \ No newline at end of file +The current source now uses the Assignment 5 title and human version 3.2. +Its next push should demonstrate the second source-change build. The controlled +failure/repair exercise, runner Hosts/Passwords records, and final submission +PDF remain pending. Actions appends the actual run number and triggering short +commit without committing metadata back. +The draft Automated Manual Build chapter includes the run-1 workflow and opened +PDF screenshots, with remaining verification explicitly marked pending. diff --git a/manual/latex/devopsAIPromptLog.tex b/manual/latex/devopsAIPromptLog.tex index c21dd09..ac8e133 100644 --- a/manual/latex/devopsAIPromptLog.tex +++ b/manual/latex/devopsAIPromptLog.tex @@ -420,3 +420,33 @@ runner now mounts configuration from the permanent Gitea clone and declared successfully again; its registration volume and compiler image were reused. The older preparation checkout is retained until the work is safely committed. No commit, push, or real Actions run was performed during this transfer. + +\section{Assignment 5 Title and First Run} +Date: October 7, 2026; Tool: OpenAI Codex; Task: correct the assignment title +following the first successful Gitea build. Inputs: the student's title +``LaTeX Auto-Compilation with Gitea -- Group (2)'', the explanation that +``(2)'' identifies a corrected group-assignment listing, the saved workflow +screenshot, and downloaded run-1 artifacts. Output used: Assignment 5 title +without the duplicate-listing suffix, document version 3.2, current document +date, and this history record. The document remains a draft while the new +assignment chapter and remaining verification exercises are pending. + +The student committed and pushed \texttt{828f6c5}, referencing issue \#12; +Gitea run 1 completed checkout, compilation, PDF upload, and diagnostics +upload successfully. The agent verified that the downloaded PDF matches +both its artifact ZIP and recorded SHA-256, and that its title reads +\texttt{Version 3.1+build.1.828f6c5}. That first PDF still displays the +Assignment 4 title and is retained unchanged as initial-run evidence. +Human review and corrections: the student asked to capture the initial PDF +before correcting the title and supplied the exact Assignment 5 name. +The next source-change run, controlled failure/repair, final assignment +chapter, and final workflow-generated submission remain pending. No commit +or push of this title correction was performed by the agent. +Evidence follow-up: the student saved +\texttt{gitea-runner-pdf-first-run.png} and asked to include it. Codex added +that original screenshot and \texttt{gitea-actions-workflow-verification.png} +to the draft Automated Manual Build chapter, organized under the eight +rubric sections. The chapter records verified runner configuration, run-1 +metadata and artifact checks, and pending second-run, controlled workflow +failure/repair, runner Hosts/Passwords records, and final submission work. +Historical evidence was preserved; no commit or push was performed. diff --git a/manual/latex/devopsAssignment.tex b/manual/latex/devopsAssignment.tex index 5c7e864..ce9fc70 100644 --- a/manual/latex/devopsAssignment.tex +++ b/manual/latex/devopsAssignment.tex @@ -34,15 +34,15 @@ \definecolor{devopsLightBlue}{RGB}{232,240,247} % Replace these values for each assignment. -\newcommand{\AssignmentTitle}{Domain Names, SSL, and Versioning -- Group} -\newcommand{\AssignmentNumber}{4} -\newcommand{\DocumentVersion}{3.1} +\newcommand{\AssignmentTitle}{LaTeX Auto-Compilation with Gitea -- Group} +\newcommand{\AssignmentNumber}{5} +\newcommand{\DocumentVersion}{3.2} \newcommand{\DocumentStatus}{Draft} \newcommand{\CourseNumber}{SSW 590} \newcommand{\CourseName}{DevOps} \newcommand{\Authors}{Vincent Sun and Billy Ye} \newcommand{\Organization}{Stevens Institute of Technology} -\newcommand{\DocumentDate}{9/29/2026} +\newcommand{\DocumentDate}{10/7/2026} \newcommand{\DueDate}{Wednesday by 11:59pm} % CI writes this ignored file in its checkout; ordinary local builds stay unchanged. \providecommand{\CIBuildSuffix}{} @@ -145,6 +145,7 @@ \include{devopsLaTeXDocker} \include{devopsProjectProposal} \include{devopsGitea} +\include{devopsAutomatedManualBuild} \include{devopsHostsPasswords} % Restore when a chapter cites devopsReferences.bib. diff --git a/manual/latex/devopsAutomatedManualBuild.tex b/manual/latex/devopsAutomatedManualBuild.tex new file mode 100644 index 0000000..22081d4 --- /dev/null +++ b/manual/latex/devopsAutomatedManualBuild.tex @@ -0,0 +1,164 @@ +\chapter{Automated Manual Build} +\ChapterLabel{AutomatedManualBuild} +\index{Gitea!Actions} +\index{LaTeX!automated compilation} +\index{runner!local Docker runner} + +This chapter records Assignment 5, \emph{LaTeX Auto-Compilation with +Gitea -- Group}. Evidence was collected on October 7, 2026. The first +Gitea workflow succeeded; the second source-change run and the controlled +workflow failure/repair exercise are still pending. + +\section{Source and Trigger} +The existing \href{https://git.yebilly.me/ssw590-group1/vpn-dns-gateway}{Group 1 +Gitea repository} contains the manual under \texttt{manual/latex/}, the +compiler configuration under \texttt{ci/manual/}, and the workflow at +\texttt{.gitea/workflows/manual.yml}. Required figures, the document class, +glossary, bibliography resources, and build helper are included. The existing +application deployment remains under \texttt{deploy/}. + +Actions is enabled. A push to \texttt{main} or a branch matching +\texttt{codex/assignment5-*} starts the \texttt{manual} job. Vincent pushed +commit \texttt{828f6c5} on \texttt{codex/assignment5-manual-build}, referencing +\href{https://git.yebilly.me/ssw590-group1/vpn-dns-gateway/issues/12}{issue +\#12}. Checkout uses the triggering revision, and the build verifies that the +checked-out SHA equals that revision. Results are available on the +\href{https://git.yebilly.me/ssw590-group1/vpn-dns-gateway/actions}{repository +Actions page}. + +\section{Runner Setup} +The repository-scoped runner \texttt{ssw590-vince-local}, version 2.3.0, +runs as Docker container \texttt{ssw590-local-runner} on Vincent's Windows +laptop using Docker Desktop's Linux engine. Its \texttt{latex-local} label +selects the local compiler image \texttt{ssw590-manual-ci:20261007}. +Capacity is one job at a time. The runner uses outbound connections to Gitea +over HTTPS and to GitHub for the pinned Actions; it publishes no ports. +Compilation therefore runs on the laptop while Gitea remains on the droplet. + +Registration has already been completed privately. With Docker Desktop +running, these commands from the repository root start, inspect, and stop the +registered runner without registering it again: +\begin{minted}{powershell} +.\gitea\local-runner\runner.ps1 -Action Start +.\gitea\local-runner\runner.ps1 -Action Logs +.\gitea\local-runner\runner.ps1 -Action Stop +\end{minted} +Closing the log terminal does not stop the container. After a laptop or Docker +restart, start Docker Desktop and run \texttt{-Action Start}. Stopping the +runner preserves its registration volume. + +\section{Reproducible Compilation} +The versioned Dockerfile supplies TeX Live 2022/Debian, latexmk 4.79, +Pygments, Node.js 22.23.3, and Git 2.39.5. The base image is pinned by digest; +resolved Debian packages are recorded in the diagnostics. A later image +rebuild can resolve newer packages, so the tested local image is retained. +Its image ID is: +\begin{minted}{text} +sha256:5d24657a4578977fc7709165b82fc869f09a654a58ab4a0c8defd9d2cd662d5d +\end{minted} +The workflow invokes the versioned build entry point: +\begin{minted}{sh} +sh ci/manual/build.sh +\end{minted} +The script compiles a disposable source copy under +\texttt{build/manual/intermediate}. It generates build metadata there and +uses latexmk with shell escape for minted, glossary and acronym generation, index +processing, and the required final cross-reference passes. Earlier PDF and +checksum deliverables are removed before compilation. A compiler error or +missing/empty PDF causes failure; the PDF upload also fails if its expected +file is absent. Diagnostics are uploaded even after a compilation failure. + +\section{PDF Version Traceability} +The human document version is maintained in source. Actions appends the run +number and triggering short commit, producing versions such as +\texttt{3.1+build.1.828f6c5}. Generated metadata is not committed, so it does +not create a push loop. + +\begin{tabularx}{\linewidth}{L{3.2cm}Y} +\caption{Verified first successful build, October 7, 2026\label{Table:ManualRunOne}}\\ +\toprule \textbf{Record} & \textbf{Observed value}\\ \midrule +Source commit & \texttt{828f6c555b0d3a9bcf611a5097207e3942dfda11}\\ +Workflow run & 1, successful\\ +Visible PDF version & \texttt{3.1+build.1.828f6c5}\\ +PDF artifact & \texttt{manual-pdf-build-1}\\ +Diagnostics artifact & \texttt{manual-diagnostics-build-1}\\ +Downloaded PDF & \texttt{2026F-SSW-590-DevOps-Group-1.pdf}, 100 pages\\ +\bottomrule +\end{tabularx} + +The first PDF still displays the Assignment 4 title because that title was in +the triggering source. Figure~\ref{Figure:ManualFirstPDF} preserves that +original result. The current source corrects the title to Assignment 5 and +sets human version 3.2; its next workflow run must supply its own new run +number and commit suffix. + +\section{Downloadable Artifact} +Figure~\ref{Figure:ManualWorkflowRunOne} shows successful checkout, +compilation, and both artifact uploads. The workflow requests 14-day artifact +retention, subject to server policy. Vincent downloaded the PDF and +diagnostics ZIPs and saved them under \texttt{build/evidence/run-1/}. +The extracted PDF matches the PDF inside its artifact ZIP and the SHA-256 +recorded in the diagnostics: +\begin{minted}{text} +9468fa2803611a09f8f832a5631489413e9ab29254d0ae77e53d43fecd9463f0 +\end{minted} +These original downloads are retained locally and ignored by Git. A final +submission PDF must be downloaded from a successful workflow after the +remaining assignment work is recorded. + +\begin{figure}[H] +\centering +\includegraphics[width=\linewidth]{images/gitea-actions-workflow-verification.png} +\caption{October 7, 2026: Gitea run 1 completed successfully and lists the +PDF and diagnostics artifacts. Screenshot supplied by Vincent.} +\label{Figure:ManualWorkflowRunOne} +\end{figure} + +\begin{figure}[p] +\centering +\includegraphics[width=0.72\linewidth,height=0.72\textheight,keepaspectratio]{images/gitea-runner-pdf-first-run.png} +\caption{October 7, 2026: opened PDF from the first successful workflow, +showing version \texttt{3.1+build.1.828f6c5}. Its Assignment 4 title is +preserved as historical run-1 evidence. Screenshot supplied by Vincent.} +\label{Figure:ManualFirstPDF} +\end{figure} +\clearpage + +\section{Change, Failure, and Repair Evidence} +\textbf{Verified:} the initial source push produced run 1 and the downloadable, +traceable PDF above. Local container checks also demonstrated that an +intentional LaTeX error fails, removes a stale deliverable, and compiles after +repair; a mismatched triggering SHA was rejected. These local checks do not +establish the required Gitea workflow failure/repair evidence. + +\textbf{Pending:} push the updated title and this chapter as a second source +change, then record its commit, successful run, artifact, and opened PDF. +On the covered assignment branch, introduce a temporary LaTeX error, capture +the failed workflow and compiler message, repair it, and capture the successful +workflow and PDF. Keep the application deployment unchanged during this test. + +For a queued job, check that Docker Desktop and the runner are running and +that the workflow's label matches \texttt{latex-local}. For compilation +failure, inspect the failed step and \texttt{compile-console.txt} in the +diagnostics artifact, correct the reported source error, and push the repair. + +\section{Runner and Secret Boundary} +\index{runner!secret boundary} +Only trusted group members should edit branches that trigger this runner. +Workflow code and minted shell escape execute code on the build environment. +The runner can control Docker Desktop through its Docker socket, which gives +it substantial authority over the laptop. Job containers are not privileged; +the configuration disables automatic mounting of that socket into jobs. +Registration state stays in the named Docker volume +\texttt{ssw590-local-runner-data}, outside Git. No registration token or runner +identity contents appear in this chapter or its screenshots. The workflow +requests read access to repository contents and needs no cloud account secret. + +\section{Manual Quality and Controls} +This draft records the corrected title, human version 3.2, first-run evidence, +and assistance in Document History and \ChapterRef{AIPromptLog}. Earlier +assignment chapters retain their historical results. The existing Hosts and +Passwords tables in \ChapterRef{HostsPasswords} are unchanged in this update; +the local runner host and a hints-only registration-state record still need +to be added before final submission. Remaining workflow evidence and final +artifact review are pending, so this chapter does not claim full completion. diff --git a/manual/latex/devopsDocumentHistory.tex b/manual/latex/devopsDocumentHistory.tex index 93c72dc..905c2ca 100644 --- a/manual/latex/devopsDocumentHistory.tex +++ b/manual/latex/devopsDocumentHistory.tex @@ -12,6 +12,7 @@ link each entry to the changed chapter, table, figure, or controlled artifact. \multicolumn{4}{l}{\small\itshape Document Update History (continued)}\\ \toprule \textbf{Date / Version} & \textbf{Author Initials} & \textbf{Change} & \textbf{Changed At}\\ \midrule \endhead \bottomrule \endlastfoot +October 7, 2026 / 3.2 & VS, Codex & Set the Assignment 5 title, number, and date after successful Gitea run 1; retained its original PDF and evidence. The new title omits the duplicate LMS suffix. Added the draft Automated Manual Build chapter with the workflow and first-PDF screenshots. Hosts and Passwords tables are unchanged; remaining workflow tests and runner records are pending. & Title page, \ChapterRef{AutomatedManualBuild}, \ChapterRef{AIPromptLog}\\ October 7, 2026 / preparation & VS, Codex & Prepared the Assignment 5 local runner, compiler image, and push workflow; verified local compilation, failure/repair, and revision checks. Corrected Windows glossary/index regeneration after layout settles. Real workflow artifacts and the assignment chapter remain pending. Document version, Hosts table, and Passwords table are unchanged. & \ChapterRef{AIPromptLog}\\ September 29, 2026 / 3.1 & BY, Claude & Restored the Assignment 3 Color Buttons site at \texttt{colors.yebilly.me} behind the same Caddy proxy (no published port, 96\,MiB memory cap, graceful reload without restarting Gitea); versioned the change through reviewed PR~\#11 (closes issue~\#10); updated the Caddyfile excerpt and verification note, and \textbf{updated the Hosts table} with the new hostname, URL, and private service. The Passwords table is unchanged. & \ChapterRef{GiteaFoundation}, \ChapterRef{HostsPasswords}\\ September 28, 2026 / 3.0 & BY, VS, Claude & Assignment 4: deployed pinned Gitea 1.27.3 with SQLite behind Caddy and Let's Encrypt at \texttt{git.yebilly.me} (Student Pack domain), applied the \texttt{gitea-fw} Cloud Firewall, and recorded DNS, persistence, certificate-renewal, external-exposure, and issue-to-merge evidence; \textbf{created the Hosts table and the Passwords (hints-only) table}; added TLS, SSH, and ACME glossary terms and set the Assignment 4 title page. & \ChapterRef{GiteaFoundation}, \ChapterRef{HostsPasswords}, \ChapterRef{AIPromptLog}\\ diff --git a/manual/latex/images/gitea-actions-workflow-verification.png b/manual/latex/images/gitea-actions-workflow-verification.png new file mode 100644 index 0000000..85d84e5 Binary files /dev/null and b/manual/latex/images/gitea-actions-workflow-verification.png differ diff --git a/manual/latex/images/gitea-runner-pdf-first-run.png b/manual/latex/images/gitea-runner-pdf-first-run.png new file mode 100644 index 0000000..b84d25c Binary files /dev/null and b/manual/latex/images/gitea-runner-pdf-first-run.png differ