1. Overview
  2. Docs
Watches GitLab pipelines and notifies on status updates using 'send-notify'

Install

dune-project
 Dependency

Authors

Maintainers

Sources

gitlab_pipeline_notifier-v0.1.tar.gz
md5=6e9671e91dab6f217a1bd6bbdd22e0df
sha512=66fe2405aff4690f8abd7c9958eda92b175342d4d52ce06db095e8f1016691667375d5e9f36c6de92c377106a411c80a2913b47d053577fae2f0c1d6607ad3f7

Description

Watches new pipelines in a specified set of GitLab projects and notifies the user on updates using 'send-notify'.

Tags

topics gitlab

Added to opam-repository:

README

gitlab-pipeline-notifier watches the pipelines in the specified projects periodically (by default, every minute), optionally belonging to the specified user, for status updates. It sends a notification using 'notify-send' when:

  • pipelines that start running
  • pipelines that terminate with success or failure.
A screenshot of GitLab Pipeline Notifier

Installation

From sources using opam

opam switch create . 4.14.0
opam install dune . --deps-only
dune build

Usage

Usage: dune exec bin/main.exe -- [options]

Starting in the background on startup

See the script scripts/gitlab-pipeline-notifier.sh. This starts the notifier in a detached tmux session. Run this script on startup (using e.g. startup for Ubuntu). You can now attach to the notifier session by issuing:

tmux attach-session -t gitlab-pipeline-notifier

Configuration file

In addition to options below, gitlab-pipeline-notifier can be configured in the gl-cfg.json in current working directory. Here's an annotated example;

{
    // A GitLab personal access token, which must be provided either on the
    // command line or here
    "gitlab-token": "glpat-...",
    // A list of project references. Projects can be referred to either by their
    // short id ('[NAMESPACE]/[PROJECT_NAME]') or by their numeric project id.
    "projects": [
        9487506,
        "tezos/tezos",
        "tezos/opam-repository",
        "tezos/teci",
        "tezos/tezos-sw-metrics"
    ]
}

Both keys gitlab-token and projects are optional. Command-line arguments take precedence over the configuration file.

Options

Options are:

  • -i Set log level info (default).
  • -v Set log level debug.
  • -s Set log level to error.
  • --username <TOKEN> GitLab username.
  • --interval <SECONDS> Polling interval. Default, 60.000000.
  • -t <SECONDS> same as --interval.
  • --private-token <TOKEN> GitLab private token.
  • --projects <PROJECT_ID> GitLab project reference: either a project id or a namespace/name short ref.
  • -help Display this list of options
  • --help Display this list of options

Dependencies (6)

  1. ISO8601
  2. gitlab-unix >= "0.1.5"
  3. gitlab >= "0.1.5"
  4. lwt >= "5.6.0"
  5. dune >= "3.0"
  6. ocaml

Dev Dependencies (1)

  1. odoc with-doc

Optional Dependencies

None

Used by

None

Conflicts

None

Build status

Results of building gitlab_pipeline_notifier with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
0.1 (this version) good good good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure