Build Member 2 fixture review-to-release pipeline
This commit is contained in:
@@ -0,0 +1,141 @@
|
||||
\chapter{Configuring and Running the DevOps Pipeline}
|
||||
\ChapterLabel{ConfiguringAndRunningDevOpsPipeline}
|
||||
\index{pipeline!AI review}\index{artifact!versioned ZIP}
|
||||
|
||||
\section{Scope and current implementation boundary}
|
||||
This final project extends the existing Gitea, Jenkins, Docker, LaTeX and
|
||||
Prometheus/Grafana infrastructure. A Python syntax error is reviewed, its
|
||||
accepted output is transferred as an exact artifact, a report is built, and
|
||||
the reviewed file is tested before a versioned ZIP is published. The outdated
|
||||
Project Proposal is not the requirements source. This chapter describes the
|
||||
Member 2 implementation; fixture runs are explicitly simulated. A real model,
|
||||
its memory measurement and live token evidence remain Member 1 integration
|
||||
requirements. No fixture proves that a model meets the team's 0.25 GB target.
|
||||
|
||||
\section{Tools and architecture}
|
||||
\begin{tabularx}{\linewidth}{L{3.0cm}Y}
|
||||
\toprule Process & Tool and observable output \\ \midrule
|
||||
Issue tracking & Gitea issue and comments tied to the actual work. \\
|
||||
Source control & Git/Gitea, full source SHA and peer-reviewed changes. \\
|
||||
Forward documentation & LaTeX with the pinned existing compiler image. \\
|
||||
CI/CD & Actions produces the review artifact; Jenkins validates, builds, tests and packages. \\
|
||||
Testing & Python unittest, py\_compile and an execution/output smoke test. \\
|
||||
Deployment & Major.Minor.Changelist ZIP with reviewed code, PDF and manifest. \\
|
||||
Monitoring & Existing Prometheus/Grafana host metrics; live token adapter awaits real results. \\ \bottomrule
|
||||
\end{tabularx}
|
||||
Requirements in the issue map to acceptance checks; design maps to report and
|
||||
integration review; implementation maps to unit/syntax tests; deployment maps
|
||||
to fresh-download verification. These links connect the development and
|
||||
verification sides of the V-Curve.
|
||||
|
||||
\begin{figure}[htbp]\centering
|
||||
\begin{tikzpicture}[node distance=0.7cm, every node/.style={draw,rounded corners,align=center,font=\small,text width=10cm}, arr/.style={-{Stealth},thick}]
|
||||
\node (git) {Gitea issue and source commit};
|
||||
\node[below=of git] (action) {Actions: fixture or real reviewer; exact run/SHA bundle};
|
||||
\node[below=of action] (validate) {Jenkins: authenticated retrieval, identity and checksum validation};
|
||||
\node[below=of validate] (build) {Pinned TeX container: reserve version, compile report, run tests};
|
||||
\node[below=of build] (zip) {Immutable versioned ZIP and independent download verification};
|
||||
\draw[arr] (git)--(action);\draw[arr] (action)--(validate);\draw[arr] (validate)--(build);\draw[arr] (build)--(zip);
|
||||
\end{tikzpicture}
|
||||
\caption{Final-project artifact flow. Host monitoring observes the shared Droplet; it does not attribute every load change to one process.}
|
||||
\end{figure}
|
||||
|
||||
\section{Configuration and reproduction}
|
||||
\path{.gitea/workflows/final-project.yml} restricts execution to the Member 2
|
||||
and demo branches, uses the proven checkout/upload pins and creates a named
|
||||
ready artifact only on a successful review. The simulated input is
|
||||
\path{ci/fixtures/demo_broken.txt}. The standalone stub does not depend on
|
||||
Member 1's package. Corrected/unchanged return zero with two payload files;
|
||||
rejected returns two; operational error returns three and no reviewed file.
|
||||
|
||||
\path{ci/final_project.py} validates a bounded ZIP with exactly four files:
|
||||
\path{reviewed.py}, \path{review.json}, \path{bundle.json} and
|
||||
\path{SHA256SUMS}. It rejects duplicate entries, unexpected paths, special
|
||||
files, bad hashes and wrong SHA/run/attempt/mode before executing the payload.
|
||||
Checksums detect corruption; trusted workflow source and authenticated
|
||||
retrieval establish provenance. The download uses this Gitea server's named
|
||||
legacy artifact route, not an assumed GitHub endpoint.
|
||||
|
||||
\path{Jenkinsfile.final-project} defines separate retrieval, validation,
|
||||
reservation, report, tests and publication stages. Parameters identify the
|
||||
full SHA, Actions run and attempt; no implicit latest bundle is accepted.
|
||||
The current required Python PR check remains unchanged. The trusted agent
|
||||
creates a bounded compiler container without network or Docker socket;
|
||||
source is copied into it explicitly. The dedicated state volume preserves
|
||||
version reservations and immutable release bytes across job retries.
|
||||
|
||||
\begin{lstlisting}[language=bash]
|
||||
python3 -m unittest discover -s ci/tests -v
|
||||
python3 -m unittest discover -s tests -v
|
||||
python3 ci/fixtures/reviewer_stub.py --input ci/fixtures/demo_broken.txt \
|
||||
--source-commit "$SHA" --out-dir out/review
|
||||
python3 ci/final_project.py bundle --review-dir out/review \
|
||||
--sha "$SHA" --run-id "$RUN" --attempt 1 --mode fixture \
|
||||
--output out/review-bundle.zip
|
||||
\end{lstlisting}
|
||||
The operations guide records all subsequent commands and job setup. Output
|
||||
directories must be fresh. Missing counts remain unknown, never zero-filled.
|
||||
|
||||
\section{This build's verified review}
|
||||
\ifdefined\FinalVersion
|
||||
Release \texttt{\FinalVersion}; mode \textbf{\FinalMode}; Jenkins build
|
||||
\texttt{\FinalJenkinsBuild}; review status \texttt{\FinalStatus}. Source
|
||||
and Actions identity appear in this manual's Build Identity page.
|
||||
Model: \texttt{\FinalModel}. Input/output token values:
|
||||
\texttt{\FinalInputTokens}/\texttt{\FinalOutputTokens}.
|
||||
\texttt{None} means unavailable or model not invoked. Fixture counts are
|
||||
simulated and must not appear as live inference evidence.
|
||||
\subsection{Reviewed file}
|
||||
\lstinputlisting[basicstyle=\ttfamily\small,breaklines=true]{final-reviewed.txt}
|
||||
\subsection{Exact review diff}
|
||||
\lstinputlisting[basicstyle=\ttfamily\small,breaklines=true]{final-diff.txt}
|
||||
\else
|
||||
This is an ordinary manual build. No review bundle or release version was
|
||||
injected; do not treat this section as evidence of a live model execution.
|
||||
\fi
|
||||
|
||||
\section{Versioning, tests and publication gates}
|
||||
The durable registry reserves a numeric changelist under a file lock for each
|
||||
source SHA and mode. The provisional release baseline is 1.0. Fixture and
|
||||
live identities are distinct. A retry reuses the reservation; an existing
|
||||
version with different bytes cannot be overwritten. A failed build can leave
|
||||
a sequence gap. The model and runtime configuration must be pinned in source
|
||||
before live release identity is meaningful.
|
||||
|
||||
The report manifest binds source, run/attempt, mode, version, PDF hash and
|
||||
both review payload hashes. Publication verifies that binding and repeats
|
||||
the reviewed-file smoke assertion. A runtime-failure fixture is injected
|
||||
only to test downstream gates; it is not an allowed model correction.
|
||||
The ZIP contains reviewed code, the versioned PDF, review metadata, README
|
||||
and manifest. Payload hashes exclude the manifest itself; a companion digest
|
||||
covers the complete ZIP. Unit tests exercise malicious archives, wrong
|
||||
identity, corruption, runtime failure, mode separation and locked reservation.
|
||||
Build-specific results belong in retained logs, not invented static claims.
|
||||
|
||||
\section{SWOT comparison}
|
||||
\begin{tabularx}{\linewidth}{L{2.0cm}YY}
|
||||
\toprule & Gitea Actions & Jenkins \\ \midrule
|
||||
Strengths & Commit-linked review and existing artifact actions. & Visible gates, trusted agent and flexible packaging. \\
|
||||
Weaknesses & Runner constraints and legacy artifact behavior. & Additional plugin/job state and authentication. \\
|
||||
Opportunities & Automatic review metadata for every selected commit. & Central version allocation and reproducible release evidence. \\
|
||||
Threats & Incompatible action upgrades or expired artifacts. & Wrong-bundle selection, privileged agent misuse and stale output. \\ \bottomrule
|
||||
\end{tabularx}
|
||||
The team-requested AI/human SWOT comparison and measured model rationale
|
||||
will be integrated from Member 1's handoff; this tool comparison does not
|
||||
substitute for that separate work.
|
||||
|
||||
\section{Monitoring, operations and remaining evidence}
|
||||
The live-only metric adapter rejects fixture metadata, exports token counts
|
||||
as gauges, and explicitly reports count availability. A reviewed textfile
|
||||
collector integration and measured real-model samples are required before
|
||||
claiming live token monitoring. Retain samples through the 30-second scrape
|
||||
interval, and show CPU/available memory over one fixed before/during/after
|
||||
window. Existing services share this host; load correlation is not attribution.
|
||||
|
||||
Complete the issue/comment, meaningful commit, trigger, visible build, tests,
|
||||
versioned download, SWOT, configuration, history/link and cloud-load evidence
|
||||
for the ten rubric categories. Optional reverse documentation requires actual
|
||||
code-generated diagrams in the release. This implementation does not claim
|
||||
that bonus. Preserve existing production services and volumes. Cleanup removes
|
||||
only this job's temporary container/workspace; retain the dedicated state
|
||||
volume and release evidence. No paid capacity change is part of this work.
|
||||
Reference in New Issue
Block a user