Freight-hub

Building Continuous Integration with Jenkins: Case Study and Implementation Steps

Nita Septiani – Devs Ops Freight-hub


This article aims to provide an analysis of Jenkins, a tool that devops engineers frequently use to facilitate the seamless distribution of software to end users. There will be an introduction to Jenkins, a clear illustration to aid comprehension, and a case study with thorough implementation instructions.

To commence, consider a basic depiction of Jenkins:

Let’s imagine Jenkins as an automated chef in a software development restaurant, Jenkins is like a skilled chef, ensuring every dish (code change) is processed quickly, consistently, and meets quality standards (CI/CD). This is why Jenkins is very important for serving high quality dishes (applications) to customers (end users), so that when there are coding changes from developers, whether it’s functions, features or whatever, Jenkins will automatically pick up those changes.

Other illustrations:

For example, when sending goods from location A to location B (destination) it is estimated that it will take around 3 hours, and after the goods arrive and it takes more than 1 day for the owner of the goods to receive no update confirmation in the application that the goods sent have reached their destination, the system will automatically update by changing the status to delivery complete. Well, we can manage this without having to monitor continuously, but we can use automation carried out by the Jenkins CI/CD pipeline which can be applied repeatedly and run automatically according to a schedule, so all we have to do is configure and set the schedule then Jenkins will run carry out orders and according to the schedule implemented.

What Exactly Is Jenkins?

Jenkins is an open-source automation application that has been specifically developed to streamline the software development lifecycle by enabling Continuous Integration (CI) and Continuous Deployment (CD). Jenkins facilitates the automation of multiple phases for development teams, including build, test, and delivery. This ensures that code modifications are consistently integrated and implemented. (As a result, removing duplicates and other similar occurrences will prevent errors caused by discrepancies between the recently updated code and the earlier code.)

Developing scheduled automation tasks in Jenkins: A Case Study

FreightHub’s development team, for instance, modifies their code to accommodate the most recent technological developments. Automating duties is desired by developers in order to guarantee that any modifications they make are capable of being deployed to the target environment.

This case study demonstrates how Jenkins can be leveraged to implement an automation schedule, allowing tasks to be executed continuously and according to a schedule. The stages are as follows:

Jenkins Configuration:

  • Jenkins should be downloaded and installed on the server or local computer
  • Utilize a web browser to access Jenkins and execute rudimentary configuration tasks.
  • The instructions for installing Jenkins on Linux can be found athttps://www.jenkins.io/doc/book/installing/linux/ on the official Jenkins website.

Job Creation:

  • Enter project name for example, “automation-deploy.”
  • Select freestyle Project ” as the project type

Job Configuration

  • On the project configuration page, you will see a number of option. in the build section , clik the ” add post -build action” button
  • Select ” Send build artifact over SSH” and add exec command
  • On the left click Manage Jenkins then select System Configuration.
  • and add your server IP address and credentials.

Set Scheduling:

  • On the project configuration page, drop down until you find the “Build Triggers” section. Check the “Build periodically” box.

Explanation:

H avoids concurrent scheduling

The first number (2) is the hour (in 24 hour format).

The asterisk (*) in the remaining positions means daily, monthly.

You can adjust the cron expression according to your schedule needs. If you are confused about using the clock in crontab, you can visit the website https://crontab.guru/

Save the Configuration

• Click “Save” to save your project configuration, and your job will run according to the time you specified and carry out the tasks as you ordered.

Conclution

By using one of the tools, namely Jenkins, Freighthub can guarantee that every feature or change in their application can be tested, built and distributed to the destination environment with high efficiency, not only increasing the speed of delivering features to end users but also minimizing the risk of errors. optimize resources, and improve the overall quality of their software development.

Scroll to Top