mirror_pagure_ansible: sync down the latest changes from upstream
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
parent
c1adee3cb7
commit
6fdf5bd47f
1 changed files with 4 additions and 7 deletions
|
@ -18,7 +18,6 @@ from fedora_messaging import api, config
|
||||||
_log = logging.getLogger(__name__)
|
_log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def run_command(command, cwd=None):
|
def run_command(command, cwd=None):
|
||||||
""" Run the specified command in a specific working directory if one
|
""" Run the specified command in a specific working directory if one
|
||||||
is specified.
|
is specified.
|
||||||
|
@ -80,10 +79,8 @@ class MirrorFromPagure(object):
|
||||||
if message.topic == "io.pagure.prod.pagure.git.receive":
|
if message.topic == "io.pagure.prod.pagure.git.receive":
|
||||||
repo_name = message.body.get("repo", {}).get("fullname")
|
repo_name = message.body.get("repo", {}).get("fullname")
|
||||||
if repo_name not in self.trigger_names:
|
if repo_name not in self.trigger_names:
|
||||||
_log.info("Not the pagure repo of interest, bailing")
|
_log.info("%s is not a pagure repo of interest, bailing", repo_name)
|
||||||
return
|
return
|
||||||
elif message.topic == "org.fedoraproject.prod.infragit.receive":
|
|
||||||
pass
|
|
||||||
else:
|
else:
|
||||||
_log.info("Unexpected topic received: %s", message.topic)
|
_log.info("Unexpected topic received: %s", message.topic)
|
||||||
return
|
return
|
||||||
|
@ -101,7 +98,7 @@ class MirrorFromPagure(object):
|
||||||
|
|
||||||
_log.info(
|
_log.info(
|
||||||
" Running git fetch with transfer.fsckObjects=1 in %s",
|
" Running git fetch with transfer.fsckObjects=1 in %s",
|
||||||
dest_folder
|
dest_folder,
|
||||||
)
|
)
|
||||||
cmd = ["git", "-c", "transfer.fsckObjects=1", "fetch"]
|
cmd = ["git", "-c", "transfer.fsckObjects=1", "fetch"]
|
||||||
run_command(cmd, cwd=dest_folder)
|
run_command(cmd, cwd=dest_folder)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue