Complete Jenkins CI/CD Project (Day -23,24 Task)

Complete Jenkins CI/CD Project (Day -23,24 Task)

Jenkins: Empowering Continuous Integration and Continuous Delivery.

ยท

3 min read

Table of contents

What is CI/CD?

  • CI or Continuous Integration is the practice of automating the integration of code changes from multiple developers into a single codebase. It is a software development practice where the developers commit their work frequently into the central code repository (Github or Stash). Then there are automated tools that build the newly committed code and do a code review, etc as required upon integration. The key goals of Continuous Integration are to find and address bugs quicker, make the process of integrating code across a team of developers easier, improve software quality and reduce the time it takes to release new feature updates.

  • CD or Continuous Delivery is carried out after Continuous Integration to make sure that we can release new changes to our customers quickly in an error-free way. This includes running integration and regression tests in the staging area (similar to the production environment) so that the final release is not broken in production. It ensures to automate the release process so that we have a release-ready product at all times and we can deploy our application at any point in time.

Task-01

  • Fork github.com/LondheShubham153/node-todo-cicd... repository.

  • Create a connection to your Jenkins job and your GitHub Repository via GitHub Integration.
    To generate the SHH key for integration use the shh-keygen command for public and private keys.

    To create a Public key we have to use cat /home/ubuntu/.ssh/id_rsa.pub

    To configure the GitHub Goto account setting < SHH and GPG keys and paste the ssh-rsa key here.

  • Read About GitHub WebHooks and make sure you have a CICD setup.

    For webhook goto to github repo's setting < Webhooks and add webhook

    Webhook services

    To install GitHub integration plugins go to the Jenkins dashboard > Manage Jenkins > Plugins

  • To create a new job with freestyle project.

    Add git repo for clone

  • https://github.com/niluflip/node-todo-cicd.git

    Select Git and Add a private key to git credentials

Task-02

  • In the Execute shell run the application using Docker compose

  • You will have to make a Docker Compose file for this Project

  • Run the project and give yourself a treat

  • Webhook Triggered as we got the green tick on webhook services

    The below build is automatic as we change something in the project after the commit changes build started.

    As shown below Started by GitHub push by GitHub username

In brief, the GitHub-Jenkins webhook integration for CI/CD synergizes version control and automation, expediting development cycles and elevating code quality. This fusion enhances collaboration, delivering efficient and reliable application deployment. Leveraging this integration is pivotal for modern software development, enabling agile and effective practices.

Happy Learning :)

If you find my blog valuable, I invite you to like, share, and join the discussion. Your feedback is immensely cherished as it fuels continuous improvement. Let's embark on this transformative DevOps adventure together! ๐Ÿš€ #devops #90daysofdevop #git&github #jenkins

ย