Zarthus / gocd-webhook-notification-plugin

HTTP webhook notification plugin for GoCD

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Webhook notification plugin for GoCD

This is a plugin based on the notifications-skeleton to notify remote webhooks of changes to build stages and build agents. Each webhook will receive the change notification as a HTTP/JSON POST message.

Download

You can download the latest release of this plugin from here.

Configuration

The configuration for this plugin is expected to be in Java Properties format.

This plugin searches for the configuration file in the following order:

  1. File defined by the environment variable WEBHOOK_NOTIFY_CONFIG.
  2. webhook_notify.properties at the user's home directory. Typically it's the go user's home directory (/var/go).
  3. webhook_notify.properties present at the CRUISE_SERVER_DIR environment variable location.

You can find the details on where and how to setup environment variables for GoCD here.

Minimalistic configuration would be something like:

stage.status.endpoint.1=http://example.com/stage/alpha
stage.status.endpoint.2=http://example.com/stage/beta

agent.status.endpoint.1=http://example.com/agent/alpha
agent.status.endpoint.2=http://example.com/agent/beta

# This is useful in environments where the endpoints can be completely trusted.
# It is a terrible idea to use this to connect to public HTTPS endpoints.
# Set this to true at your own risk.
trust.all.https=false

You don't need to configure any agent or stage webhooks/endpoints, or provide any other settings, but a configuration file must be present for the plugin to not spew errors into GoCD's logs. Please note that you do not need to restart the GoCD server when you update this file, it will be reloaded automatically within 10 seconds of the update.

Building the code base

To build the jar run make build.

About

HTTP webhook notification plugin for GoCD

License:Apache License 2.0


Languages

Language:Java 99.0%Language:Makefile 0.7%Language:HTML 0.3%