JOB_URL = 'http://jenkins:80/job/%(flavour)s/buildWithParameters?token=BuildIt&'
JOB_DELAY = '0sec'
+JOB_NAME = os.environ.get('JOB_NAME')
GIT = '/usr/bin/git'
BIN_RM = '/bin/rm'
BUILD_NUMBER = os.environ.get('BUILD_NUMBER')
BUILD_ID = os.environ.get('BUILD_ID')
BUILD_URL = os.environ.get('BUILD_URL')
+BUILD_AREA = os.path.abspath(os.path.join(os.curdir,'../build-area'))
GIT_REPO_PATH = os.environ.get('GIT_REPO_PATH')
GIT_REPO_NAME = os.path.basename(GIT_REPO_PATH)
GIT_BRANCH_NAME = os.environ.get('GIT_BRANCH_NAME')
+GIT_COMMITTER_EMAIL = os.environ.get('GIT_COMMITTER_EMAIL')
#unused: (except in in-active code)
GIT_TARGET_WORKSPACE = os.path.join(
os.path.basename(GIT_REPO_PATH)
)
-JOB_NAME = os.environ.get('JOB_NAME')
-GIT_COMMITTER_EMAIL = os.environ.get('GIT_COMMITTER_EMAIL')
-
DPUT_OPTIONS_DEFAULT = {
'fqdn': 'alexandria.profitbricks.localdomain',
'method': 'scp',
raise Exception('unhandled branch, failing.')
# cleanup existing *orig.tar.gz
- if os.path.isdir('../build-area/'):
- files = [os.path.join('../build-area/',file) for file in fnmatch.filter(os.listdir('../build-area/'),'*.orig.tar.gz')]
+ if os.path.isdir(BUILD_AREA):
+ files = [os.path.join(BUILD_AREA,file) for file in fnmatch.filter(os.listdir(BUILD_AREA),'*.orig.tar.gz')]
logger.debug('Previous upstream tarball(s) found: %s' %( files ))
- cmd = [BIN_SUDO, BIN_RM, '-vf', " ".join(files)]
+ cmd = [BIN_SUDO, BIN_RM, '-v', " ".join(files)]
cmdobj = subprocess.Popen(
cmd,
shell=False,
cwd='/',
close_fds=True,
- stdout=sys.stdout,
+ stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
env={'':''}
)
logger.debug(_str)
raise Exception(_str)
- files = [os.path.join('../build-area/',file) for file in fnmatch.filter(os.listdir('../build-area/'),'*.orig.tar.gz')]
+ files = [os.path.join(BUILD_AREA,file) for file in fnmatch.filter(os.listdir(BUILD_AREA),'*.orig.tar.gz')]
logger.debug('Previous upstream tarball(s) found: %s' %( files ))