Remote service trigger with mail
Project description
Mail Trigger
Requirements
- Python (3.7+)
- pip
- python-dev
Installation
On Ubuntu / Mint, install Mail Trigger with the following commands:
sudo apt update
sudo apt install python3-dev python3-pip python3-setuptools
sudo pip install mailtrigger
On OS X, install Mail Trigger via Homebrew (or via Linuxbrew on Linux):
TBD
On Windows, install Mail Trigger with the following commands:
pip install -U pywin32
pip install -U PyInstaller
pip install -Ur requirements.txt
pyinstaller --clean --name mailtrigger -F trigger.py
Updating
pip install mailtrigger --upgrade
Running
mailtrigger --mailer-config mailer.json --scheduler-config scheduler.json --trigger-config trigger.json
Settings
Mail Trigger parameters can be set in the directory config.
An example of configuration in mailer.json:
{
"pop3": {
"host": "pop.example.com",
"pass": "pass",
"port": 995,
"ssl": true,
"timeout": 10,
"user": "user"
},
"smtp": {
"host": "smtp.example.com",
"pass": "pass",
"port": 465,
"ssl": true,
"timeout": 10,
"user": "user"
}
}
An example of configuration in scheduler.json:
{
"interval": 30
}
An example of configuration in trigger.json:
{
"gerrit": {
"filter": [
{
"from": "name@example.com",
"subject": "[trigger]"
}
],
"server": [
{
"host": "localhost",
"port": 8080
}
]
},
"helper": {
"filter": [
{
"from": "name@example.com",
"subject": "[trigger]"
}
]
},
"jenkins": {
"filter": [
{
"from": "name@example.com",
"subject": "[trigger]"
}
],
"server": [
{
"host": "localhost",
"port": 8081
}
]
},
"jira": {
"filter": [
{
"from": "name@example.com",
"subject": "[trigger]"
}
],
"server": [
{
"host": "localhost",
"port": 8082
}
]
},
"printer": {
"file": "output.xlsx",
"filter": [
{
"from": "name@example.com",
"subject": ""
}
]
}
}
Usage
Subject
[trigger]: Write your description here
Note: [trigger]
is the reserved word in subject
Recipient
The recipient is mail receiver as Mail Trigger.
Content
Gerrit Trigger
@gerrit help
@gerrit list
@gerrit restart <host>
@gerrit start <host>
@gerrit stop <host>
@gerrit verify <host>
@gerrit review <host>:<port>
[--project <PROJECT> | -p <PROJECT>]
[--branch <BRANCH> | -b <BRANCH>]
[--message <MESSAGE> | -m <MESSAGE>]
[--notify <NOTIFYHANDLING> | -n <NOTIFYHANDLING>]
[--submit | -s]
[--abandon | --restore]
[--rebase]
[--move <BRANCH>]
[--publish]
[--json | -j]
[--delete]
[--verified <N>] [--code-review <N>]
[--label Label-Name=<N>]
[--tag TAG]
{COMMIT | CHANGEID,PATCHSET}
Jenkins Trigger
@jenkins build <host>:<port> JOB [--parameter <PARAMETER> | -p <PARAMETER>]
@jenkins help
@jenkins list
@jenkins list <host>:<port>
@jenkins query <host>:<port> JOB
@jenkins rebuild <host>:<port> JOB
@jenkins stop <host>:<port> JOB
@jenkins verify <host>:<port> JOB
Jira Trigger
TBD
Trigger Help
@help
License Apache
Project License can be found here.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mailtrigger-2.3.0.tar.gz
.
File metadata
- Download URL: mailtrigger-2.3.0.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b397e8643559dcab4c041bd5998b82ae15eef00e92dba13a780b8b7fcf5486ba |
|
MD5 | 56fe7429cd3e3d2cc3cf7b26ed9bfb3f |
|
BLAKE2b-256 | 57a2d8c721f20542789c3e2b0a186387896cef81afd64d9007072588df2f8c77 |
File details
Details for the file mailtrigger-2.3.0-py2.py3-none-any.whl
.
File metadata
- Download URL: mailtrigger-2.3.0-py2.py3-none-any.whl
- Upload date:
- Size: 19.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d87ae9e5d31ff3226da9c4c9e8eb93a430599859c4ca56be2d490f1f46f8cf05 |
|
MD5 | 48891723128f1a6d01abceb6ee22b400 |
|
BLAKE2b-256 | eaaaff7fd6ee85b4ffd7313fbacdfaa7c638a1724a347c0c19d500a3c51d2b7d |