<?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: victor maina</title>
    <description>The latest articles on DEV Community by victor maina (@victor_maina_35ac7e7d51d8).</description>
    <link>https://dev.to/victor_maina_35ac7e7d51d8</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%2F1657211%2F12eb8617-a8c1-4016-9271-07ad0212f23c.jpg</url>
      <title>DEV Community: victor maina</title>
      <link>https://dev.to/victor_maina_35ac7e7d51d8</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/victor_maina_35ac7e7d51d8"/>
    <language>en</language>
    <item>
      <title>Jenkins for Beginners</title>
      <dc:creator>victor maina</dc:creator>
      <pubDate>Wed, 05 Mar 2025 09:50:53 +0000</pubDate>
      <link>https://dev.to/victor_maina_35ac7e7d51d8/jenkins-for-beginners-5h10</link>
      <guid>https://dev.to/victor_maina_35ac7e7d51d8/jenkins-for-beginners-5h10</guid>
      <description>&lt;p&gt;Jenkins is an open-source automation server primarily used for Continuous Integration (CI) and Continuous Delivery (CD) in software development. It helps automate various tasks in the software development lifecycle, such as building, testing, and deploying applications. Here's how it works:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Jenkins Server
Jenkins runs on a server, which can be installed on a variety of operating systems (Linux, Windows, macOS).
It has a web-based interface where you can configure Jenkins jobs, pipelines, and monitor the execution of these tasks.&lt;/li&gt;
&lt;li&gt;Jobs
A job in Jenkins is a single task or a series of tasks that Jenkins automates. Jobs could be anything like building code, running tests, or deploying software.
You can define jobs through the web interface or by using configuration files like Jenkinsfile (a text file that defines the pipeline stages).&lt;/li&gt;
&lt;li&gt;Pipelines
Pipelines are a set of automated steps or stages that describe the process of building, testing, and deploying an application.
A Jenkins Pipeline is typically defined in a Jenkinsfile and can be a Declarative Pipeline or a Scripted Pipeline.
Pipelines define how the project is built, tested, and delivered through various environments (dev, test, production).&lt;/li&gt;
&lt;li&gt;Source Code Management (SCM)
Jenkins can be integrated with various source control repositories like Git, Subversion, etc.
Jenkins pulls the latest code from the repository whenever a new build is triggered (manually or automatically, e.g., via a webhook from GitHub).&lt;/li&gt;
&lt;li&gt;Build and Test
Jenkins automates the build process (compiling code, creating artifacts) and testing process (running unit tests, integration tests) to ensure that the codebase is stable.
After the build, Jenkins can also trigger additional steps like static code analysis or security scans.&lt;/li&gt;
&lt;li&gt;Triggering Jobs
Jenkins jobs can be triggered in several ways:
Poll SCM: Jenkins periodically checks for changes in the source code repository and starts a build if changes are detected.
Webhook: Many modern version control systems like GitHub can send a webhook to Jenkins to trigger a build when code is pushed to the repository.
Scheduled Builds: You can schedule builds to run at specific times, such as nightly or weekly.
Manual Triggers: Developers or administrators can manually trigger jobs from the Jenkins interface.&lt;/li&gt;
&lt;li&gt;Agents/Nodes
Jenkins can be scaled horizontally by using agents (also called slaves in earlier versions). Agents are machines that help Jenkins execute tasks.
The main Jenkins server (Master) coordinates the execution of tasks, while agents can run the actual build processes. This allows for better load distribution and faster processing of builds.&lt;/li&gt;
&lt;li&gt;Notifications and Reporting
After each build or test, Jenkins provides feedback via the user interface, email, or integration with other tools like Slack or Microsoft Teams.
Jenkins can also generate build reports and display test results, code coverage, and other metrics.&lt;/li&gt;
&lt;li&gt;Plugins
Jenkins has a robust ecosystem of plugins that extend its functionality. You can add plugins to integrate Jenkins with various tools and technologies, such as:
Docker for containerized builds
AWS for deployment
Slack for notifications
GitHub for source control
Selenium for automated testing
Summary
Jenkins works by automating software development tasks through jobs and pipelines. It integrates with version control systems, triggers builds and tests, scales using agents, and provides feedback through reports and notifications. Through its extensive plugin ecosystem, Jenkins can be customized to support nearly any development workflow.&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>Jenkins 101</title>
      <dc:creator>victor maina</dc:creator>
      <pubDate>Wed, 05 Mar 2025 08:53:04 +0000</pubDate>
      <link>https://dev.to/victor_maina_35ac7e7d51d8/jenkins-101-16p9</link>
      <guid>https://dev.to/victor_maina_35ac7e7d51d8/jenkins-101-16p9</guid>
      <description>&lt;p&gt;Jenkins is an open-source automation server primarily used for Continuous Integration (CI) and Continuous Delivery (CD) in software development. It helps automate various tasks in the software development lifecycle, such as building, testing, and deploying applications. Here's how it works:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Jenkins Server
