βš™οΈ
DevOps Mastery on AWS
  • πŸ€“Continuous Integration & Continuous Deployment on AWS Cloud
  • πŸ€–Jenkins
    • πŸ› οΈBuild Jenkins First Job
    • 🦸Launch 2nd EC2 instance
  • 🐳Docker
    • πŸ“DOCKERFILE
  • πŸ›ΊAnsible
    • πŸ“–Ansible Playbook
  • πŸƒβ€β™‚οΈContinuos Integration with GitHub and Jenkins
  • πŸ‘·Project Structure & summary.
  • Basics
Powered by GitBook
On this page

Continuos Integration with GitHub and Jenkins

Everytime your developer makes changes to the code in Github Repository will you login to Jenkins and click "Build Now" all the time??

PreviousAnsible PlaybookNextProject Structure & summary.

Last updated 3 years ago

In previous section we have successfully created Ansible playbook and automatically deployed our application on Tomcat server but we have to click everytime we wanted a build file.

What if I say we can automate that too! Let us do something so that if there is any change in the code Jenkins should detect it and Build new file, pass it to ANSIBLE, which will create our container and move the file in it & BOOM!!! our application is live.

  1. Sign into your GitHub account and select your repository

  2. Go to settings option >> Choose >> click on Add Webhook (provide password, if asked)

  3. You will be asked to enter Payload URL, you will get this from Jenkins.

    1. Login to Jenkins

      1. Manage Jenkins >> Configure system

      2. Search for "GitHub" >> Click on Advanced and tick the "specify another hook URL for GitHub Configuration" >> Copy the link and paste it in Github Payload URL section.

    2. After putting the url scroll down and select on

    3. Add webhook

You have successfully created your webhooks Now go to your Depoyment Job and do these settings

  1. Select your Job>> Configure.

  2. In build section tick the GitHub hook trigger option and APPLY & Save

THAT'S ALL!! We have successfully implemented Continuos Integration Let's Try it out my making some changes in the code.

I wil change the background color from green to blue and let's see if JENKINS can detect and build it or not!!

Hooray!! We have Completed our project "Learn DevOps on AWS - using GIT, Maven, Jenkins, Docker and Ansible. "

πŸƒβ€β™‚οΈ
☺️