From: hyokeun Date: Fri, 18 Aug 2017 09:16:54 +0000 (+0900) Subject: TPE-195 Reference creation fail to detect git change X-Git-Tag: submit/trunk/20190927.012743~322^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=14f5a43d310da4ed8f437ecfe945922f6d78488e;p=services%2Fjenkins-scripts.git TPE-195 Reference creation fail to detect git change Problem: Git repository change check was not implemented. Fix: Compare git path from source project and manifest. Change-Id: Ie0926750afdf40325a1a4fbe95f585612da1eeb8 --- diff --git a/job_ref_create_prj_obs.py b/job_ref_create_prj_obs.py index f43ea96..19ce4ce 100644 --- a/job_ref_create_prj_obs.py +++ b/job_ref_create_prj_obs.py @@ -590,7 +590,20 @@ class ref_create_project_obs(object): print "\n********" print " 1) package list of target project \n %s" %(package_list) + manifest_packages = self.get_manifest_filelists_snapshot(self.profile, \ + os.path.join(os.getenv("URL_PUBLIC_REPO_BASE"), \ + snapshotdir,\ + "builddata/manifest")) + # Changed git repo check + git_changed_packages = [] + for x in todo_dict: + if todo_dict[x].get('git', None) and todo_dict[x].get('git') not in manifest_packages: + print 'Git repository change detected! %s' % todo_dict[x] + git_changed_packages.append(x) + package_list.remove(x) + packages = self.remove_duplicates(package_list, remote_package_list) + packages.extend(git_changed_packages) print "\n********" print " 2) remove package %s" %(packages) for pkgname in packages: @@ -610,10 +623,6 @@ class ref_create_project_obs(object): print "\n********" print " 4) compare package project " - manifest_packages = self.get_manifest_filelists_snapshot(self.profile, \ - os.path.join(os.getenv("URL_PUBLIC_REPO_BASE"), \ - snapshotdir,\ - "builddata/manifest")) todo_dict = self.compare_with_manifest(todo_dict, manifest_packages) print '\nCompare With Manifest Done at %s' % (str(datetime.now()))