Jenkins runs on a server, which can be installed on a variety of operating systems (Linux, Windows, macOS).
It has a web-based interface where you can configure Jenkins jobs, pipelines, and monitor the execution of these tasks.&lt;/li&gt;
&lt;li&gt;Jobs
A job in Jenkins is a single task or a series of tasks that Jenkins automates. Jobs could be anything like building code, running tests, or deploying software.
You can define jobs through the web interface or by using configuration files like Jenkinsfile (a text file that defines the pipeline stages).&lt;/li&gt;
&lt;li&gt;Pipelines
Pipelines are a set of automated steps or stages that describe the process of building, testing, and deploying an application.
A Jenkins Pipeline is typically defined in a Jenkinsfile and can be a Declarative Pipeline or a Scripted Pipeline.
Pipelines define how the project is built, tested, and delivered through various environments (dev, test, production).&lt;/li&gt;
&lt;li&gt;Source Code Management (SCM)
Jenkins can be integrated with various source control repositories like Git, Subversion, etc.
Jenkins pulls the latest code from the repository whenever a new build is triggered (manually or automatically, e.g., via a webhook from GitHub).&lt;/li&gt;
&lt;li&gt;Build and Test
Jenkins automates the build process (compiling code, creating artifacts) and testing process (running unit tests, integration tests) to ensure that the codebase is stable.
After the build, Jenkins can also trigger additional steps like static code analysis or security scans.&lt;/li&gt;
&lt;li&gt;Triggering Jobs
Jenkins jobs can be triggered in several ways:
Poll SCM: Jenkins periodically checks for changes in the source code repository and starts a build if changes are detected.
Webhook: Many modern version control systems like GitHub can send a webhook to Jenkins to trigger a build when code is pushed to the repository.
Scheduled Builds: You can schedule builds to run at specific times, such as nightly or weekly.
Manual Triggers: Developers or administrators can manually trigger jobs from the Jenkins interface.&lt;/li&gt;
&lt;li&gt;Agents/Nodes
Jenkins can be scaled horizontally by using agents (also called slaves in earlier versions). Agents are machines that help Jenkins execute tasks.
The main Jenkins server (Master) coordinates the execution of tasks, while agents can run the actual build processes. This allows for better load distribution and faster processing of builds.&lt;/li&gt;
&lt;li&gt;Notifications and Reporting
After each build or test, Jenkins provides feedback via the user interface, email, or integration with other tools like Slack or Microsoft Teams.
Jenkins can also generate build reports and display test results, code coverage, and other metrics.&lt;/li&gt;
&lt;li&gt;Plugins
Jenkins has a robust ecosystem of plugins that extend its functionality. You can add plugins to integrate Jenkins with various tools and technologies, such as:
Docker for containerized builds
AWS for deployment
Slack for notifications
GitHub for source control
Selenium for automated testing
Summary
Jenkins works by automating software development tasks through jobs and pipelines. It integrates with version control systems, triggers builds and tests, scales using agents, and provides feedback through reports and notifications. Through its extensive plugin ecosystem, Jenkins can be customized to support nearly any development workflow.&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>🚀 Deploying a Dockerized Node.js App on Render</title>
      <dc:creator>victor maina</dc:creator>
      <pubDate>Fri, 21 Feb 2025 11:58:03 +0000</pubDate>
      <link>https://dev.to/victor_maina_35ac7e7d51d8/deploying-a-dockerized-nodejs-app-on-render-37ga</link>
      <guid>https://dev.to/victor_maina_35ac7e7d51d8/deploying-a-dockerized-nodejs-app-on-render-37ga</guid>
      <description>&lt;p&gt;This guide walks you through Dockerizing your app, pushing it to Docker Hub, and deploying it on Render.&lt;br&gt;
1️⃣ Initialize Docker &amp;amp; Build Images&lt;br&gt;
Start by navigating to your project directory:&lt;/p&gt;

&lt;p&gt;sh&lt;br&gt;
Copy&lt;br&gt;
Edit&lt;br&gt;
cd ~/Desktop/taskplanner/tasks-app&lt;br&gt;
Then, build the Docker images for the backend and frontend:&lt;/p&gt;

&lt;p&gt;🔹 Backend&lt;br&gt;
sh&lt;br&gt;
Copy&lt;br&gt;
Edit&lt;br&gt;
docker build -t vicmaich/tasks-app-backend:v1 ./backend&lt;br&gt;
🔹 Frontend&lt;br&gt;
sh&lt;br&gt;
Copy&lt;br&gt;
Edit&lt;br&gt;
docker build -t vicmaich/tasks-app-frontend:v1 ./frontend&lt;br&gt;
Check if the images were created:&lt;/p&gt;

