from glob import glob
from multiprocessing import cpu_count
-# import libs from 3rd party packages
-import psycopg2
-
# import local modules
from add_liveboot_request import add_liveboot_request
from cidb import *
# from common_code
logger = logger_init()
+# jenkins parameters
+GIT_REPO_PATH = ENV['GIT_REPO_PATH']
+GIT_REPO_NAME = os.path.basename(ENV['GIT_REPO_PATH'])
+GIT_BRANCH_NAME = ENV['GIT_BRANCH_NAME']
+GIT_COMMITTER_EMAIL = ENV['GIT_COMMITTER_EMAIL']
+ENV.setdefault('NO_UPLOAD','')
+NO_UPLOAD = ENV['NO_UPLOAD']
+
# local constants
DEFAULT_PARALLEL_JOBS = cpu_count() + 1
JOB_URL = 'http://jenkins:80/job/%(flavour)s/buildWithParameters?token=BuildIt&'
JOB_DELAY = '0sec'
+AUTO_CHANGELOG_REPONAMES = (
+ 'ri-docs',
+ 'so-docs',
+ 'infrastructure-docs',
+ 'storage-docs',
+ )
+STABLE_DISTRIBUTIONS = (
+ 'stable',
+ 'production',
+ 'production-proposed-updates'
+ )
+
#unused: (except in in-active code)
GIT_TARGET_WORKSPACE = os.path.join(
CWD,
}
DPUT_CF = os.path.join(CWD, '..', 'dput.cf')
-GIT_REPO_PATH = ENV['GIT_REPO_PATH']
-GIT_REPO_NAME = os.path.basename(ENV['GIT_REPO_PATH'])
-GIT_BRANCH_NAME = ENV['GIT_BRANCH_NAME']
-GIT_COMMITTER_EMAIL = ENV['GIT_COMMITTER_EMAIL']
-
-ENV.setdefault('NO_UPLOAD','')
-NO_UPLOAD = ENV['NO_UPLOAD']
-
-AUTO_CHANGELOG_JOBS = (
- 'ri-docs',
- 'so-docs',
- 'infrastructure-docs',
- 'storage-docs',
- )
-STABLE_DISTRIBUTIONS = (
- 'stable',
- 'production',
- 'production-proposed-updates'
- )
class HudsonUrl(urllib.FancyURLopener):
pass
else:
logger.debug('Status is now:\n%s' %( gitcmd.status().strip() ))
- if GIT_BRANCH_NAME == 'master' and BUILD_JOBNAME in AUTO_CHANGELOG_JOBS:
+ if GIT_BRANCH_NAME == 'master' and BUILD_JOBNAME in AUTO_CHANGELOG_REPONAMES:
cmd = ['/usr/bin/dch', '-i', 'Released by jenkins.']
subprocess.check_call(cmd)
cmd = ['/usr/bin/git-dch', '-R', '-a', '--spawn-editor=none']