{% extends "coprs/detail/settings.html" %} {% set selected_monitor_tab = "webhooks" %} {%block settings_breadcrumb %}Webhooks{% endblock %} {% block tab_content %}

Webhooks

You can set up automatic builds of your packages coming from Pagure and Github repositories.

  1. Set a default source of a package in this project.
  2. Enable automatic rebuilds for the package.
  3. Finish it by following the SCM host specific guide below.

Copr will now rebuild the package every time it receives the webhook call - usually with every commit or every tag.

Pagure

How to use it:

  1. Activate Fedmsg in section 'Hooks' in the project settings.
  2. That's it.

Note, don’t get confused by “Activate fedmsg notifications” in the “Project options” section; that’s only for Pagure UI-related actions. Scroll down until you reach the “Hooks” section.

Github

{{ github_url }}

How to use it:

  1. In your GitHub project, go to Settings / Webhooks and services.
  2. Click on the Add webhook button.
  3. Fill in the Payload URL field with the url above.
  4. Select application/json as the content type.
  5. Click the Add webhook button.

Gitlab

{{ gitlab_url }}

How to use it:

  1. In your Gitlab project, go to Settings / Integrations.
  2. Fill in the URL field with the url above.
  3. Select Push events and Tag push events as event triggers.
  4. Click the Add webhook button.

Bitbucket

{{ bitbucket_url }}

How to use it:

  1. In your Bitbucket project, go to Settings / Workflow / Webhooks / Add webhook.
  2. Name the hook, e.g., “Copr”.
  3. Fill in the URL field with the url above.
  4. Select to trigger on Repository Push.
  5. Click the Save button.

Custom webhook

{{ custom_url }}

How to use it:

Use the GitLab/GitHub steps above (when needed), or simply

$ curl -X POST {{ custom_url }}
Note that the package of name 'PACKAGE_NAME' must exist within this project, and that the 'POST' http method must be specified.

{% endblock %}