Silencio!

This commit is contained in:
Raoul Snyman 2015-03-02 21:18:14 +02:00
parent ffb64f4a86
commit 38ff1b56b7

View File

@ -32,13 +32,14 @@ You probably want to create an alias. Add this to your ~/.bashrc file and then l
You can look up the token in the Branch-01-Pull job configuration or ask in IRC. You can look up the token in the Branch-01-Pull job configuration or ask in IRC.
""" """
from optparse import OptionParser
import re import re
from requests.exceptions import HTTPError
from subprocess import Popen, PIPE
import sys import sys
import time import time
from optparse import OptionParser
from subprocess import Popen, PIPE
import warnings
from requests.exceptions import HTTPError
from jenkins import Jenkins from jenkins import Jenkins
@ -47,6 +48,9 @@ REPO_REGEX = r'(.*/+)(~.*)'
# Allows us to black list token. So when we change the token, we can display a proper message to the user. # Allows us to black list token. So when we change the token, we can display a proper message to the user.
OLD_TOKENS = [] OLD_TOKENS = []
# Disable the InsecureRequestWarning we get from urllib3, because we're not verifying our own self-signed certificate
warnings.simplefilter('ignore')
class OpenLPJobs(object): class OpenLPJobs(object):
""" """
@ -98,8 +102,8 @@ class JenkinsTrigger(object):
# We just want the name (not the email). # We just want the name (not the email).
name = ' '.join(raw_output.decode().split()[:-1]) name = ' '.join(raw_output.decode().split()[:-1])
cause = 'Build triggered by %s (%s)' % (name, self.repo_name) cause = 'Build triggered by %s (%s)' % (name, self.repo_name)
self.jenkins_instance.job(OpenLPJobs.Branch_Pull).build( self.jenkins_instance.job(OpenLPJobs.Branch_Pull).build({'BRANCH_NAME': self.repo_name, 'cause': cause},
{'BRANCH_NAME': self.repo_name, 'cause': cause}, token=self.token) token=self.token)
def print_output(self): def print_output(self):
""" """