diff --git a/release-assistant/javcra/application/majun/majun_operate.py b/release-assistant/javcra/application/majun/majun_operate.py index 1191a829eeb67be482c699c6371dcb8332cc782c..82f8dabaa33f18771b72cfa177aa177e44a67d38 100644 --- a/release-assistant/javcra/application/majun/majun_operate.py +++ b/release-assistant/javcra/application/majun/majun_operate.py @@ -189,12 +189,10 @@ class MajunOperate: ] = f"{REPO_BASE_URL}{branch_name}/EPOL/update_{release_date}/multi_version/{folder_name}/" return self.send_data_test_platform(update_data, majun_id) - def transfer_pkg_rpm(self, *args, pkgs=None): + def execute_obs_job(self, obs_project, pkg_family, obs_action, release_date, pkgs=None): """ - transfer the rpm package to the server, and comment on the Jenkins - job result on the release issue + Execute the OBS job and return the result """ - obs_project, pkg_family, obs_action, release_date = args obs_job_params = { "ScanOSSAPIURL": constant.JENKINS_API_URL, "ScanOSSResultRepo": constant.JENKINS_SERVER_REPO, @@ -210,6 +208,15 @@ class MajunOperate: ) return jenkins_obs_res + def transfer_pkg_rpm(self, *args, pkgs=None): + """ + transfer the rpm package to the server, and comment on the Jenkins + job result on the release issue + """ + obs_project, pkg_family, obs_action, release_date = args + jenkins_obs_res = self.execute_obs_job(obs_project, pkg_family, obs_action, release_date, pkgs=pkgs) + return jenkins_obs_res + @catch_majun_error def operate_repo(self, params): """ @@ -245,7 +252,7 @@ class MajunOperate: ) else: # del_update_dir - stand_transfer_res = self.transfer_pkg_rpm( + stand_transfer_res = self.execute_obs_job( obs_project, params.package_family, params.action, release_date ) return send_content_majun(self.judge_result(stand_transfer_res), params.id)