&lt;p&gt;sh&lt;br&gt;
Copy&lt;br&gt;
Edit&lt;br&gt;
docker images&lt;br&gt;
2️⃣ Run Containers Locally (Testing)&lt;br&gt;
Start the containers using Docker Compose:&lt;/p&gt;

&lt;p&gt;sh&lt;br&gt;
Copy&lt;br&gt;
Edit&lt;br&gt;
docker-compose up --build&lt;br&gt;
This will:&lt;/p&gt;

&lt;p&gt;Start MongoDB (tasks-app-mongo-1)&lt;br&gt;
Start Backend (tasks-app-backend-1)&lt;br&gt;
Start Frontend (tasks-app-frontend-1)&lt;br&gt;
Check running containers:&lt;/p&gt;

&lt;p&gt;sh&lt;br&gt;
Copy&lt;br&gt;
Edit&lt;br&gt;
docker ps&lt;br&gt;
Test the backend:&lt;/p&gt;

&lt;p&gt;sh&lt;br&gt;
Copy&lt;br&gt;
Edit&lt;br&gt;
curl &lt;a href="http://localhost:3001" rel="noopener noreferrer"&gt;http://localhost:3001&lt;/a&gt;&lt;br&gt;
Test the frontend by opening:&lt;br&gt;
👉 &lt;a href="http://localhost:3000" rel="noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If everything works, proceed to deployment.&lt;/p&gt;

&lt;p&gt;3️⃣ Tag &amp;amp; Push Images to Docker Hub&lt;br&gt;
Log in to Docker Hub:&lt;/p&gt;

&lt;p&gt;sh&lt;br&gt;
Copy&lt;br&gt;
Edit&lt;br&gt;
docker login&lt;br&gt;
🔹 Tagging&lt;br&gt;
Tag the images before pushing:&lt;/p&gt;

&lt;p&gt;sh&lt;br&gt;
Copy&lt;br&gt;
Edit&lt;br&gt;
docker tag vicmaich/tasks-app-backend:v1 vicmaich/tasks-app-backend:latest&lt;br&gt;
docker tag vicmaich/tasks-app-frontend:v1 vicmaich/tasks-app-frontend:latest&lt;br&gt;
🔹 Pushing&lt;br&gt;
Push the images to Docker Hub:&lt;/p&gt;

&lt;p&gt;sh&lt;br&gt;
Copy&lt;br&gt;
Edit&lt;br&gt;
docker push vicmaich/tasks-app-backend:latest&lt;br&gt;
docker push vicmaich/tasks-app-frontend:latest&lt;br&gt;
4️⃣ Deploy on Render&lt;br&gt;
Go to Render (&lt;a href="https://dashboard.render.com/" rel="noopener noreferrer"&gt;https://dashboard.render.com/&lt;/a&gt;) and:&lt;/p&gt;

&lt;p&gt;🔹 Deploy Backend&lt;br&gt;
Click New Web Service&lt;br&gt;
Choose "Deploy an Existing Image"&lt;br&gt;
Use:&lt;br&gt;
bash&lt;br&gt;
Copy&lt;br&gt;
Edit&lt;br&gt;
docker.io/vicmaich/tasks-app-backend:latest&lt;br&gt;
Set PORT to 3001&lt;br&gt;
Click Deploy&lt;br&gt;
🔹 Deploy Frontend&lt;br&gt;
Repeat the steps for the frontend.&lt;br&gt;
Use:&lt;br&gt;
bash&lt;br&gt;
Copy&lt;br&gt;
Edit&lt;br&gt;
docker.io/vicmaich/tasks-app-frontend:latest&lt;br&gt;
Set PORT to 3000&lt;br&gt;
Click Deploy&lt;br&gt;
5️⃣ Update &amp;amp; Redeploy&lt;br&gt;
If you make changes, rebuild, tag, and push new images:&lt;/p&gt;

&lt;p&gt;sh&lt;br&gt;
Copy&lt;br&gt;
Edit&lt;br&gt;
docker build -t vicmaich/tasks-app-backend:v2 ./backend&lt;br&gt;
docker build -t vicmaich/tasks-app-frontend:v2 ./frontend&lt;/p&gt;

&lt;p&gt;docker tag vicmaich/tasks-app-backend:v2 vicmaich/tasks-app-backend:latest&lt;br&gt;
docker tag vicmaich/tasks-app-frontend:v2 vicmaich/tasks-app-frontend:latest&lt;/p&gt;

&lt;p&gt;docker push vicmaich/tasks-app-backend:latest&lt;br&gt;
docker push vicmaich/tasks-app-frontend:latest&lt;br&gt;
Then, update the Render deployment to use the new image versions.&lt;/p&gt;

&lt;p&gt;🎉 Done!&lt;br&gt;
Your app is now fully Dockerized and hosted on Render. 🚀🔥&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
