Drone plugin for triggering webhook notifications
Go to file
Thomas Boerger c7566b7ae6
Switched to 0.5 build process
2016-06-15 14:30:04 +02:00
vendor Added vendoring for reproducable builds 2016-06-15 14:29:19 +02:00
.drone.yml Switched to 0.5 build process 2016-06-15 14:30:04 +02:00
.drone.yml.sig Switched to 0.5 build process 2016-06-15 14:30:04 +02:00
.gitignore Updated gitignore to respect also coverage.out 2016-02-21 11:38:18 +01:00
DOCS.md Add support for `skip_verify` in drone-webhook 2016-05-11 16:03:40 -06:00
Dockerfile Switched to 3.3 base image, documented docker make task 2016-01-01 12:47:20 +01:00
LICENSE Fixed license styling 2016-01-01 12:47:38 +01:00
MAINTAINERS Updated maintainers file, added names and athieriot 2016-02-21 11:20:01 +01:00
Makefile Make the builds reproducable based on commit sha 2016-02-21 11:06:41 +01:00
README.md Reference to DOCS.md from README.md for usage information 2016-02-21 12:30:26 +01:00
logo.svg initial support for webhooks 2015-11-03 11:31:25 -08:00
main.go Add support for `skip_verify` in drone-webhook 2016-05-11 16:03:40 -06:00
types.go Add support for `skip_verify` in drone-webhook 2016-05-11 16:03:40 -06:00
vendor.yml Added vendoring for reproducable builds 2016-06-15 14:29:19 +02:00

README.md

drone-webhook

Build Status Coverage Status

Drone plugin to send build status notifications via Webhook. For the usage information and a listing of the available options please take a look at the docs.

Binary

Build the binary using make:

make deps build

Example

./drone-webhook <<EOF
{
    "repo": {
        "clone_url": "git://github.com/drone/drone",
        "owner": "drone",
        "name": "drone",
        "full_name": "drone/drone"
    },
    "system": {
        "link_url": "https://beta.drone.io"
    },
    "build": {
        "number": 22,
        "status": "success",
        "started_at": 1421029603,
        "finished_at": 1421029813,
        "message": "Update the Readme",
        "author": "johnsmith",
        "author_email": "john.smith@gmail.com"
        "event": "push",
        "branch": "master",
        "commit": "436b7a6e2abaddfd35740527353e78a227ddcb2c",
        "ref": "refs/heads/master"
    },
    "workspace": {
        "root": "/drone/src",
        "path": "/drone/src/github.com/drone/drone"
    },
    "vargs": {
        "urls": [
            "https://your.webhook/..."
        ],
        "debug": true,
        "auth": {
            "username": "johnsmith",
            "password": "secretPass"
        },
        "method": "POST",
        "template": "{\"git_branch\": \"{{ .Build.Branch }}\"}",
        "content_type": "application/json"
    }
}
EOF

Docker

Build the container using make:

make deps docker

Example

docker run -i plugins/drone-webhook <<EOF
{
    "repo": {
        "clone_url": "git://github.com/drone/drone",
        "owner": "drone",
        "name": "drone",
        "full_name": "drone/drone"
    },
    "system": {
        "link_url": "https://beta.drone.io"
    },
    "build": {
        "number": 22,
        "status": "success",
        "started_at": 1421029603,
        "finished_at": 1421029813,
        "message": "Update the Readme",
        "author": "johnsmith",
        "author_email": "john.smith@gmail.com"
        "event": "push",
        "branch": "master",
        "commit": "436b7a6e2abaddfd35740527353e78a227ddcb2c",
        "ref": "refs/heads/master"
    },
    "workspace": {
        "root": "/drone/src",
        "path": "/drone/src/github.com/drone/drone"
    },
    "vargs": {
        "urls": [
            "https://your.webhook/..."
        ],
        "debug": true,
        "auth": {
            "username": "johnsmith",
            "password": "secretPass"
        },
        "method": "POST",
        "template": "{\"git_branch\": \"{{ .Build.Branch }}\"}",
        "content_type": "application/json"
    }
}
EOF