# 🏃‍♂️Continuous Integration with GitHub and Jenkins

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 a 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 ![](https://nasi-chaudari.gitbook.io/~gitbook/image?url=https:%2F%2F2593464885-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F3DMI85ymmo2BqduKTK9p%252Fuploads%252FQyAw823VfEoMDdAR3V7O%252Fimage.png%3Falt=media%26token=6c121d1e-06da-42a3-8762-0b52f3272561\&width=300\&dpr=4\&quality=100\&sign=9887c007bc5d9d833a0e8b77f539577f49ae20235e91aa50c7dd142a115b0eec)>> click on Add Webhook (provide password, if asked)
3. You will be asked to enter the **Payload** URL, you will get this from Jenkins.

   1. Login to Jenkins

      1. Goto pipeline >> Configure
      2. Pipeline Triggers>> copy the formate >> made the required changes&#x20;

      <figure><img src="https://475494772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7eqNZUv00oKWb5vIK8tA%2Fuploads%2FkuqdGZtJ0HkWgXvuGmTx%2FScreenshot%202024-04-19%20161517.png?alt=media&#x26;token=098fafe8-1863-405c-8487-c7032fc562c5" alt=""><figcaption></figcaption></figure>

      1. Add webhook>> Paste the URL

      <figure><img src="https://475494772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7eqNZUv00oKWb5vIK8tA%2Fuploads%2F5QkxWs65Sa3cP4zYnRnw%2FScreenshot%202024-04-19%20161445.png?alt=media&#x26;token=f67ca26d-6413-403f-b51f-aec54d22fbb8" alt=""><figcaption></figcaption></figure>

   After putting the url scroll down and select on

   1. ![](https://nasi-chaudari.gitbook.io/~gitbook/image?url=https:%2F%2F2593464885-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F3DMI85ymmo2BqduKTK9p%252Fuploads%252FO6gYz7rqDHx6jOBqZf00%252Fimage.png%3Falt=media%26token=c5b5cdda-e71f-4d4e-ae0e-caf92d4c0ea7\&width=300\&dpr=4\&quality=100\&sign=4a746b37a28b7042e2b0af8e512333e879516b4c3afe123a332bba0f6657aa96)
   2. Add webhook

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

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

[<br>](https://nasi-chaudari.gitbook.io/devops-on-aws/ansible/ansible-playbook)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lakshya-project.gitbook.io/microservice-project/continuous-integration-with-github-and-jenkins.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
