from glob import glob
from logging import Formatter
import kernel_persistence
+import urllib
+
+JOB_URL = 'http://rwittler:MiMaMopel@jenkins:80/job/%(flavour)s-source/buildWithParameters?'
+JOB_DELAY = '0sec'
CWD = os.environ.get('WORKSPACE')
BUILD_NUMBER = os.environ.get('BUILD_NUMBER')
new_version, 'kernel_inpbuilder.py',
dist='stable'):
exit_error()
+
+ # trigger source build
+ logger.info('Triggering source build now')
+ flavour=GIT_REPO_NAME[6:-4]
+ urlencode_expansion_dict = {
+ 'flavour': 'linux-%s' % flavour
+ }
+ url = HudsonUrl()
+ data = urllib.urlencode(
+ (
+ ('GIT_REPO_PATH', GIT_REPO_PATH),
+ ('DISTRIBUTION', pb_suite),
+ ('delay', JOB_DELAY)
+ )
+ )
+ ret = url.open(JOB_URL %(urlencode_expansion_dict) + '%s' %(data))
+
+ if ret.code == 200:
+ logger.info('jenkins url called successfully.')
+ else:
+ logger.info('URL was %s' % JOB_URL %(urlencode_expansion_dict) + '%s' %(data))
+ logger.info('jenkins sends the following: %s' %(ret.read()) )
+ exit_error()
+
exit_ok()