Webhooks

When you activate your repository Drone automatically add webhooks to your version control system (e.g. GitHub). There is no manual configuration required.

Webhooks are used to trigger pipeline executions. When you push code to your repository, open a pull request, or create a tag, your version control system will automatically send a webhook to Drone which will in turn trigger pipeline execution.

Required Permissions

The user who enables a repo in Drone must have Admin rights on that repo, so that Drone can add the webhook.

Note that manually creating webhooks yourself is not possible. This is because webhooks are signed using a per-repository secret key which is not exposed to end users.

Skip Commits

Drone gives the ability to skip individual commits by adding [CI SKIP] to the commit message. Note this is case-insensitive.

git commit -m "updated README [CI SKIP]"

Skip Branches

Drone gives the ability to skip commits based on the target branch. The below example will skip a commit when the target branch is not master.

pipeline:
  build:
    image: golang
    commands:
      - go build
      - go test

+branches: master

Example matching multiple target branches:

pipeline:
  build:
    image: golang
    commands:
      - go build
      - go test

+branches: [ master, develop ]

Example uses glob matching:

pipeline:
  build:
    image: golang
    commands:
      - go build
      - go test

+branches: [ master, feature/* ]

Example includes branches:

pipeline:
  build:
    image: golang
    commands:
      - go build
      - go test

+branches:
+  include: [ master, feature/* ]

Example excludes branches:

pipeline:
  build:
    image: golang
    commands:
      - go build
      - go test

+branches:
+  exclude: [ develop, feature/* ]

Questions?

We are always happy to help with questions you might have. Search our documentation or check out answers to common questions. You can also post questions or comments to our community forum.