"Jenkins Freestyle Deployment Project: Streamlining Your Software Delivery Process"

"Jenkins Freestyle Deployment Project: Streamlining Your Software Delivery Process"

Create a connection to your Jenkins job and your GitHub Repository via GitHub Integration:

1- Install Java and Jenkins in your server and set up the Jenkins admin configuration. And also install Docker and Docker-compose in the server as well because we will be building containers to run applications through Docker.

2- Click on create job and enter the name of the job and select freestyle project and click OK.

3- Next, the configuration settings will open and start setting up the configuration step by step. First, give a description of the project and select the GitHub project and give the GitHub URL.

You can use a copy of the code and push it to your GitHub repository because we will be needing access to the code to build the project. From we can copy the GitHub URL and also the Git clone URL

In the source code management in Jenkins: Select Git and add the git clone URL

Add the branch in which your GitHub code is built and pushed. As we can see in the GitHub repo screenshot our branch is "master"

Now it's an important step, for the deployment project - we need to add a GitHub hook. In the build triggers

4- Now, if we set our Jenkins server IP 8080 to just your local system, Then we have to add IP source to Anywhere- from our Instance security group- Inbound rules.

5- Now, copy the Jenkins IP address and Go to your GitHub code repository- then- go to settings- and select webhooks and add the Jenkins IP address with adding /github-webhook/ . Select just push events for now and Click add webhook. After that webhook will be added with a green tick. As shown in the images below:

6- Now again we have to add IP port 8000 because we are building the application on port 8000. We will add a port from again instance server security group -Inbound rules

7- Next, we will add syntax to the Jenkins configuration build steps- for Docker-compose. As we have the code in our GitHub. We have both the docker file and docker-compose yaml file. As We are building a deployment project - we need a docker-compose file.

This is the Docker-compose yaml file syntax.

8- Next is to save the configuration and click on build now- 1st build will be created and open a new tab with the server IP address with port 8000. Finally, the application is running.

9- Now is the most important part of the Delpoyment project as why this project is called a Delpoyment project. Let's see

1- we will go to our GitHub code and do some changes or updates: Here I changed the application name to "My Awesome todolists" And "DevOps Happy Learning". And we add or commit the changes in the code.

Now as soon as we commit the changes- the GitHub webhook triggers the changes and starts auto-build the 2nd build for the application. as seen in the image

The new update build is complete and changes are being seen in the application.

NOTE: When a developer pushes changes to a GitHub repository, GitHub sends a webhook to Jenkins, which in turn triggers the Jenkins build job for the Freestyle Deployment Project. The build job then executes the defined build and deployment steps.

This integration ensures that every time there is a new code change, Jenkins automatically triggers a building job, allowing developers to quickly detect issues and fix them. It also ensures that the software delivery process is automated, making it faster and more reliable.

Using a webhook with a Jenkins Freestyle Deployment Project and GitHub integration helps streamline the software delivery process by providing an automated pipeline that helps to reduce manual intervention and minimize error

Thank you for taking the time to read my blog. I hope you found it informative and helpful. If you have any feedback or questions, please don't hesitate to reach out to me. I appreciate your interest and support.

Linkedin: https://www.linkedin.com/in/amit-kumar-3576191b4/