This is an automated email from the git hooks/post-receive script.
praiskup pushed a change to branch master in repository copr/copr.
from 0491ce9 doc: typo in link new 22eba23 backend, frontend: run createrepo after project or build_chroot creation new 327eb29 beaker-tests: add test for createrepo after project/chroot creation
The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
Summary of changes: backend/backend/actions.py | 5 +++ .../runtest-createrepo.sh | 40 ++++++++++++++++++++++ frontend/coprs_frontend/coprs/logic/coprs_logic.py | 7 ++++ 3 files changed, 52 insertions(+) create mode 100755 beaker-tests/Sanity/copr-cli-basic-operations/runtest-createrepo.sh
This is an automated email from the git hooks/post-receive script.
praiskup pushed a commit to branch master in repository copr/copr.
commit 22eba237e57c76fc7021b4a7cb48af3c7e98b65f Author: Dominik Turecek dturecek@redhat.com AuthorDate: Wed Jul 24 12:55:09 2019 +0200
backend, frontend: run createrepo after project or build_chroot creation
Fixes: #833 --- backend/backend/actions.py | 5 +++++ frontend/coprs_frontend/coprs/logic/coprs_logic.py | 7 +++++++ 2 files changed, 12 insertions(+)
diff --git a/backend/backend/actions.py b/backend/backend/actions.py index a19096c..f7e35a3 100644 --- a/backend/backend/actions.py +++ b/backend/backend/actions.py @@ -83,6 +83,11 @@ class Action(object):
path = self.get_chroot_result_dir(chroot, project_dirname, ownername) try: + os.makedirs(path) + except FileExistsError: + pass + + try: createrepo(path=path, front_url=self.front_url, username=ownername, projectname=projectname, override_acr_flag=True) diff --git a/frontend/coprs_frontend/coprs/logic/coprs_logic.py b/frontend/coprs_frontend/coprs/logic/coprs_logic.py index 0372774..dbd0b2e 100644 --- a/frontend/coprs_frontend/coprs/logic/coprs_logic.py +++ b/frontend/coprs_frontend/coprs/logic/coprs_logic.py @@ -628,6 +628,8 @@ class CoprChrootsLogic(object): db.session.add( models.CoprChroot(copr=copr, mock_chroot=mock_chroot))
+ ActionsLogic.send_createrepo(copr) + @classmethod def create_chroot(cls, user, copr, mock_chroot, buildroot_pkgs=None, repos=None, comps=None, comps_name=None, with_opts="", without_opts="", @@ -700,10 +702,15 @@ class CoprChrootsLogic(object): current_chroots = copr.mock_chroots new_chroots = cls.mock_chroots_from_names(names) # add non-existing + run_createrepo = False for mock_chroot in new_chroots: if mock_chroot not in current_chroots: db.session.add( models.CoprChroot(copr=copr, mock_chroot=mock_chroot)) + run_createrepo = True + + if run_createrepo: + ActionsLogic.send_createrepo(copr)
# delete no more present to_remove = []
This is an automated email from the git hooks/post-receive script.
praiskup pushed a commit to branch master in repository copr/copr.
commit 327eb292f221592282a87fe0a0ae6a2b16960ade Author: Dominik Turecek dturecek@redhat.com AuthorDate: Wed Jul 24 12:55:47 2019 +0200
beaker-tests: add test for createrepo after project/chroot creation
Complements 0ee001c373b438be111c3b5c7db5adcb0f534682 --- .../runtest-createrepo.sh | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+)
diff --git a/beaker-tests/Sanity/copr-cli-basic-operations/runtest-createrepo.sh b/beaker-tests/Sanity/copr-cli-basic-operations/runtest-createrepo.sh new file mode 100755 index 0000000..465f265 --- /dev/null +++ b/beaker-tests/Sanity/copr-cli-basic-operations/runtest-createrepo.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +. /usr/bin/rhts-environment.sh || exit 1 +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +# Load config settings +HERE=$(dirname "$(realpath "$0")") +source "$HERE/config" +source "$HERE/helpers" + +URL=${FRONTEND_URL#https://} + +rlJournalStart + rlPhaseStartSetup + rlPhaseEnd + + rlPhaseStartTest + rlRun "copr-cli create ${NAME_PREFIX}Createrepo --chroot fedora-30-x86_64" + echo "sleep 60 seconds to give backend enough time to generate the repo" + sleep 60 + rlRun "dnf -y copr enable ${URL}/${NAME_PREFIX}Createrepo" + rlRun "dnf --disablerepo='*' \ + --enablerepo='copr:${URL}:group_copr:${NAME_VAR}Createrepo' \ + list available 2>&1 | grep 'Failed to synchronize'" 1 + + rlRun "copr-cli modify ${NAME_PREFIX}Createrepo --chroot fedora-rawhide-x86_64" + echo "sleep 60 seconds to give backend enough time to generate the repo" + sleep 60 + rlRun "dnf -y copr enable ${URL}/${NAME_PREFIX}Createrepo fedora-rawhide-x86_64" + rlRun "dnf --disablerepo='*' \ + --enablerepo='copr:${URL}:group_copr:${NAME_VAR}Createrepo' \ + list available 2>&1 | grep 'Failed to synchronize'" 1 + + rlRun "copr-cli delete ${NAME_PREFIX}Createrepo" + rlPhaseEnd + + rlPhaseStartCleanup + rlPhaseEnd +rlJournalPrintText +rlJournalEnd
copr-commits@lists.fedorahosted.org