GitLab notifier config tool
CLI extension for Foliant to set up GitLab notifier config for the project.
Installation
$ pip install foliantcontrib.notifier
Usage
Note that to use this command you will have to specify valid config first!
Apply notifications for this repo:
$ foliant notifier setup
Disable notifications in this repo:
$ foliant notifier disable
Config
Before running notifier command you will have to supply valid config. Set it up under the notifier section in your foliant.yml.
In basic form notifier contents should be filled as explained in GitLab notifier Config section, for example:
notifier:
mail_config:
host: mail.example.com
port: 587
user: notifier@example.com
password: currently_stored_as_plain_text
projects:
test-project:
- match:
- test1.txt
- test/file1.txt
mailing_list:
- john@gmail.com
- sam@gmail.com
- mailing_list:
- sam@gmail.com
match:
- test1.txt
- test/*
ignore:
- file3.txt
mail_config — Credentials of the mail server account which will send the notifications.
projects — section, describing GitLab-projects which are being tracked.
test-project — name of the project. That one which you see in your browser address bar: gitlab.com/username/test-project. In our case this should be the name of our foliant-project in GitLab.
Next goes a list with tracking settings. Each group can have following sections:
mailing_list — list of email-addresses, which will receive notifications.
match — list of glob-like patterns. If files in the repository, which match these patterns, are changed, script will send notifications to the mailing_list, set up in this group.
ignore — list of glob-like patterns of files to ignore.
Additional options
Preprocessor also has some additional options which allow to tune its behavior:
notifier:
repo_url: 'https://gitlab.com/ddddsa/gitlab_notifier.git'
config: 'notifier_config.yml'
stage: 'notify'
job: 'notifier'
image: 'python:latest'
branches:
- 'develop'
python: 3
repo_url
: URL of the GitLab notifier script repository to be used.
config
: Name of the generated config file for the script.
stage
: Name of the stage to used in the job in .gitlab-ci.yml.
job
: Job name for the notifier in .gitlab-ci.yml.
image
: Name of the Docker image to be used to run the script. Default is python:latest. Set to empty string '' to use .gitlab-ci.yml global image.
branches
: List of branch names for which the notifications are enabled.
python
: Python version which is used in the Docker image which will run the script.
Metadata
Release files for foliantcontrib.notifier 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| foliantcontrib.notifier-1.0.0.tar.gz | 4.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| foliantcontrib.notifier-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.0 kB
Release files / foliantcontrib.notifier-1.0.0.tar.gz
| Download URL | foliantcontrib.notifier-1.0.0.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d867ca16e06df29b62407373b7eac914a91ec989050a2e46a12188ff66d00f91
|
|
BLAKE2b-256 checksum How to use checksums |
6d7e481c9288417ad8ab1efd6bbf9ff3189d546d1975e236d9d7182607b3aec6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.14.2 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.1
|
Release files / foliantcontrib.notifier-1.0.0-py3-none-any.whl
| Download URL | foliantcontrib.notifier-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
67a0bb369ca057cd4be56ea7dd8f3a229a0677b9157c51e0e13227ef03ff25ef
|
|
BLAKE2b-256 checksum How to use checksums |
23ba2ed99d9c873fee8ff54c699af0be423c7c74c16abfa8185baf84a41ee3df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.14.2 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.1
|