Get rid of the osc based trigger mechanism and use the API
This commit is contained in:
parent
f341791bcf
commit
843fabc368
1 changed files with 1 additions and 19 deletions
|
@ -86,7 +86,7 @@ def trigger_update(repository, package_name, token):
|
|||
result = requests.post(OBS_URL, params=parameters, headers=header)
|
||||
|
||||
if not result:
|
||||
logging.error("Error during service run, package %s, error code %s, url %s",
|
||||
logging.error("Error during service run, package %s, error code %s",
|
||||
package_name, result.status_code, result.url)
|
||||
return False
|
||||
|
||||
|
@ -94,24 +94,6 @@ def trigger_update(repository, package_name, token):
|
|||
return result
|
||||
|
||||
|
||||
def run_osc(repository, package_name):
|
||||
|
||||
cmd = "osc service remoterun {0} {1}"
|
||||
cmd = cmd.format(repository, package_name)
|
||||
|
||||
logging.debug("Running %s", cmd)
|
||||
logging.info("Updating package %s", package_name)
|
||||
|
||||
pid = sarge.run(cmd)
|
||||
|
||||
if pid.returncode != 0:
|
||||
logging.error("Error during service run, package %s", package_name)
|
||||
return False
|
||||
|
||||
logging.debug("Package %s complete", package_name)
|
||||
return True
|
||||
|
||||
|
||||
def update_package(hash_data, package_name,
|
||||
remote_name, obs_repository,
|
||||
branch, token):
|
||||
|
|
Loading…
Add table
Reference in a new issue