Skip to main content

Remote service trigger with mail

Project description

Mail Trigger

PyPI Travis Coverage License

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 pip3 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:

pip3 install -U pywin32
pip3 install -U PyInstaller
pip3 install -Ur requirements.txt

pyinstaller --clean --name mailtrigger -F trigger.py

Updating

pip3 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,
    "user": "user"
  },
  "smtp": {
    "host": "smtp.example.com",
    "pass": "pass",
    "port": 465,
    "ssl": true,
    "user": "user"
  }
}

An example of configuration in scheduler.json:

{
  "interval": 10
}

An example of configuration in trigger.json:

{
  "gerrit": {
    "host": "localhost",
    "port": 8080
  },
  "jenkins": {
    "host": "localhost",
    "port": 8081
  },
  "jira": {
    "host": "localhost",
    "port": 8082
  }
}

Usage

Title

[trigger]: Write your description here

Note: [trigger] is the reserved word in title

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mailtrigger-1.0.3.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

mailtrigger-1.0.3-py2.py3-none-any.whl (16.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file mailtrigger-1.0.3.tar.gz.

File metadata

  • Download URL: mailtrigger-1.0.3.tar.gz
  • Upload date:
  • Size: 13.3 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.1 CPython/3.6.8

File hashes

Hashes for mailtrigger-1.0.3.tar.gz
Algorithm Hash digest
SHA256 13ee33b1124f9bafb7c232ab3f1d20c1883cb6e4eadc3e0753660b3ffde5234d
MD5 7a2ca05dc15fcae5cbc6634811ab6f99
BLAKE2b-256 d6fb8727428547b7d1b57e5b31811caf19c496d014570e8ceef34fa4bf9fe880

See more details on using hashes here.

File details

Details for the file mailtrigger-1.0.3-py2.py3-none-any.whl.

File metadata

  • Download URL: mailtrigger-1.0.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 16.4 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.1 CPython/3.6.8

File hashes

Hashes for mailtrigger-1.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 80b1860544b170869f22a87a149f786c95d89f8ee75eb3db684203ca6d1f8466
MD5 c1365e9390af49c6fce4a47456bf1460
BLAKE2b-256 067c431d4886abb487e6bad8e1d01c17283a5587d843737c75dd4e9ea90acded

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page