From e7a7be4dd1eefa1557e07ac7f3cc20f174a7288a Mon Sep 17 00:00:00 2001 From: Mathias Klette Date: Tue, 21 May 2013 10:01:44 +0200 Subject: [PATCH] debian_build: handle integration branch of vdc-bundles --- debian_build.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/debian_build.py b/debian_build.py index c63fa75..05822df 100755 --- a/debian_build.py +++ b/debian_build.py @@ -219,6 +219,13 @@ if __name__ == '__main__': dput_obj.contents.update({ 'post_upload_command': 'ssh reprepro@alexandria.pb.local /srv/dev-repository/bin/pb_processincoming', }) + + # branch integration of vdc-bundles requires "stable"-tags for continues integration, + # merges to develop will be done from such tags manually + if ENV['GIT_BRANCH'] == 'integration': + new_tag = 'stable_' + ENV['BUILD_NUMBER'] + do_tagging = True + if ENV['DISTRIBUTION'] == 'squeeze': dput_obj.contents.update({ 'incoming': '/srv/dev-repository/incoming/', @@ -409,8 +416,12 @@ if __name__ == '__main__': else: try: if os.path.exists(reports_file): - subprocess.check_call(['/bin/tar', 'xzvf', '-C', ENV['WORKSPACE'], reports_file]) - subprocess.check_call(['/usr/bin/sudo' , '/bin/rm', '-v', reports_file]) + for cmd in (['/bin/tar', 'xzvf', reports_file, '-C', ENV['WORKSPACE']], + ['/usr/bin/sudo' , '/bin/rm', '-v', reports_file]): + if not subprocess.check_call(cmd): + logger.warn(cmd + ' failed.') + else: + logger.info(cmd + ' succeeded.') else: logger.info('No reports found.') figlet('Reports OK') @@ -422,20 +433,20 @@ if __name__ == '__main__': figlet('Tagging skipped') else: try: - gitrepo.git.tag(version_tag) + gitrepo.git.tag(new_tag) except Exception as error: logger.error('Could not create tag: ', exc_info=error) figlet('Tagging failed') exit_error() try: - gitrepo.git.push('origin', version_tag) + gitrepo.git.push('origin', new_tag) except Exception as error: logger.error('Could not push tag: ', exc_info=error) figlet('Tagging failed') exit_error() - logger.info('Tagged as "%s".' % version_tag) + logger.info('Tagged as "%s".' % new_tag) figlet('Tagging OK') # .. and upload -- 2.39.5