Jenkins Configuration Gogs Webhook Plugin

Source: Internet
Author: User
Tags webhook

Objective

When we used the Jenkins collection gogs for continuous integration, Jenkins timed to detect if the Git repository was updated to determine whether to build. That is, we submit the code Jenkins does not immediately know, then we can solve by Webhook. Jenkins plug-in center already has the support to Gogs, really is very praise.

Https://plugins.jenkins.io/gogs-webhook

Installing the Gogs Webhook plugin

Open System Management--management plug-in, optional plug-in, enter "Gogs" in the input box in the upper-right corner to filter the plugin:

Configuring in Gogs
    1. Go to our warehouse and click Warehouse Settings

2. Add Webhook

Click Manage Web hooks, add Web hooks, select Gogs

Add the following configuration:

The format of the push address is:http(s)://<你的Jenkins地址>/gogs-webhook/?job=<你的Jenkins任务名>

3. Configure Jenkins

Go to the main panel and click on our task:

Select the configuration:

Choose Gogs Webhook to configure it according to your needs, if you do not set the key then nothing moves.

Test

We go back to Gogs, click on Push test, push success will see a push record

Back to our Jenkins you can see that a build has been successfully made:

Jenkins Configuration Gogs Webhook Plugin

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.