Skipping Builds

by bradrydzewski

You can instruct Drone to skip individual commits by including [CI SKIP] or [SKIP CI] in the commit message. Note this is case-insensitive.

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

You can also instruct Drone to skip commits based on the target branch. The below example instructs Drone to skip commits 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/* ]