<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: João Vinagre</title>
    <description>The latest articles on DEV Community by João Vinagre (@jrvlima).</description>
    <link>https://dev.to/jrvlima</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F609749%2Fb2dd4eac-472a-4ac0-a067-2f2511487c4f.jpeg</url>
      <title>DEV Community: João Vinagre</title>
      <link>https://dev.to/jrvlima</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jrvlima"/>
    <language>en</language>
    <item>
      <title>CI/CD</title>
      <dc:creator>João Vinagre</dc:creator>
      <pubDate>Wed, 02 Apr 2025 16:54:58 +0000</pubDate>
      <link>https://dev.to/zeecodeio/cicd-3j6i</link>
      <guid>https://dev.to/zeecodeio/cicd-3j6i</guid>
      <description>&lt;h2&gt;
  
  
  Continuos Integration
&lt;/h2&gt;

&lt;p&gt;Fast automated feedback on the correctness of your application every time there's a change to the code&lt;br&gt;
integrate early and often&lt;br&gt;
Everyone Commits to the Mainline Every Day&lt;/p&gt;

&lt;h3&gt;
  
  
  What you need
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Version Control&lt;/strong&gt; - code, tests, database scripts, build and deployment scripts, anything you need to create, install, run, and test your application, no matter the size of your project&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An Automated Build&lt;/strong&gt;—The automated build must be started from the command line, or a person or a computer must be able to run the build, test, and deployment process from the command line. Running through the command line is a best practice, no matter if you use an IDE or continuous integration tools; the idea is that these tools would use the same script you can run through your command line.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Justifications&lt;/strong&gt; 

&lt;ul&gt;
&lt;li&gt;you must be able to run in an automated way so the build can be audited when things go wrong, &lt;/li&gt;
&lt;li&gt;build scripts should be treated like your codebase, tested, and refactored constantly, &lt;/li&gt;
&lt;li&gt;makes understanding, maintaining, and debugging the build more effortless, and allows better collaboration with the ops team&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Agreement of the Team&lt;/strong&gt; — CI is a practice that requires commitment and discipline from your dev team

&lt;ul&gt;
&lt;li&gt;developers merge their code into the trunk daily.&lt;/li&gt;
&lt;li&gt;developers break up extensive features into small, incremental changes&lt;/li&gt;
&lt;li&gt;fix any change that breaks the build&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Simple Process to Follow
&lt;/h3&gt;

&lt;p&gt;...when starting to use CI Servers according to Jez Humble&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Check to see if the build is already running. If so, wait for it to finish. If it fails, you'll need to work with the rest of the team to make it green before you check in&lt;/li&gt;
&lt;li&gt;Once it has finished and the tests have passed, update the code in your development environment from this version in the version control repository to get any updates&lt;/li&gt;
&lt;li&gt;Run the build script and tests on your development machine to make sure that everything still works correctly on your computer, or use your CI tool's personal build feature&lt;/li&gt;
&lt;li&gt;If your local build passes, check your code into version control&lt;/li&gt;
&lt;li&gt;Wait for your CI tool to run the build with your changes&lt;/li&gt;
&lt;li&gt;If it fails, stop what you're doing and fix the problem immediately on your development machine - to step 3&lt;/li&gt;
&lt;li&gt;If your build passes, rejoice and move on to your next task&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Prerequisites to CI
&lt;/h3&gt;

&lt;p&gt;According to Jez Humble&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Check in regularly to Trunk or Mainline, at least a couple of times a day

&lt;ul&gt;
&lt;li&gt;makes your changes smaller and thus less likely to break the build&lt;/li&gt;
&lt;li&gt;You have a recent known-good version of the software to revert to in case of mistake or wrong path&lt;/li&gt;
&lt;li&gt;helps to be more disciplined about refactoring and stick to small changes that preserve behavior&lt;/li&gt;
&lt;li&gt;ensure that changes altering a lot of files are less likely to conflict with other people's work&lt;/li&gt;
&lt;li&gt;allows developers to be more explorative&lt;/li&gt;
&lt;li&gt;force you to take regular breaks&lt;/li&gt;
&lt;li&gt;...&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Comprehensive Automated Test Suite

