Skip to main content

gbp-webhook to play a sound when a build is pulled

Project description

gbp-webhook-playsound

A gbp-webhook plugin to play a sound on your desktop on events. It currently reacts only to the build_pulled event (see gbp-notifications).

Installation

gbp-webhook-playsound requires gbp-webhook (which requires gbpcli). You should install gbp-webhook-playsound in the same (virtual) environment that you installed those two. For example:

$ pip install --user gbp-webhook-playsound

or

$ pipx inject gbpcli gbp-webhook-playsound

Usage

You should ensure that gbp-notifications is installed on the Gentoo Build Publisher server for which you want to subscribe and the webhook receiver is configured to receive build_pulled events:

On the server

# /etc/gbp-notifications.toml

[recipients]
laptop = { webhook = "https://laptop:5000/webhook|X-Pre-Shared-Key=foobar" }

[subscriptions]
babette = { build_pulled = ["laptop"] }

As gbp-webhook-playsound is a plugin for gbp-webhook, it is picked up automatically when that application is run (see the README for details). In order to be picked up it requires a restart of the gbp-webhook service. In systemd this means

$ systemctl restart --user gbp-webhook

Environment variables

Like gbp-webhook, gbp-webhook-playsound can be configured via environment variables. If you are using the (preferred) systemd integration, then they will be defined in ~/.config/gbp-webhook.conf. The following environment variables are recognized:

  • GBP_WEBHOOK_PLAYSOUND_BUILD_PULLED: If provided, uses the sound file in this variable to play instead of the default sound.
  • GBP_WEBHOOK_PLAYSOUND_PLAYER: The name/path to use to play the sound file. The default is "pw-play".

Audio Attribution

This project uses the "Level Up" audio file from Pixabay. The audio file is licensed under the Pixabay Content License, which allows for free use without attribution, but we still want to give credit to the creator.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gbp_webhook_playsound-1.0.1.tar.gz (64.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gbp_webhook_playsound-1.0.1-py3-none-any.whl (62.4 kB view details)

Uploaded Python 3

File details

Details for the file gbp_webhook_playsound-1.0.1.tar.gz.

File metadata

  • Download URL: gbp_webhook_playsound-1.0.1.tar.gz
  • Upload date:
  • Size: 64.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for gbp_webhook_playsound-1.0.1.tar.gz
Algorithm Hash digest
SHA256 35c3e73d06efc47eed7d32b35fa1ef87d90bed6f4df4299b63104822486bc39d
MD5 c94a39c5c554dfafe14f53eeb7ad079b
BLAKE2b-256 1f28fde4046d8b394de49d9e2a8f95a57f34f249fbc5b8cdf9b7ab14e842d643

See more details on using hashes here.

File details

Details for the file gbp_webhook_playsound-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for gbp_webhook_playsound-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 259d54e7e29ecbaf63225042098e93ec55f05165e06ebfc7adf776330bc5b3db
MD5 a09c52bef37dd6cbd72795deb4c4d787
BLAKE2b-256 0fc27393547d3736094b3859442ad3b8fa09dbe39b6c2d87d583f1f47f3382aa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page