|
|
|
@@ -8,35 +8,35 @@
|
|
|
|
|
\section{Source and Trigger}
|
|
|
|
|
This chapter records the corrected Chapter 3 assignment from the Version 1.18 startup DevOps manual: the team manual must build automatically from source in Gitea Actions \cite{GiteaActionsQuickstart,GiteaActionsArtifacts,GiteaRunnerDocker,GiteaRunnerLabels,LatexmkCtan,TexLiveTug}. The older Chapter 3 manual treated Jenkins as the next assignment; in Version 1.18 Jenkins moved to Chapter 4, while Chapter 3 became the automated LaTeX manual-build assignment. The Jenkins work is preserved in \ChapterRef{Jenkins}; this chapter adds the missing Gitea Actions path.
|
|
|
|
|
|
|
|
|
|
\begin{devopsNote}[Evidence Summary]
|
|
|
|
|
The manual source was mirrored into the Gitea repository \texttt{group10-startup/devops-it-manual}, and Gitea Actions built the PDF with the registered runner \texttt{sergio-windows-latex-runner}. The evidence set includes successful main-branch builds, a controlled failed LaTeX build, and a repaired passing build. The runner uses a Windows host label because the existing \texttt{512 MB} Droplet did not have enough practical disk and memory headroom for a full TeX Live job-container image.
|
|
|
|
|
\begin{devopsNote}[Current Evidence Boundary]
|
|
|
|
|
The non-secret workflow, build metadata hook, runner notes, and manual documentation were added on October 12, 2026. Gitea itself is reachable over HTTPS and the public API reports that Actions are enabled for \texttt{group10-startup/startup-product}. Live runner registration, workflow execution, artifact download, and failed-then-repaired run evidence remain pending because SSH to the Droplet timed out from the operator workstation and no Gitea administrator token was available in the local environment. Those gaps are recorded in Table~\ref{Table:GiteaActionsRemainingWork} instead of being marked complete.
|
|
|
|
|
\end{devopsNote}
|
|
|
|
|
|
|
|
|
|
\begin{longtable}{L{4.1cm}L{9.1cm}}
|
|
|
|
|
\caption{Source and Trigger Configuration\label{Table:GiteaActionsSource}}\\
|
|
|
|
|
\toprule
|
|
|
|
|
\textbf{Item} & \textbf{Configured or Verified Value}\\
|
|
|
|
|
\textbf{Item} & \textbf{Configured or Required Value}\\
|
|
|
|
|
\midrule
|
|
|
|
|
\endfirsthead
|
|
|
|
|
\toprule
|
|
|
|
|
\textbf{Item} & \textbf{Configured or Verified Value}\\
|
|
|
|
|
\textbf{Item} & \textbf{Configured or Required Value}\\
|
|
|
|
|
\midrule
|
|
|
|
|
\endhead
|
|
|
|
|
\bottomrule
|
|
|
|
|
\endlastfoot
|
|
|
|
|
Manual repository source & \url{https://git.sespinal590.dev/group10-startup/devops-it-manual}.\\
|
|
|
|
|
Manual repository source & The complete LaTeX manual source currently lives in the team repository and must be mirrored or pushed to the team Gitea repository before final evidence collection.\\
|
|
|
|
|
Main file & \texttt{devopsAssignment.tex}.\\
|
|
|
|
|
Workflow file & \texttt{.gitea/workflows/manual-pdf.yml}.\\
|
|
|
|
|
Selected branch and event & Pushes to \texttt{main} and \texttt{chapter3-failure-test}; manual dispatch is also allowed for controlled reruns.\\
|
|
|
|
|
Git submission path & HTTPS Git push to \texttt{https://git.sespinal590.dev/group10-startup/devops-it-manual.git}. The browser and Git client reach Caddy on TCP \texttt{443}, and Caddy forwards private traffic to Gitea on container port \texttt{3000}.\\
|
|
|
|
|
Runner public exposure & No runner submission port is exposed. The runner requests work from Gitea over HTTPS and does not publish Docker, runner management, or build-agent ports to the internet.\\
|
|
|
|
|
Selected branch and event & Pushes to \texttt{main}; manual dispatch is also allowed for controlled reruns.\\
|
|
|
|
|
Git submission path & Team workstation uses HTTPS Git push to \texttt{https://git.sespinal590.dev/...}; the browser and Git client reach Caddy on TCP \texttt{443}, and Caddy forwards private traffic to Gitea on container port \texttt{3000}.\\
|
|
|
|
|
Runner public exposure & No runner submission port is required. The runner requests work from Gitea over HTTPS and should not publish a Docker daemon or runner management port to the internet.\\
|
|
|
|
|
\end{longtable}
|
|
|
|
|
|
|
|
|
|
\section{Runner Setup}
|
|
|
|
|
The live runner is a self-managed Gitea Actions runner registered as \texttt{sergio-windows-latex-runner}. The runner advertises the label \texttt{windows-latex-host}. This was selected after testing the Droplet path: a small TeX image was insufficient for the manual build, and the full LaTeX image was not a good fit for the \texttt{512 MB} Gitea Droplet with about \texttt{1.7 GB} free disk at the time of setup.
|
|
|
|
|
The intended runner is a self-managed Gitea Actions runner using the label \texttt{latex-docker}. The preferred execution mode is Docker job containers so the LaTeX compiler runs in a temporary build environment rather than inside the Gitea application container. This follows the Chapter 3 guidance that Gitea stores source and Actions metadata, while a runner and job environment perform the compile.
|
|
|
|
|
|
|
|
|
|
\begin{longtable}{L{4.1cm}L{9.1cm}}
|
|
|
|
|
\caption{Runner Setup Evidence\label{Table:GiteaActionsRunner}}\\
|
|
|
|
|
\caption{Runner Setup Plan and Access Status\label{Table:GiteaActionsRunner}}\\
|
|
|
|
|
\toprule
|
|
|
|
|
\textbf{Item} & \textbf{Status or Value}\\
|
|
|
|
|
\midrule
|
|
|
|
@@ -47,23 +47,21 @@ The live runner is a self-managed Gitea Actions runner registered as \texttt{ser
|
|
|
|
|
\endhead
|
|
|
|
|
\bottomrule
|
|
|
|
|
\endlastfoot
|
|
|
|
|
Runner name & \texttt{sergio-windows-latex-runner}.\\
|
|
|
|
|
Runner label & \texttt{windows-latex-host}.\\
|
|
|
|
|
Execution mode & Host runner on Sergio's Windows workstation.\\
|
|
|
|
|
Toolchain & Local MiKTeX with \texttt{latexmk}, Git, Node.js, and Python/Pygments for \texttt{minted}.\\
|
|
|
|
|
Registration scope & Repository runner registered with a Gitea token generated for setup and kept outside the repository.\\
|
|
|
|
|
Rejected runner path & Docker execution on the Gitea Droplet was tested and rejected for this assignment because the Droplet was too constrained for a full TeX Live build image.\\
|
|
|
|
|
Live registration status & Complete. The runner accepted jobs for runs \texttt{3}, \texttt{4}, \texttt{6}, and \texttt{7}.\\
|
|
|
|
|
Runner label & \texttt{latex-docker}.\\
|
|
|
|
|
Execution mode & Docker job container selected by the workflow.\\
|
|
|
|
|
Runner location & Intended to run on the existing Gitea Droplet only if memory and disk remain acceptable; otherwise it should move to a separate runner host.\\
|
|
|
|
|
Droplet capacity concern & The existing Droplet is a \texttt{512 MB} instance. Jenkins already required swap, so a TeX build runner may be memory constrained.\\
|
|
|
|
|
Registration scope & Repository or organization scope should be used; the token must be created in Gitea and stored only on the runner host.\\
|
|
|
|
|
Live registration status & Pending. Public HTTPS checks succeeded, but SSH to \texttt{165.227.90.215:22} timed out on October 12, 2026.\\
|
|
|
|
|
\end{longtable}
|
|
|
|
|
|
|
|
|
|
\section{Reproducible Compilation}
|
|
|
|
|
The workflow checks out the triggering revision, writes generated build metadata, runs \texttt{latexmk}, and fails if \texttt{devopsAssignment.pdf} is missing or empty. The Windows host runner uses \texttt{cmd} steps so the generated Gitea action scripts are not blocked by local PowerShell execution policy.
|
|
|
|
|
The workflow records a pinned LaTeX toolchain image and a reproducible compile command. It checks out the triggering revision, writes a generated metadata file, runs \texttt{latexmk}, and fails if \texttt{devopsAssignment.pdf} is missing or empty.
|
|
|
|
|
|
|
|
|
|
\begin{lstlisting}[caption={Manual PDF workflow build command},label={Listing:GiteaActionsBuildCommand}]
|
|
|
|
|
latexmk -norc -pdf -shell-escape -interaction=nonstopmode ^
|
|
|
|
|
latexmk -norc -pdf -shell-escape -interaction=nonstopmode \
|
|
|
|
|
-halt-on-error devopsAssignment.tex
|
|
|
|
|
if not exist devopsAssignment.pdf exit /b 1
|
|
|
|
|
for %%A in (devopsAssignment.pdf) do if %%~zA EQU 0 exit /b 1
|
|
|
|
|
test -s devopsAssignment.pdf
|
|
|
|
|
\end{lstlisting}
|
|
|
|
|
|
|
|
|
|
\begin{longtable}{L{4.1cm}L{9.1cm}}
|
|
|
|
@@ -78,46 +76,27 @@ for %%A in (devopsAssignment.pdf) do if %%~zA EQU 0 exit /b 1
|
|
|
|
|
\endhead
|
|
|
|
|
\bottomrule
|
|
|
|
|
\endlastfoot
|
|
|
|
|
Runner selector & \texttt{runs-on: windows-latex-host}.\\
|
|
|
|
|
Toolchain image & \texttt{texlive/texlive:TL2026-historic} in the workflow job container.\\
|
|
|
|
|
Build command & \texttt{latexmk -norc -pdf -shell-escape -interaction=nonstopmode -halt-on-error devopsAssignment.tex}.\\
|
|
|
|
|
Main output & \texttt{devopsAssignment.pdf}.\\
|
|
|
|
|
Failure detection & The workflow uses \texttt{-halt-on-error}, then checks that \texttt{devopsAssignment.pdf} exists and has nonzero size.\\
|
|
|
|
|
Compiler location & The Windows runner host performs the compile; the Gitea application container only stores source, workflow state, and logs.\\
|
|
|
|
|
Failure detection & The workflow uses \texttt{-halt-on-error} and \texttt{test -s devopsAssignment.pdf}. A missing or empty PDF fails the job.\\
|
|
|
|
|
Compiler location & Temporary job container selected by the Gitea runner, not the Gitea application container.\\
|
|
|
|
|
\end{longtable}
|
|
|
|
|
|
|
|
|
|
\section{PDF Version Traceability}
|
|
|
|
|
The manual includes \texttt{devopsBuildMetadata.tex}. In local builds, that file defines safe fallback values. During Actions builds, the workflow overwrites it with the triggering commit hash, workflow run number, and run attempt. The footer displays the normal human version plus the generated build identifier.
|
|
|
|
|
The manual now includes \texttt{devopsBuildMetadata.tex}. In local builds, that file defines a safe fallback value. During Actions builds, the workflow overwrites it with the triggering commit hash, workflow run number, and run attempt. The footer displays the normal human version plus the generated build identifier.
|
|
|
|
|
|
|
|
|
|
\begin{lstlisting}[caption={Generated metadata written during Actions build},label={Listing:GiteaActionsMetadata}]
|
|
|
|
|
\providecommand{\BuildIdentifier}{local-unverified}
|
|
|
|
|
\renewcommand{\BuildIdentifier}{+build.<run-number>.<short-sha>}
|
|
|
|
|
\renewcommand{\SourceRevision}{<short-sha>}
|
|
|
|
|
\renewcommand{\WorkflowRunNumber}{<run-number>}
|
|
|
|
|
\renewcommand{\WorkflowRunAttempt}{<run-attempt>}
|
|
|
|
|
\renewcommand{\BuildIdentifier}{+build.${run_number}.${short_sha}}
|
|
|
|
|
\renewcommand{\SourceRevision}{${short_sha}}
|
|
|
|
|
\renewcommand{\WorkflowRunNumber}{${run_number}}
|
|
|
|
|
\renewcommand{\WorkflowRunAttempt}{${run_attempt}}
|
|
|
|
|
\end{lstlisting}
|
|
|
|
|
|
|
|
|
|
The workflow does not commit generated metadata back to the repository. That avoids a push/build loop while still making each downloaded PDF traceable to the commit and run that produced it.
|
|
|
|
|
|
|
|
|
|
\begin{longtable}{L{2.0cm}L{3.3cm}L{2.5cm}L{4.8cm}}
|
|
|
|
|
\caption{Observed Gitea Actions Build Evidence\label{Table:GiteaActionsRuns}}\\
|
|
|
|
|
\toprule
|
|
|
|
|
\textbf{Run} & \textbf{Branch} & \textbf{Conclusion} & \textbf{Evidence}\\
|
|
|
|
|
\midrule
|
|
|
|
|
\endfirsthead
|
|
|
|
|
\toprule
|
|
|
|
|
\textbf{Run} & \textbf{Branch} & \textbf{Conclusion} & \textbf{Evidence}\\
|
|
|
|
|
\midrule
|
|
|
|
|
\endhead
|
|
|
|
|
\bottomrule
|
|
|
|
|
\endlastfoot
|
|
|
|
|
\texttt{3} & \texttt{main} & Success & Commit \texttt{f15d65c}; PDF built as \texttt{devopsAssignment.pdf} with reported output size \texttt{1575428} bytes and artifact upload completed.\\
|
|
|
|
|
\texttt{4} & \texttt{main} & Success & Commit \texttt{ca620f9}; second main-branch source change built successfully.\\
|
|
|
|
|
\texttt{6} & \texttt{chapter3-failure-test} & Failure & Commit \texttt{2d879a8}; controlled source-level LaTeX failure confirmed the workflow fails broken manual source.\\
|
|
|
|
|
\texttt{7} & \texttt{chapter3-failure-test} & Success & Commit \texttt{6ca37f1}; repair commit removed the deliberate failure and rebuilt successfully.\\
|
|
|
|
|
\end{longtable}
|
|
|
|
|
The workflow does not commit generated metadata back to the repository. That avoids a push/build loop while still making the downloaded PDF traceable to the commit and run that produced it.
|
|
|
|
|
|
|
|
|
|
\section{Downloadable Artifact}
|
|
|
|
|
The workflow uploads the compiled manual as a named artifact from successful runs. The artifact name includes the run number and commit SHA so the downloaded PDF can be matched to the Gitea Actions page.
|
|
|
|
|
The workflow uploads the compiled manual as a named artifact from the successful run. The artifact name includes the run number and commit SHA so the downloaded PDF can be matched to the Gitea Actions page.
|
|
|
|
|
|
|
|
|
|
\begin{longtable}{L{4.1cm}L{9.1cm}}
|
|
|
|
|
\caption{PDF Artifact Configuration\label{Table:GiteaActionsArtifact}}\\
|
|
|
|
@@ -134,15 +113,14 @@ The workflow uploads the compiled manual as a named artifact from successful run
|
|
|
|
|
Artifact source path & \texttt{devopsAssignment.pdf}.\\
|
|
|
|
|
Artifact naming pattern & \texttt{devops-it-manual-<run-number>-<commit-sha>}.\\
|
|
|
|
|
Retention setting & \texttt{14} days in the workflow. This is an artifact retention setting, not a backup policy.\\
|
|
|
|
|
Verified upload evidence & Run \texttt{3} uploaded \texttt{devops-it-manual-3-f15d65cc7490253c310a80973d92b20b272598d1}; the log reported a successful upload and finalized compressed artifact of \texttt{1413101} bytes.\\
|
|
|
|
|
Download note & The artifact is downloaded from the Gitea Actions run page for the matching successful run. The API artifact-list endpoint did not return a separate list during verification, so the manual records the successful upload log as the primary evidence.\\
|
|
|
|
|
Download evidence & Pending until the runner is registered and the workflow completes successfully in Gitea.\\
|
|
|
|
|
\end{longtable}
|
|
|
|
|
|
|
|
|
|
\section{Change, Failure, and Repair Evidence}
|
|
|
|
|
The Chapter 3 workflow now has the required behavior pattern. Main branch runs \texttt{3} and \texttt{4} demonstrate repeatable successful manual builds after source changes. The branch \texttt{chapter3-failure-test} demonstrates failure and repair: run \texttt{6} failed after the source intentionally introduced \texttt{\textbackslash undefinedChapterThreeFailureTestCommand}, and run \texttt{7} passed after the repair commit removed that line. This proves the workflow is not only uploading a PDF when source is valid, but also stopping the pipeline when source is broken.
|
|
|
|
|
The final Chapter 3 evidence still needs three live Actions runs: two successful source changes and one safe failed compile followed by a repaired passing run. The safe failure should be made on a branch covered by the workflow, for example by temporarily introducing a harmless LaTeX syntax error in a draft branch, confirming the job fails, then repairing it and confirming the artifact builds.
|
|
|
|
|
|
|
|
|
|
\section{Runner and Secret Boundary}
|
|
|
|
|
Runner registration tokens, Gitea tokens, repository secrets, and SSH keys were kept outside the repository. Workflow edit rights should be limited to trusted team members because workflow code executes commands in the runner environment. The runner does not require any inbound firewall rule. The only temporary inbound change needed during this setup was SSH access for administration of the Droplet; after setup, SSH should be restricted again to the operator's current IP address.
|
|
|
|
|
Runner registration tokens, Gitea tokens, and any repository secrets must not be committed, printed in the PDF, or stored in workflow logs. Workflow edit rights should be limited to trusted team members because workflow code can execute commands in the runner environment. If Docker execution is used on the same Droplet as Gitea, the team must treat Docker socket access as privileged host access and avoid giving untrusted pull requests access to secrets or privileged labels.
|
|
|
|
|
|
|
|
|
|
\section{Manual Quality and Controls}
|
|
|
|
|
\begin{longtable}{L{4.4cm}L{2.0cm}L{6.8cm}}
|
|
|
|
@@ -157,16 +135,17 @@ Runner registration tokens, Gitea tokens, repository secrets, and SSH keys were
|
|
|
|
|
\endhead
|
|
|
|
|
\bottomrule
|
|
|
|
|
\endlastfoot
|
|
|
|
|
Versioned source and push-triggered workflow & Complete & Manual source is in \texttt{group10-startup/devops-it-manual}; workflow \texttt{manual-pdf.yml} triggers on covered branch pushes.\\
|
|
|
|
|
Registered runner and documented execution environment & Complete & Runner \texttt{sergio-windows-latex-runner} with label \texttt{windows-latex-host} completed live Gitea Actions jobs.\\
|
|
|
|
|
Reproducible LaTeX compilation and failure detection & Complete & The workflow runs \texttt{latexmk} with \texttt{-halt-on-error} and checks for a nonempty PDF. Run \texttt{6} confirmed failure detection.\\
|
|
|
|
|
Visible commit/run version traceability in the PDF & Complete & Actions builds rewrite \texttt{devopsBuildMetadata.tex} with run number, attempt, and commit hash for the PDF footer.\\
|
|
|
|
|
Downloadable, verified PDF artifact & Complete with note & Artifact upload completed in the successful run log. The Gitea API artifact listing did not expose a separate artifact list during verification.\\
|
|
|
|
|
Two builds plus controlled failure and repair & Complete & Runs \texttt{3} and \texttt{4} passed on \texttt{main}; run \texttt{6} failed intentionally; run \texttt{7} passed after repair.\\
|
|
|
|
|
Runner permissions and secret boundary & Complete & Tokens were kept outside source control; no runner management port is exposed publicly.\\
|
|
|
|
|
Versioned IT manual, history, tables, and evidence & Complete & Version, history, citations, glossary/index terms, workflow, tables, run evidence, and troubleshooting notes are included.\\
|
|
|
|
|
Versioned source and push-triggered workflow & Partial & Workflow file and build metadata hook were added. Source still needs to be pushed to the Gitea repository used for evidence.\\
|
|
|
|
|
Registered runner and documented execution environment & Pending & Runner plan and label are documented, but live registration requires Gitea admin or SSH access.\\
|
|
|
|
|
Reproducible LaTeX compilation and failure detection & Partial & Workflow command, image, and missing-PDF check are documented. Live run log is pending.\\
|
|
|
|
|
Visible commit/run version traceability in the PDF & Partial & Metadata mechanism is implemented. A real Actions-produced PDF with run number and commit hash is pending.\\
|
|
|
|
|
Downloadable, verified PDF artifact & Pending & Artifact upload is configured, but no live artifact is verified yet.\\
|
|
|
|
|
Two builds plus controlled failure and repair & Pending & Requires live runner execution.\\
|
|
|
|
|
Runner permissions and secret boundary & Partial & Secret and workflow-author risks are documented; live runner token storage remains pending.\\
|
|
|
|
|
Versioned IT manual, history, tables, and evidence & Partial & Version, history, citations, glossary/index terms, workflow, and troubleshooting notes were added; final live evidence remains pending.\\
|
|
|
|
|
\end{longtable}
|
|
|
|
|
|
|
|
|
|
\begin{devopsNote}[Troubleshooting Procedure]
|
|
|
|
|
If a Gitea Actions build does not start, check that Actions are enabled for the repository, the workflow file is under \texttt{.gitea/workflows/}, the push targets a covered branch, and the runner is online with the label \texttt{windows-latex-host}. If the build starts but fails, inspect the \texttt{latexmk} log, confirm \texttt{devopsBuildMetadata.tex} was generated, and verify that \texttt{devopsAssignment.pdf} exists before artifact upload.
|
|
|
|
|
\end{devopsNote}
|
|
|
|
|
If a Gitea Actions build does not start, check that Actions are enabled for the repository, the workflow file is under \texttt{.gitea/workflows/}, the push targets the selected branch, and the runner is online with the label \texttt{latex-docker}. If the build starts but fails, inspect the \texttt{latexmk} log, confirm \texttt{devopsBuildMetadata.tex} was generated, and verify that \texttt{devopsAssignment.pdf} exists before artifact upload.
|
|
|
|
|
\end{devopsNote}
|
|
|
|
|
|
|
|
|
|