Jenkins Step-by-Step Guide on Crafting a Continuous Delivery and Deployment Pipeline
On-cloud7

On-cloud7 @oncloud7

About: Future engineer with a head in the cloud! ☁️ 4rd year ENTC student & coder, exploring the potential of cloud technologies to build innovative solutions.

Location:
pune
Joined:
Jul 29, 2023

Jenkins Step-by-Step Guide on Crafting a Continuous Delivery and Deployment Pipeline

Publish Date: Jul 10 '24
48 3

What is CI/CD?
CI/CD stands for Continuous Integration and Continuous Delivery (or Deployment). Continuous Integration is the practice of frequently merging code changes into a shared repository. It involves automating the build, unit testing, and code quality checks to detect issues early. Continuous Delivery focuses on automating the deployment process to make software releases ready for production at any time.

Image description

What Is a Build Job?
A Jenkins build job contains the configuration for automating a specific task or step in the application building process. These tasks include gathering dependencies, compiling, archiving, or transforming code, and testing and deploying code in different environments.

Jenkins supports several types of build jobs, such as freestyle projects, pipelines, multi-configuration projects, folders, multibranch pipelines, and organization folders.

What is Freestyle Projects ??
A Freestyle Project in Jenkins allows you to create a job without adhering to a strict pipeline structure. It provides a graphical user interface (GUI) where you can configure various build steps, triggers, post-build actions, and more. This approach is especially useful for projects that don't follow a standard build and deployment process or for teams that prefer a more manual and ad-hoc approach to setting up their automation tasks.

🔹Task-01
create a agent for your app. ( which you deployed from docker in earlier task

1.In your Jenkins instance, go to "Manage Jenkins" > "Nodes".

Image description

2.Click on "New Node" or "New Agent" to create a new agent.

Image description

3.Provide a name for the agent and select "Permanent Agent".

Image description

4.Configure the agent settings, such as the number of executors and remote root directory.

Image description

5.Optionally, configure labels to associate with this agent and select "Use WebSocket" Save the configuration.

Image description

6.the agent is created.

Image description

Create a new Jenkins freestyle project for your app.

1.From the Jenkins dashboard, click on "New Item" to create a new project.

Image description

2.Enter a project name and select "Freestyle project" Click "OK" to create the project.

Image description

In the "Build" section of the project, add a build step to run the "docker build" command to build the image for the container.

1.In the project configuration, navigate to the "Build" section.

Image description

2.Click on "Add build step" and select "Execute shell" (or the relevant option for your environment).

Image description

3.In the "Execute shell" build step, add the command to build the Docker image for your app. Replace with the actual directory of your app

Image description

4.Save the project configuration.

Image description

Comments 3 total

  • Martin Baun
    Martin BaunJul 11, 2024

    At its simplest, Jenkins is a great orchestration tool.
    Lovely writeup!

  • Carl Eliezer
    Carl EliezerSep 4, 2024

    I recently celebrated my university graduation and wanted to share my excitement with everyone here! I came across the fantastic content on this site and saw glowing reviews from others who had great experiences. I was introduced to SEVlaser, and I'm thrilled to book my session for Laser Hair Removal in Glendale as a special treat. The positive vibes and helpful feedback from previous clients made me want to share my own happy experience. Check it out! Laser Hair Removal in Glendale

Add comment