&lt;ul&gt;
&lt;li&gt;without automated tests, passing a build is only to compile and assemble&lt;/li&gt;
&lt;li&gt;It's essential to have some level of testing to provide confidence that your application is working&lt;/li&gt;
&lt;li&gt;unit tests, component tests, and acceptance tests are kinds of tests we are interested in running from our CI&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Keep the Build and Test Process Short
If it takes too long

&lt;ul&gt;
&lt;li&gt;People will stop doing a complete build and running tests before checking in the code&lt;/li&gt;
&lt;li&gt;The CI process will take so long that multiple commits will have taken place by the time you can rerun the build, so you won't know which check-in broke the build&lt;/li&gt;
&lt;li&gt;People will check in less often.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Checking Into Trunk ...
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Use trunk-based development, although many projects use branches to manage large teams.&lt;/li&gt;
&lt;li&gt;It's impossible to do continuous integration while using branches, honestly, your code has not been integrated with that of other developers&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Managing your development workspace
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Developers should be able to run the build, execute the automated tests, and deploy the application in an environment under their control&lt;/li&gt;
&lt;li&gt;Running the application locally should use the same automated process used in CI and testing environments, and ultimately in production&lt;/li&gt;
&lt;li&gt;For this, the use of configuration management for source code, test data, DB scripts, build scripts, and deployment scripts is needed, all of this in VCS, and should be the most recent version that passed all automated tests in your CI server&lt;/li&gt;
&lt;li&gt;configuration management of third-party dependencies, libraries, and components&lt;/li&gt;
&lt;li&gt;Make sure that automated tests, including smoke tests, can be run on developer machines&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Essential Practices
&lt;/h3&gt;

&lt;p&gt;According to Jez Humble&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Don't check in on a broken build.&lt;/li&gt;
&lt;li&gt;Always Run All Commit Tests Locally before committing, or Get Your CI Server to Do It for you&lt;/li&gt;
&lt;li&gt;Wait for Commit Tests to Pass before Moving On&lt;/li&gt;
&lt;li&gt;Never go home on a broken build&lt;/li&gt;
&lt;li&gt;Always Be Prepared to Revert to the Previous Revision&lt;/li&gt;
&lt;li&gt;Time-box Fixing before Reverting&lt;/li&gt;
&lt;li&gt;Don't Comment Out Failing Tests&lt;/li&gt;
&lt;li&gt;Take Responsibility for All Breakages That Result from Your Changes&lt;/li&gt;
&lt;li&gt;TDD&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Continuous Delivery
&lt;/h2&gt;

&lt;p&gt;Fast automated feedback on the production readiness of your application every time there's a change to code, infrastructure, or configuration.&lt;br&gt;
Software is always deployable&lt;br&gt;
Continuous Delivery makes it cheap and low-risk to release a new version of your software.&lt;/p&gt;

&lt;h3&gt;
  
  
  continuous delivery is ideal
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Software is always production-ready&lt;/li&gt;
&lt;li&gt;Deployments are reliable and commonplace&lt;/li&gt;
&lt;li&gt;Everyone can self-service deployments&lt;/li&gt;
&lt;li&gt;releases occur according to business needs, not operational constraints
### keys&lt;/li&gt;
&lt;li&gt;Architecture 

&lt;ul&gt;
&lt;li&gt;Design for Testability&lt;/li&gt;
&lt;li&gt;Design for Deployability&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Patterns and Practices&lt;/li&gt;

&lt;li&gt;Collaboration
&lt;h3&gt;
  
  
  prerequisites&lt;/h3&gt;
&lt;/li&gt;



&lt;li&gt;configuration management&lt;/li&gt;

&lt;li&gt;automated tests&lt;/li&gt;

&lt;li&gt;continuos integration&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Correlation with IT Performance
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Our code, app configuration, and system configurations are in a version control system.&lt;/li&gt;
&lt;li&gt;We get failure alerts from logging and monitoring systems&lt;/li&gt;
&lt;li&gt;VERY HARD TO ACHIEVE

