Remove buildconf from builddata directory
authorLin Yang <lin.a.yang@intel.com>
Tue, 24 Jun 2014 03:25:48 +0000 (11:25 +0800)
committerLin Yang <lin.a.yang@intel.com>
Mon, 7 Jul 2014 09:03:06 +0000 (17:03 +0800)
Because OBS project build conf for each target has already been placed on the
repodata directory of each repo, the global build conf on builddata directory
is not necessary anymore.

Fixes: #1998

Change-Id: Id4f1f01a112d25d0e6481d08c89406c438057dee
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
job_buildlogs.py

index a324235..7815202 100755 (executable)
@@ -8,12 +8,10 @@ This code is called when create snapshot.
 import os
 import sys
 import shutil
-import hashlib
 
 from xml.dom import minidom
 
 from common.buildtrigger import trigger_info
-from common.buildservice import BuildService
 from common.utils import sync
 
 def restructure_output_dir(package_build_dict, target_path):
@@ -62,27 +60,12 @@ def collect_build_data(base_path):
 
     return package_build_dict
 
-def get_buildconf(build, project, target_path_base):
-    """ Get build conf from through OSC api
-    """
-
-    conf_str = build.get_project_config(project)
-
-    with open(os.path.join(target_path_base,
-                           "%s-build.conf" %hashlib.md5(conf_str).hexdigest()),
-              'w') as conf_fh:
-        conf_fh.write(conf_str)
-
 def main():
     """Script entry point.
     """
 
     print '---[JOB STARTED: buildlog ]-------------------------'
 
-    obs_api = os.getenv("OBS_API_URL")
-    obs_user = os.getenv("OBS_API_USERNAME")
-    obs_passwd = os.getenv("OBS_API_PASSWD")
-
     build_base_path = os.getenv("PATH_OBS_BUILD_BASE", "/srv/obs/build")
 
     sync_out_dir = os.path.join(os.getenv('WORKSPACE'),
@@ -109,11 +92,6 @@ def main():
                                             'buildlogs',
                                             repository))
 
-    build = BuildService(obs_api, obs_user, obs_passwd)
-
-    # Get OBS project build conf
-    get_buildconf(build, project, os.path.join(sync_out_dir, 'builddata'))
-
     # sync to donwload server
     sync(sync_out_dir, sync_dest)