From 75c2e1d70345d8ff560cd2b2e6e423307a58bb9e Mon Sep 17 00:00:00 2001 From: SoonKyu Park Date: Tue, 10 Apr 2018 20:01:03 +0900 Subject: [PATCH] Fix build/image add/remove package list calculation code Change-Id: I5ed810fa697ca0e1ec2896078f406e0b842f0b43 --- job_gbs_dashboard_build.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/job_gbs_dashboard_build.py b/job_gbs_dashboard_build.py index 8e9bfb7..2a14763 100644 --- a/job_gbs_dashboard_build.py +++ b/job_gbs_dashboard_build.py @@ -44,6 +44,7 @@ def main(): new_pkg_list = os.getenv('NEW_PKG_LIST') rm_pkg_list = os.getenv('RM_PKG_LIST') rm_from_img_list = os.getenv('RM_FROM_IMG') + add_to_img_list = os.getenv('ADD_TO_IMG') # If there is no direct input from input parameters, let build parameters come from trigger_info if not obs_prj: @@ -58,21 +59,28 @@ def main(): for pkg in contents.get("packages"): if pkg.values()[0]['build'] == 'include': new_pkg_list += (pkg.keys()[0]+' '+pkg.values()[0]['commit']+' ') - new_pkg_list.rstrip(' ') + new_pkg_list=new_pkg_list[:-1] if not rm_pkg_list: rm_pkg_list = '' if contents.get("packages"): for pkg in contents.get("packages"): if pkg.values()[0]['build'] != 'include': rm_pkg_list += (pkg.keys()[0]+' ') - rm_pkg_list.rstrip(' ') + rm_pkg_list=rm_pkg_list[:-1] if not rm_from_img_list: rm_from_img_list = '' if contents.get("packages"): for pkg in contents.get("packages"): - if pkg.values()[0]['build'] == 'include' and pkg.values()[0]['image'] != 'include': + if pkg.values()[0]['image'] != 'include': rm_from_img_list += (pkg.keys()[0]+' ') - rm_from_img_list.rstrip(' ') + rm_from_img_list=rm_from_img_list[:-1] + if not add_to_img_list: + add_to_img_list = '' + if contents.get("packages"): + for pkg in contents.get("packages"): + if pkg.values()[0]['image'] == 'include': + add_to_img_list += (pkg.keys()[0]+' ') + add_to_img_list=add_to_img_list[:-1] gbsbuild_tag = contents.get("tag") -- 2.7.4