Add Gitea Actions manual build chapter
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
# Gitea Actions workflow for the SSW 590 DevOps IT manual.
|
||||
# The runner label must match the registered self-managed Gitea runner.
|
||||
name: manual-pdf
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-manual:
|
||||
runs-on: latex-docker
|
||||
container:
|
||||
image: texlive/texlive:TL2026-historic
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Generate build metadata
|
||||
shell: bash
|
||||
run: |
|
||||
set -eu
|
||||
short_sha="${GITHUB_SHA:-unknown}"
|
||||
short_sha="${short_sha:0:7}"
|
||||
run_number="${GITHUB_RUN_NUMBER:-0}"
|
||||
run_attempt="${GITHUB_RUN_ATTEMPT:-1}"
|
||||
cat > devopsBuildMetadata.tex <<EOF
|
||||
\\renewcommand{\\BuildIdentifier}{+build.${run_number}.${short_sha}}
|
||||
\\renewcommand{\\SourceRevision}{${short_sha}}
|
||||
\\renewcommand{\\WorkflowRunNumber}{${run_number}}
|
||||
\\renewcommand{\\WorkflowRunAttempt}{${run_attempt}}
|
||||
EOF
|
||||
|
||||
- name: Compile manual
|
||||
shell: bash
|
||||
run: |
|
||||
set -eu
|
||||
latexmk -norc -pdf -shell-escape -interaction=nonstopmode -halt-on-error devopsAssignment.tex
|
||||
test -s devopsAssignment.pdf
|
||||
|
||||
- name: Upload compiled PDF
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: devops-it-manual-${{ github.run_number }}-${{ github.sha }}
|
||||
path: devopsAssignment.pdf
|
||||
retention-days: 14
|
||||
@@ -37,15 +37,16 @@
|
||||
% Replace these values for each assignment.
|
||||
\newcommand{\AssignmentTitle}{Group 10 DevOps Project}
|
||||
\newcommand{\AssignmentNumber}{}
|
||||
\newcommand{\DocumentVersion}{1.7}
|
||||
\newcommand{\DocumentVersion}{1.8}
|
||||
\newcommand{\DocumentStatus}{Active}
|
||||
\newcommand{\CourseNumber}{SSW 590}
|
||||
\newcommand{\CourseName}{DevOps}
|
||||
\newcommand{\Instructor}{Darian Muresan}
|
||||
\newcommand{\Organization}{Stevens Institute of Technology}
|
||||
\newcommand{\DocumentDate}{October 7, 2026}
|
||||
\newcommand{\DocumentDate}{October 12, 2026}
|
||||
\newcommand{\DueDate}{}
|
||||
\newcommand{\VERSION}{Version \DocumentVersion}
|
||||
\input{devopsBuildMetadata.tex}
|
||||
\newcommand{\GroupNumber}{10}
|
||||
\newcommand{\GroupMembers}{Turan Islamli, Sergio Espinal }
|
||||
|
||||
@@ -106,7 +107,7 @@
|
||||
\rhead{\small\thepage}
|
||||
\lfoot{\small\CourseNumber}
|
||||
\cfoot{\small\copyright\ \Organization}
|
||||
\rfoot{\small\VERSION}
|
||||
\rfoot{\small\VERSION\ \BuildIdentifier}
|
||||
\renewcommand{\headrulewidth}{0.4pt}
|
||||
\renewcommand{\footrulewidth}{0.4pt}
|
||||
|
||||
@@ -115,6 +116,7 @@
|
||||
\include{devopsLatexDocker}
|
||||
\include{devopsProjectProposal}
|
||||
\include{devopsGitea}
|
||||
\include{devopsGiteaActions}
|
||||
\include{devopsJenkins}
|
||||
\include{devopsActivityBrief}
|
||||
\include{devopsWorkflow}
|
||||
@@ -139,3 +141,4 @@
|
||||
\markboth{Index}{Index}
|
||||
\printindex
|
||||
\end{document}
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
\providecommand{\BuildIdentifier}{local-unverified}
|
||||
\providecommand{\SourceRevision}{local}
|
||||
\providecommand{\WorkflowRunNumber}{local}
|
||||
\providecommand{\WorkflowRunAttempt}{local}
|
||||
@@ -22,6 +22,19 @@ link each entry to the changed chapter, table, figure, or controlled artifact.
|
||||
\bottomrule
|
||||
\endlastfoot
|
||||
|
||||
October 12, 2026 / 1.8 & SE, CDX &
|
||||
Added the corrected Chapter 3 Gitea Actions manual-build chapter after comparing
|
||||
the Version 1.18 assignment manual with the earlier Version 1.12 Jenkins-only
|
||||
manual. Added the workflow file, build metadata hook, runner notes, artifact
|
||||
configuration, rubric-status table, and troubleshooting procedure while preserving
|
||||
the Jenkins chapter as the next assignment's Chapter 4 groundwork. Updated
|
||||
version metadata, citations, glossary/index terms, and recorded that Hosts and
|
||||
Passwords table updates are pending live runner registration because SSH and
|
||||
Gitea administrator access were unavailable during this pass. &
|
||||
\ChapterRef{GiteaActions}, \hyperref[Table:GiteaActionsSource]{source trigger},
|
||||
\hyperref[Table:GiteaActionsRunner]{runner setup},
|
||||
\hyperref[Table:GiteaActionsCompilation]{compilation},
|
||||
\hyperref[Table:GiteaActionsRemainingWork]{remaining work}\\
|
||||
October 7, 2026 / 1.7 & SE, CDX &
|
||||
Added the Chapter 3 Jenkins continuous-integration implementation report:
|
||||
recorded the Jenkins container deployment, HTTPS proxy hostname, blocked raw
|
||||
@@ -90,3 +103,4 @@ submission chapters. &
|
||||
\ChapterRef{AIAgentGuide}\\
|
||||
|
||||
\end{tabularx}
|
||||
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
\chapter{Automated LaTeX Manual Builds with Gitea Actions}
|
||||
\ChapterLabel{GiteaActions}
|
||||
\index{Gitea Actions}
|
||||
\index{LaTeX automation}
|
||||
\index{build artifact}
|
||||
\index{runner}
|
||||
|
||||
\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}[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 Required Value}\\
|
||||
\midrule
|
||||
\endfirsthead
|
||||
\toprule
|
||||
\textbf{Item} & \textbf{Configured or Required Value}\\
|
||||
\midrule
|
||||
\endhead
|
||||
\bottomrule
|
||||
\endlastfoot
|
||||
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}; 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 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 Plan and Access Status\label{Table:GiteaActionsRunner}}\\
|
||||
\toprule
|
||||
\textbf{Item} & \textbf{Status or Value}\\
|
||||
\midrule
|
||||
\endfirsthead
|
||||
\toprule
|
||||
\textbf{Item} & \textbf{Status or Value}\\
|
||||
\midrule
|
||||
\endhead
|
||||
\bottomrule
|
||||
\endlastfoot
|
||||
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 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 \
|
||||
-halt-on-error devopsAssignment.tex
|
||||
test -s devopsAssignment.pdf
|
||||
\end{lstlisting}
|
||||
|
||||
\begin{longtable}{L{4.1cm}L{9.1cm}}
|
||||
\caption{Reproducible Compilation Controls\label{Table:GiteaActionsCompilation}}\\
|
||||
\toprule
|
||||
\textbf{Control} & \textbf{Implementation}\\
|
||||
\midrule
|
||||
\endfirsthead
|
||||
\toprule
|
||||
\textbf{Control} & \textbf{Implementation}\\
|
||||
\midrule
|
||||
\endhead
|
||||
\bottomrule
|
||||
\endlastfoot
|
||||
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} 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 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}]
|
||||
\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 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 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}}\\
|
||||
\toprule
|
||||
\textbf{Item} & \textbf{Value}\\
|
||||
\midrule
|
||||
\endfirsthead
|
||||
\toprule
|
||||
\textbf{Item} & \textbf{Value}\\
|
||||
\midrule
|
||||
\endhead
|
||||
\bottomrule
|
||||
\endlastfoot
|
||||
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.\\
|
||||
Download evidence & Pending until the runner is registered and the workflow completes successfully in Gitea.\\
|
||||
\end{longtable}
|
||||
|
||||
\section{Change, Failure, and Repair Evidence}
|
||||
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, 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}}
|
||||
\caption{Chapter 3 Rubric Evidence Status\label{Table:GiteaActionsRemainingWork}}\\
|
||||
\toprule
|
||||
\textbf{Rubric Criterion} & \textbf{Status} & \textbf{Evidence or Gap}\\
|
||||
\midrule
|
||||
\endfirsthead
|
||||
\toprule
|
||||
\textbf{Rubric Criterion} & \textbf{Status} & \textbf{Evidence or Gap}\\
|
||||
\midrule
|
||||
\endhead
|
||||
\bottomrule
|
||||
\endlastfoot
|
||||
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 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}
|
||||
|
||||
@@ -20,3 +20,7 @@
|
||||
\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{synonyms}{name={synonyms},description={Equivalent terms used in this assignment; record preferred terms to avoid ambiguity in instructions and evidence}}
|
||||
\newglossaryentry{giteaactions}{name={Gitea Actions},description={Gitea's built-in workflow automation system for running jobs such as builds and artifact uploads}}
|
||||
\newglossaryentry{artifact}{name={artifact},description={A build output retained by a workflow run, such as a generated PDF, for later download and review}}
|
||||
\newglossaryentry{runner}{name={runner},description={A self-managed service that polls Gitea for workflow jobs and executes them in a configured environment}}
|
||||
|
||||
|
||||
@@ -84,3 +84,51 @@
|
||||
year = {2026},
|
||||
note = {Accessed October 7, 2026}
|
||||
}
|
||||
|
||||
@misc{GiteaActionsQuickstart,
|
||||
author = {{Gitea}},
|
||||
title = {Gitea Actions Quick Start},
|
||||
howpublished = {\url{https://docs.gitea.com/usage/actions/quickstart/}},
|
||||
year = {2026},
|
||||
note = {Accessed October 12, 2026}
|
||||
}
|
||||
|
||||
@misc{GiteaActionsArtifacts,
|
||||
author = {{Gitea}},
|
||||
title = {Gitea Actions Artifacts},
|
||||
howpublished = {\url{https://docs.gitea.com/usage/actions/artifacts/}},
|
||||
year = {2026},
|
||||
note = {Accessed October 12, 2026}
|
||||
}
|
||||
|
||||
@misc{GiteaRunnerDocker,
|
||||
author = {{Gitea}},
|
||||
title = {Install Gitea Runner with Docker},
|
||||
howpublished = {\url{https://docs.gitea.com/runner/2/installation/docker/}},
|
||||
year = {2026},
|
||||
note = {Accessed October 12, 2026}
|
||||
}
|
||||
|
||||
@misc{GiteaRunnerLabels,
|
||||
author = {{Gitea}},
|
||||
title = {Gitea Runner Labels},
|
||||
howpublished = {\url{https://docs.gitea.com/runner/labels/}},
|
||||
year = {2026},
|
||||
note = {Accessed October 12, 2026}
|
||||
}
|
||||
|
||||
@misc{LatexmkCtan,
|
||||
author = {{CTAN}},
|
||||
title = {latexmk -- Fully Automated LaTeX Document Generation},
|
||||
howpublished = {\url{https://ctan.org/pkg/latexmk}},
|
||||
year = {2026},
|
||||
note = {Accessed October 12, 2026}
|
||||
}
|
||||
|
||||
@misc{TexLiveTug,
|
||||
author = {{TeX Users Group}},
|
||||
title = {TeX Live},
|
||||
howpublished = {\url{https://tug.org/texlive/}},
|
||||
year = {2026},
|
||||
note = {Accessed October 12, 2026}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# Gitea Actions runner notes
|
||||
|
||||
Target runner label: latex-docker
|
||||
Execution mode: Docker job container
|
||||
Preferred job image: texlive/texlive:TL2026-historic
|
||||
Workflow path: .gitea/workflows/manual-pdf.yml
|
||||
Main file: devopsAssignment.tex
|
||||
Build command: latexmk -norc -pdf -shell-escape -interaction=nonstopmode -halt-on-error devopsAssignment.tex
|
||||
Artifact: devopsAssignment.pdf uploaded from the matching Actions run
|
||||
|
||||
The live runner registration still requires authenticated Gitea administration or SSH access to the Droplet.
|
||||
Do not commit runner registration tokens, Gitea tokens, or private keys.
|
||||
Reference in New Issue
Block a user