Skip to content

A python observer for jenkins jobs and publishing data to registered mediums

Notifications You must be signed in to change notification settings

trevormccasland/gate-observer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

db97b66 · Aug 4, 2018

History

15 Commits
Mar 26, 2018
Apr 24, 2018
Apr 11, 2018
Mar 26, 2018
Aug 4, 2018
Mar 26, 2018
Apr 24, 2018
Mar 26, 2018
Mar 23, 2018
Apr 10, 2018
Apr 11, 2018

Repository files navigation

Install

sudo -E pip install -r requirements.txt && sudo python setup.py install

Usage

gate-observer

Proxy

This project uses the requests module you can set these by setting the environment variables HTTP_PROXY and HTTPS_PROXY.

$ export HTTP_PROXY="http://10.10.1.10:3128"
$ export HTTPS_PROXY="http://10.10.1.10:1080"

$ python
>>> import requests
>>> requests.get('http://example.org')

http://docs.python-requests.org/en/master/user/advanced/#proxies

Config

gate-observer.conf

[default] log_file_name=etc/gate-observer.log log_level=10

[jenkins] host=localhost port=8080 user=admin password=admin job_names=test-job

test-job2 test-job3

publishers.conf

This assumes some server is listening to illustrate a chat bot example

[chat_bot] domain=chatbots.com port=123456 user=jenkins_chatbot password=<password> meeting_id=<chatroom_meeting_id>

Test Environment

  1. Use a jenkins container from https://github.com/jenkinsci/docker
  2. create jobs and put those names in your jenkins config section.
  3. start the program, start a build and you should see logging similar to:
INFO:/usr/local/lib/python2.7/dist-packages/gate_observer/publishers/chat_bot.pyc:Message 'build 9 for job test-job2 started' successfully sent to <interpolated uri> INFO:/usr/local/lib/python2.7/dist-packages/gate_observer/observer.pyc:(test-job2-thread) build 9 for job test-job2 stopped DEBUG:urllib3.connectionpool:<proxy> "POST <interpolated uri> HTTP/1.1" 200 None

About

A python observer for jenkins jobs and publishing data to registered mediums

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages