From 838fc1d0ec8d3c71a8df84f7e6481e5cc5412b75 Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Sat, 30 Mar 2019 18:58:10 -0500 Subject: [PATCH] Make Jenkins a connector. --- README.md | 8 ++++---- README.rst | 8 ++++---- lugito/connectors/jenkins.py | 9 +++++---- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 4a202d1..bac1b9c 100644 --- a/README.md +++ b/README.md @@ -33,10 +33,6 @@ rQTERMINALPACKAGING = qterminal rLXQTCONFIGPACKAGING = lxqt-config rNMTRAYPACKAGING = nm-tray -[jenkins] -site = https://ci.lubuntu.me -template_url = ssh://git@phab.lubuntu.me:2222/source/PACKAGE.git - [connector.irc] host = irc.freenode.net port = 6697 @@ -53,6 +49,10 @@ supported_versions = Bionic Xenial Trusty + +[connector.jenkins] +site = https://ci.lubuntu.me +template_url = ssh://git@phab.lubuntu.me:2222/source/package.git ``` Features diff --git a/README.rst b/README.rst index 531d910..1bafcd3 100644 --- a/README.rst +++ b/README.rst @@ -38,10 +38,6 @@ Temp - Example .lugitorc rLXQTCONFIGPACKAGING = lxqt-config rNMTRAYPACKAGING = nm-tray - [jenkins] - site = https://ci.lubuntu.me - template_url = ssh://git@phab.lubuntu.me:2222/source/PACKAGE.git - [connector.irc] host = irc.freenode.net port = 6697 @@ -59,6 +55,10 @@ Temp - Example .lugitorc Xenial Trusty + [connector.jenkins] + site = https://ci.lubuntu.me + template_url = ssh://git@phab.lubuntu.me:2222/source/PACKAGE.git + Features diff --git a/lugito/connectors/jenkins.py b/lugito/connectors/jenkins.py index 0fc8ee7..2d0ba73 100644 --- a/lugito/connectors/jenkins.py +++ b/lugito/connectors/jenkins.py @@ -19,7 +19,7 @@ import requests from string import Template -class launchpad(object): +class jenkins(object): def __init__(self, log_level=logging.DEBUG): @@ -35,9 +35,10 @@ class launchpad(object): ) # Jenkins info - self.jenkins_site = lugito.config.CONFIG['jenkins']['site'] - self.jenkins_trigger_url = lugito.config.CONFIG['jenkins']\ - ['template_url'] + self.jenkins_site = lugito.config.CONFIG['connectors']['jenkins']\ + ['site'] + self.jenkins_trigger_url = lugito.config.CONFIG['connectors']\ + ['jenkins']['template_url'] self.phab_host = lugito.config.CONFIG['phabricator']['host'].replace( 'api/', '')