Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to configure git post commit hook?



How to configure git post commit hook?..

Answer / Anita

To configure a Git post-commit hook in Jenkins, follow these steps:n1. Navigate to the repository on your local machine and create a new file called 'post-commit' without any extension.n2. Open the file with a text editor and paste the following command: curl -X POST --data 'token=YOUR_JENKINS_TOKEN' https://YOUR_JENKINS_URL/github-webhook/n3. Replace 'YOUR_JENKINS_TOKEN' with your Jenkins API token and 'YOUR_JENKINS_URL' with the URL of your Jenkins instance.n4. Save the file, make it executable (chmod +x post-commit), and add it to the Git repository.n5. Push the changes to the repository to trigger the hook.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Jenkins Interview Questions

What are the various ways in which the build can be scheduled in jenkins?

1 Answers  


Let us say, you have a pipeline. The first job was successful, but the second failed. What should you do next?

1 Answers  


Can you define a continuous delivery workflow?

1 Answers  


What is the tool used for provisioning and configuration?

1 Answers  


What is continuous integration and deployment?

1 Answers  


What are the pre-requisites for using jenkins?

1 Answers  


What are the types of pipelines in jenkins?

1 Answers  


How to trigger a build remotely from jenkins?

1 Answers  


Name a jenkins environment variable you have used in a shell script or batch file.

1 Answers  


What is the solution if you find a broken build for your project?

1 Answers  


what are the commands you can use to start Jenkins manually?

1 Answers  


How do you define parameters for a build in jenkins?

1 Answers  


Categories