{% extends "coprs/detail/settings.html" %} {% from "_helpers.html" import render_field, render_form_errors, copr_url %} {% set selected_monitor_tab = "integrations" %} {%block settings_breadcrumb %}Integrations{% endblock %} {% block tab_content %}

Integrations

Setup an integration with a Git hosting website and get Copr build statuses reported in pull requests and commits.

Simple guide:

  1. Create an scm package and set its default source by specifying an https:// "Clone URL".
  2. Make sure the package auto-rebuild option is checked.
  3. Finish it by following the Git host specific guide below.

Copr will now rebuild the package every time, it receives an update event - usually for every new commit, every new tag, or every opened pull request.

If valid credentials for a source repository are entered below, Copr will report back build results for a particular pull request or commit. Only one source repository at time can be set for pull request and commit flagging.

Pagure

  1. Activate Fedmsg in section 'Hooks' in the Pagure project settings.

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.

To enable commit and pull request flagging, enter a Pagure public clone repo URL and an associated API key below. To create a new key, go to your Pagure project settings and find section "API keys".

{{ pagure_form.csrf_token }}
{{ render_form_errors(pagure_form) }}

Github

{{ github_url }}

How to use it:

  1. In your GitHub project, go to Settings / integrations 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 / integrations / 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/Bitbucket 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 %}