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

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


Discover more from Coursity

Subscribe to get the latest posts sent to your email.

Leave a Comment

Your email address will not be published. Required fields are marked *

Discover more from Coursity

Subscribe now to keep reading and get access to the full archive.

Continue reading

Scroll to Top