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 postpull 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 postpull events:

On the server

# /etc/gbp-notifications.toml

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

[subscriptions]
babette = { postpull = ["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_POSTPULL: 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.2.tar.gz (64.5 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.2-py3-none-any.whl (62.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gbp_webhook_playsound-1.0.2.tar.gz
  • Upload date:
  • Size: 64.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for gbp_webhook_playsound-1.0.2.tar.gz
Algorithm Hash digest
SHA256 29369708c50f2896000aacae0757065cda55bd5ffd8eccff3d0168a017637c0b
MD5 044fd945a4521c0461fec11d630e9857
BLAKE2b-256 3174b5535f5900cddc5dbe1c99f489b716e25933635a80626201c555434cd52d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbp_webhook_playsound-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ea8474a6694517d8654775641a68bcbd8fb8b993e12cd13da8be10e7521c6d97
MD5 74cda85b1eed2813e9c4f1d63f66ad0d
BLAKE2b-256 efdfe14b3f3f10c983e888b2ef7575cb3307f5384be09bb3d093c9ddf6cb14b5

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