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:
apt update
apt install python3-dev python3-pip python3-setuptools
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 --auther-config auther.json --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 auther.json:
{
"group": {
"default": [
"name@example.com"
],
"ldap/name": "true"
},
"message": {
"subject": "[trigger]"
},
"provider": {
"ldap": {
"base": "base",
"host": "localhost",
"pass": "pass",
"port": 389,
"user": "user"
}
}
}
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": {
"server": [
{
"host": "localhost",
"pass": "pass",
"port": 8080,
"user": "user"
}
]
},
"jenkins": {
"server": [
{
"host": "localhost",
"pass": "pass",
"port": 8081,
"user": "user"
}
]
},
"printer": {
"file": "output.xlsx",
}
}
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 abandon <host> <changenumber>
@gerrit help
@gerrit list
@gerrit query <host> <changenumber>
@gerrit rebase <host> <changenumber>
@gerrit restart <host>
@gerrit restore <host> <changenumber>
@gerrit review <host> <changenumber>
@gerrit reviewer <host> <changenumber> [add|remove] <reviewer>
@gerrit start <host>
@gerrit stop <host>
@gerrit submit <host> <changenumber>
@gerrit version <host>
Jenkins 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
mailtrigger-4.0.0.tar.gz
(15.5 kB
view hashes)
Built Distribution
Close
Hashes for mailtrigger-4.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8053ab615f0cf354152cd96a6596e9dbca39034a393797467fd36d1aeca800bb |
|
MD5 | 24c86d46cff9bc034bc3bb5cbf57a536 |
|
BLAKE2b-256 | 713f0630e84fc7df12f9eb1d5c2528b4430518cd68ea040f92d46bdf3dcbe625 |