Skip to content

Commit

Permalink
Site update at 2024-12-01T09:11:45+0000
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Dec 1, 2024
1 parent e26c9e2 commit 015d4ae
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"dateModified": "2024-11-30T22:00:00+01:00",
"inLanguage": "es",

"wordCount": "8922",
"wordCount": "8986",
"license": "https://creativecommons.org/licenses/by-sa/4.0/",
"author": {
"@type": "Person",
Expand Down Expand Up @@ -411,6 +411,12 @@ <h3 id="el-_workflow_-de-la-fase-de-_release_">El <em>workflow</em> de la fase d
<span>.github/workflows/build-release-dockerfile.yml</span>
</div>
</div>
<div class="code">
<div class="highlight"><div class="chroma">&#10;<table class="lntable"><tr><td class="lntd">&#10;<pre tabindex="0" class="chroma"><code><span class="lnt"> 1&#10;</span><span class="lnt"> 2&#10;</span><span class="lnt"> 3&#10;</span><span class="lnt"> 4&#10;</span><span class="lnt"> 5&#10;</span><span class="lnt"> 6&#10;</span><span class="lnt"> 7&#10;</span><span class="lnt"> 8&#10;</span><span class="lnt"> 9&#10;</span><span class="lnt">10&#10;</span><span class="lnt">11&#10;</span><span class="lnt">12&#10;</span><span class="lnt">13&#10;</span><span class="lnt">14&#10;</span><span class="lnt">15&#10;</span><span class="lnt">16&#10;</span><span class="lnt">17&#10;</span><span class="lnt">18&#10;</span><span class="lnt">19&#10;</span><span class="lnt">20&#10;</span><span class="lnt">21&#10;</span><span class="lnt">22&#10;</span><span class="lnt">23&#10;</span><span class="lnt">24&#10;</span><span class="lnt">25&#10;</span><span class="lnt">26&#10;</span><span class="lnt">27&#10;</span><span class="lnt">28&#10;</span><span class="lnt">29&#10;</span><span class="lnt">30&#10;</span><span class="lnt">31&#10;</span><span class="lnt">32&#10;</span><span class="lnt">33&#10;</span></code></pre></td>&#10;<td class="lntd">&#10;<pre tabindex="0" class="chroma"><code class="language-plain" data-lang="plain"><span class="line"><span class="cl">FROM ubuntu:24.04 AS build&#10;</span></span><span class="line"><span class="cl">&#10;</span></span><span class="line"><span class="cl">ARG ARTIFACT&#10;</span></span><span class="line"><span class="cl">ARG ARTIFACT_NAME&#10;</span></span><span class="line"><span class="cl">&#10;</span></span><span class="line"><span class="cl">RUN apt update \&#10;</span></span><span class="line"><span class="cl">&nbsp;&nbsp;&nbsp;&nbsp;&amp;&amp; apt install unzip&#10;</span></span><span class="line"><span class="cl">&#10;</span></span><span class="line"><span class="cl">RUN mkdir /app/&#10;</span></span><span class="line"><span class="cl">COPY ${ARTIFACT} /app/&#10;</span></span><span class="line"><span class="cl">RUN unzip -d /app/ /app/${ARTIFACT_NAME}-*.zip \&#10;</span></span><span class="line"><span class="cl">&nbsp;&nbsp;&nbsp;&nbsp;&amp;&amp; rm /app/${ARTIFACT_NAME}-*.zip \&#10;</span></span><span class="line"><span class="cl">&nbsp;&nbsp;&nbsp;&nbsp;&amp;&amp; mv /app/${ARTIFACT_NAME}-* /app/${ARTIFACT_NAME}&#10;</span></span><span class="line"><span class="cl">&#10;</span></span><span class="line"><span class="cl">RUN ls -l /app/&#10;</span></span><span class="line"><span class="cl">&#10;</span></span><span class="line"><span class="cl">FROM eclipse-temurin:21-jdk&#10;</span></span><span class="line"><span class="cl">&#10;</span></span><span class="line"><span class="cl">ARG USERNAME=stubhub&#10;</span></span><span class="line"><span class="cl">ARG GROUP_NAME=${USERNAME}&#10;</span></span><span class="line"><span class="cl">ARG USER_UID=2000&#10;</span></span><span class="line"><span class="cl">ARG USER_GID=${USER_UID}&#10;</span></span><span class="line"><span class="cl">&#10;</span></span><span class="line"><span class="cl">RUN groupadd --gid ${USER_GID} ${GROUP_NAME} \&#10;</span></span><span class="line"><span class="cl">&nbsp;&nbsp;&nbsp;&nbsp;&amp;&amp; useradd --uid ${USER_UID} --gid ${USER_GID} ${USERNAME}&#10;</span></span><span class="line"><span class="cl">&#10;</span></span><span class="line"><span class="cl">RUN mkdir /app/&#10;</span></span><span class="line"><span class="cl">COPY --from=build /app/ /app/&#10;</span></span><span class="line"><span class="cl">&#10;</span></span><span class="line"><span class="cl">USER ${USERNAME}&#10;</span></span><span class="line"><span class="cl">EXPOSE 8080&#10;</span></span><span class="line"><span class="cl">&#10;</span></span><span class="line"><span class="cl">CMD [&#34;/app/platform-github-actions-workflows-gradle-app/bin/app&#34;]</span></span></code></pre></td></tr></table>&#10;</div>&#10;</div>
<div class="highlight-meta">
<span>miscellaneous/docker/Dockerfile</span>
</div>
</div>
<h3 id="el-_workflow_-de-la-fase-de-_deploy_">El <em>workflow</em> de la fase de <em>deploy</em></h3>
<p>Al igual que el <em>workflow</em> de <em>release</em> no se compone de un único <em>workflow</em> sino de varios para segregar en función del <em>runtime</em> de ejecución, segregar en varios workflows tiene la ventaja de que la cantidad de <em>inputs</em> que recibe son menores lo que facilita su uso y complejidad. La fase de <em>deploy</em> ha de desplegar el artefacto en el entorno de ejecución o <em>runtime</em> que necesite el servicio, puede ser un servicio que hace uso de GKE, de GAE o un Google Function. Hay dos entornos el de desarrollo y el de producción, con reglas para requerir aprobaciones para hacer el despliegue que se han de configurar en cada repositorio.</p>
<p>Varios de los siguientes <em>steps</em> del <em>workflow</em> tienen <em>if</em> condicionales en función de sus condiciones. Añadir un nuevo entorno de ejecución sería añadir un nuevo <em>workflow</em> con sus <em>steps</em> específicos para ese entorno y varios <em>steps</em> iguales que el resto de entorno. Tanto el <em>workflow</em> de <em>build</em> como el de <em>deploy</em> reciben una buena cantidad de parámetros con la que configurar el comportamiento del <em>workflow</em>.</p>
Expand Down

0 comments on commit 015d4ae

Please sign in to comment.