&lt;ul&gt;
&lt;li&gt;Developers merge their code into the trunk daily&lt;/li&gt;
&lt;li&gt;Developers break up extensive features into small, incremental changes&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;When development and operational teams interact, the outcome is generally win/win&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Puppet Labs - DevOps Report 2014
&lt;/h3&gt;

&lt;p&gt;Continuous Delivery requires, as a pre reqs an intensive collaboration between different roles, minimizing the idea of silos. The team should be aware that delivering the software is everyone's responsibility. Developers, testers, UX, operations, and business people should work together and collaboratively through the delivery process. One practice is to have physical developers, testers, business, and operational people working together.&lt;/p&gt;

&lt;h3&gt;
  
  
  A simple value stream map for a product
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foxnmbzbv8vocetrbecss.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foxnmbzbv8vocetrbecss.jpg" alt="A simple value stream map for a product - Jez Humble; David Farley - Continuous Delivery" width="500" height="130"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Figure 1: A simple value stream map for a product - Jez Humble; David Farley - Continuous Delivery.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Deployment Pipeline - Release
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0bzvn9looade914l1ht6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0bzvn9looade914l1ht6.jpg" alt="Release - Jez Humble; David Farley - Continuous Delivery." width="500" height="357"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Figure 2: Release - Jez Humble; David Farley - Continuous Delivery.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Production Readiness Confidence
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9g7tpmcp3su1b3b4nom4.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9g7tpmcp3su1b3b4nom4.jpg" alt="Production Readiness Confidence - Jez Humble; David Farley - Continuous Delivery." width="500" height="313"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Figure 3: Production Readiness Confidence - Jez Humble; David Farley - Continuous Delivery.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Deployment Pipeline - Continuous Delivery
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz11r39xfzvmzb5330zsy.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz11r39xfzvmzb5330zsy.jpg" alt="Deployment Pipeline - Continuous Delivery - Jez Humble; David Farley - Continuous Delivery." width="500" height="368"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Figure 4: Deployment Pipeline - Continuous Delivery - Jez Humble; David Farley - Continuous Delivery.&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>GenAI and DevOps</title>
      <dc:creator>João Vinagre</dc:creator>
      <pubDate>Wed, 02 Apr 2025 13:53:29 +0000</pubDate>
      <link>https://dev.to/zeecodeio/genai-and-devops-18a8</link>
      <guid>https://dev.to/zeecodeio/genai-and-devops-18a8</guid>
      <description>&lt;p&gt;Empowering our solutions with GenAI is becoming a must-have feature.&lt;/p&gt;

&lt;p&gt;Trendwords such as RAG, Agents, and MCP are everywhere, filling our heads.&lt;/p&gt;

&lt;p&gt;This Insights article explores how GenAI features can be used when designing and implementing CI/CD pipelines in our software.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use Cases
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;PR Analysis&lt;/strong&gt; - we can build RAGs using diffs and results of the commit stage CI pipeline to review PRs automatically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pipeline Debugging&lt;/strong&gt; - we can have steps/tasks to debug pipeline failures using LLMs; the debugging step can find the root cause and output possible solutions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Steps Summary and Analysis&lt;/strong&gt; - some pipelines create long outputs that sometimes are hard to interpret, as an example, a Terraform Plan output; we can add to our pipelines a step that uses LLMs to interpret a TF Plan as an example; with the right prompt LLMs can tells us what will update, the risk of destroying critical resources of our infra, and etc;&lt;/li&gt;
&lt;li&gt;Security Review&lt;/li&gt;
&lt;li&gt;Release Notes Generation&lt;/li&gt;
&lt;li&gt;Auto-approve PRs&lt;/li&gt;
&lt;li&gt;Auto test&lt;/li&gt;
&lt;li&gt;Auto fix&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even the inner structure of Applying GenAI to an application uses pipes, which is similar to what we do in pipelines.&lt;/p&gt;

&lt;p&gt;There are numerous ways to integrate LLMs into our CI/CD pipelines and remember: integrate in different levels ...&lt;/p&gt;

&lt;p&gt;The examples above demonstrate kind of passive or informative approaches, but we can dig deeper and implement steps that generate code to fix or remediate issues, or to test our application, and have the code be run by the pipeline in a more agentic way.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tools You Can Use Today
&lt;/h2&gt;

