Init
This commit is contained in:
62
slides/sections/03_Pipeline.tex
Normal file
62
slides/sections/03_Pipeline.tex
Normal file
@@ -0,0 +1,62 @@
|
||||
\section{Parte pr\'actica}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{\textbf{Objetivo de la parte pr\'actica}}
|
||||
\begin{itemize}
|
||||
\item Entender un pipeline de CI "de verdad": lint + tests + build.
|
||||
\item Entender un pipeline de CD: test en main + build de im\'agenes + deploy.
|
||||
\item Veamos en qué afectan los cambios:
|
||||
\begin{itemize}
|
||||
\item logs del pipeline
|
||||
\item artefactos/im\'agenes Docker
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{\textbf{CI: qu\'e hace Jenkinsfile.ci?}}
|
||||
\begin{itemize}
|
||||
\item Stage \textbf{Init}: lee autor y hash corto del commit.
|
||||
\item Stage \textbf{Backend: lint \& test}:
|
||||
\begin{itemize}
|
||||
\item usa contenedor \texttt{python:3.11-slim}
|
||||
\item crea venv, instala dev deps
|
||||
\item ejecuta \texttt{ruff} y \texttt{pytest}
|
||||
\end{itemize}
|
||||
\item Stage \textbf{Frontend: check \& build}:
|
||||
\begin{itemize}
|
||||
\item usa contenedor \texttt{node:20-slim}
|
||||
\item \texttt{npm install} + \texttt{npm run check} + \texttt{npm test} + \texttt{npm run build}
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{\textbf{CD: qu\'e hace Jenkinsfile.cd?}}
|
||||
\begin{itemize}
|
||||
\item Construye im\'agenes Docker con tags tipo \texttt{1.0.\$BUILD\_NUMBER}.
|
||||
\item Inyecta metadatos en runtime:
|
||||
\begin{itemize}
|
||||
\item \texttt{APP\_VERSION}, \texttt{GIT\_COMMIT}, \texttt{COMMIT\_AUTHOR}, \texttt{BUILD\_NUMBER}
|
||||
\end{itemize}
|
||||
\item Despliega con \texttt{docker compose up -d} usando \texttt{BACKEND\_TAG} y \texttt{FRONTEND\_TAG}.
|
||||
\end{itemize}
|
||||
|
||||
\vspace{0.1in}
|
||||
\begin{mybox}
|
||||
\begin{itemize}
|
||||
\item[\ding{229}] El rollback es sencillo: si tienes tags, puedes redeployar una versi\'on anterior en segundos. CD genera artefactos (imágenes versionadas) y en nuestro caso, se ocupa del deploy también.
|
||||
\end{itemize}
|
||||
\end{mybox}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{\textbf{Ejercicio 1: miau}}
|
||||
|
||||
\end{frame}
|
||||
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{\textbf{Ejercicio 2: miau 2}}
|
||||
|
||||
\end{frame}
|
||||
Reference in New Issue
Block a user