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.tar.gz (64.7 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-py3-none-any.whl (62.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gbp_webhook_playsound-1.0.tar.gz
  • Upload date:
  • Size: 64.7 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.tar.gz
Algorithm Hash digest
SHA256 d3420fe15a28481bb2adb41e6a086de5653e1bc0689ebe3c8363676bd5a0c3c5
MD5 fbde7c602dac668671cd3dfa240a15f8
BLAKE2b-256 0c79addd16c18c0b6ba65846b7ffc2b3940ac963f2b59686b83771b6ff99d87a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gbp_webhook_playsound-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 449171ba3a59202043355346b6e2d3c679258af06918ca12c64ece7bca33de19
MD5 9308dd262fbe29b74fae96700d9ca8e6
BLAKE2b-256 3f80acd7ba19fcf9864c2104a40a8ac1158b1baa57e0dcfd1bc533f8b11e9bc2

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