&lt;p&gt;by ChatGPT&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;LangChain&lt;/td&gt;
&lt;td&gt;LLM orchestration, agent tooling, MCP support via LCEL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CrewAI&lt;/td&gt;
&lt;td&gt;Multi-agent systems, useful for CI/CD "task teams"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenDevin&lt;/td&gt;
&lt;td&gt;OS Dev Agent with CI/CD-style abilities&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LangGraph&lt;/td&gt;
&lt;td&gt;Graph-style agent workflows (good for pipelines)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GitHub Copilot CLI&lt;/td&gt;
&lt;td&gt;Add CLI auto-fix suggestions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AutoPR&lt;/td&gt;
&lt;td&gt;GitHub App that opens AI-generated PRs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Your own FastAPI + LLM server&lt;/td&gt;
&lt;td&gt;Serve structured prompts via MCP schema&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Let's give some references to contextualize a bit ...&lt;/p&gt;

&lt;h2&gt;
  
  
  GenAI
&lt;/h2&gt;

&lt;p&gt;definition by Claude&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Generative AI (GenAI) refers to artificial intelligence systems that can create new content such as text, images, audio, code, or video based on the patterns they've learned from training data. These systems use deep learning techniques, particularly large language models and diffusion models, to generate outputs that weren't explicitly programmed but instead emerge from statistical patterns in the training data.&lt;br&gt;
Popular examples include text generators like GPT-4 and Claude, image creators like DALL-E and Midjourney, and code assistants like GitHub Copilot.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  RAG (Retrieval-Augmented Generation)
&lt;/h2&gt;

&lt;p&gt;definition by Claude&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;RAG (Retrieval-Augmented Generation) is an AI framework that combines the strengths of large language models with external knowledge retrieval systems. It works by first retrieving relevant information from a knowledge base in response to a query, then using that information to generate more accurate, up-to-date, and factual responses.&lt;br&gt;
The key benefits of RAG include:&lt;br&gt;
Reducing hallucinations by grounding responses in retrieved facts&lt;br&gt;
Enabling access to specialized or proprietary information&lt;br&gt;
Allowing AI systems to reference current information beyond their training cutoff&lt;br&gt;
RAG has become a fundamental approach for enhancing AI assistants with external knowledge sources&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  MCP (Model Context Protocol)
&lt;/h2&gt;

&lt;p&gt;definition by Claude&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;MCP (Model Context Protocol) is a framework for integrating context into AI systems through standardized interfaces. It provides a structured approach for AI models to request, receive, and incorporate external information during generation.&lt;br&gt;
Key aspects of MCP include:&lt;br&gt;
A unified protocol for passing context between different components of AI systems&lt;br&gt;
Standardized methods for models to retrieve relevant information when needed&lt;br&gt;
Mechanisms for maintaining coherence when incorporating external knowledge&lt;br&gt;
Support for both static and dynamic context retrieval during inference&lt;br&gt;
MCP helps improve AI responses by ensuring they have access to appropriate context while maintaining a consistent interface across different systems and use cases.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  GenAI Agents
&lt;/h2&gt;

&lt;p&gt;definition by Claude&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;GenAI Agents are autonomous or semi-autonomous AI systems that combine generative AI capabilities with agency—the ability to take independent actions to achieve goals. Unlike basic generative models that simply respond to prompts, GenAI Agents can:&lt;br&gt;
Make decisions and execute tasks through reasoning&lt;br&gt;
Access and use tools (like web search, code execution, or APIs)&lt;br&gt;
Plan multi-step processes to accomplish complex objectives&lt;br&gt;
Maintain context and memory across interactions&lt;br&gt;
Learn from feedback and adapt their approaches&lt;br&gt;
Examples include AI assistants that can research topics, analyze data, book appointments, or create content through coordinated actions rather than single-step generation. These agents represent an evolution from passive text generators to more capable, goal-oriented AI systems.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>genai</category>
      <category>devops</category>
      <category>cicd</category>
    </item>
  </channel>
</rss>
