Search code examples
jenkinsgitlablocalhostwebhooksgitlab-ci-runner

Sending gitlab webhooks from local instance of gitlab to local instance of jenkins


I have a local instance of Jenkins.

What i need isto launch a jenkins pipeline triggered by a local commit or push on a gitlab instance. For several reasons of testing, i need to keep all in localhost. So, what i'm struggling with is:

  1. It's possible to install a local instance of gitlab on windows 10 (I've heard about gitlab runner, could it be suitable for sending webhooks?)?

  2. How to set the webhooks from gitlab to my localhost jenkins? Thanks anyone


Solution

  • Following might help you.

    You need to integrate the Jenkins Job with the Gitlab Instance.

    1. In Gitlab Instance you have to activate the Jenkins Integration and
    2. Decide on the trigger you want to use to trigger the jenkins pipeline. (In my case only Push Trigger is active)

    Gitlab instance with Jenkins Integration

    Then you need to provide details

    1. Jenkins instance URL
    2. Jenkins Pipeline Job Name
    3. Authentication with a jenkins account user id and password.

    Jenkins Integration Settings

    Once you do this each you do the trigger action in the gitlab the pipeline will be triggered.