[copr/copr] branch master updated: doc: specify an image name
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
praiskup pushed a commit to branch master
in repository copr/copr.
The following commit(s) were added to refs/heads/master by this push:
new cf6e239 doc: specify an image name
cf6e239 is described below
commit cf6e239daf991310eaff6aceaa1d8a443b062f42
Author: Jakub Kadlcik <frostyx(a)email.cz>
AuthorDate: Wed Nov 27 02:54:33 2019 +0100
doc: specify an image name
Otherwise the image defined in playbooks is used. Which is obviously
the current one, not the one we are upgrading to.
Merges: #1121
---
doc/how_to_upgrade_builders.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/how_to_upgrade_builders.rst b/doc/how_to_upgrade_builders.rst
index 04d0ba6..c82d068 100644
--- a/doc/how_to_upgrade_builders.rst
+++ b/doc/how_to_upgrade_builders.rst
@@ -83,7 +83,7 @@ Prepare VM for snapshot
Open a ssh connection to ``copr-be-dev.cloud.fedoraproject.org`` and run::
# su - copr
- $ copr-builder-image-prepare-cloud.sh os:x86_64 # or ppc64le
+ $ copr-builder-image-prepare-cloud.sh os:x86_64 Fedora-Cloud-Base-30-1.2.x86_64 # or ppc64le
... snip ...
TASK [disable offloading] *****************************************************
Wednesday 14 August 2019 13:31:27 +0000 (0:00:05.603) 0:03:47.402 ******
@@ -101,7 +101,7 @@ where the problem is - fix the following playbook files::
Repeat the fixing of playbooks till the script finishes properly::
- $ copr-builder-image-prepare-cloud.sh os:x86_64
+ $ copr-builder-image-prepare-cloud.sh os:x86_64 Fedora-Cloud-Base-30-1.2.x86_64
... see the output instructions ...
TASK [disable offloading] *****************************************************
Wednesday 14 August 2019 13:31:27 +0000 (0:00:05.603) 0:03:47.402 ******
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 4 months
[copr/copr] branch master updated: frontend: display chroot
comments on create project page
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
praiskup pushed a commit to branch master
in repository copr/copr.
The following commit(s) were added to refs/heads/master by this push:
new c3c5db9 frontend: display chroot comments on create project page
c3c5db9 is described below
commit c3c5db9a42264faa1a571e729406885a0894e195
Author: Dominik Turecek <dturecek(a)redhat.com>
AuthorDate: Mon Dec 2 10:24:28 2019 +0100
frontend: display chroot comments on create project page
Fixes: #1126
Merges: #1128
---
frontend/coprs_frontend/coprs/templates/coprs/add.html | 2 +-
frontend/coprs_frontend/coprs/templates/coprs/group_add.html | 2 +-
frontend/coprs_frontend/coprs/views/coprs_ns/coprs_general.py | 7 +++++--
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/frontend/coprs_frontend/coprs/templates/coprs/add.html b/frontend/coprs_frontend/coprs/templates/coprs/add.html
index 57efa85..a2d7af0 100644
--- a/frontend/coprs_frontend/coprs/templates/coprs/add.html
+++ b/frontend/coprs_frontend/coprs/templates/coprs/add.html
@@ -23,6 +23,6 @@
<p>
You agree to build only <a href="https://docs.pagure.org/copr.copr/user_documentation.html#what-i-can-buil...">allowed content</a> in Copr. Check if your <a href="https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses">license</a> is allowed.
</p>
- {{ copr_form(form, view = 'coprs_ns.copr_new', username=g.user.name) }}
+ {{ copr_form(form, view = 'coprs_ns.copr_new', username=g.user.name, comments=comments) }}
{% endblock %}
diff --git a/frontend/coprs_frontend/coprs/templates/coprs/group_add.html b/frontend/coprs_frontend/coprs/templates/coprs/group_add.html
index 2a7923b..0de9155 100644
--- a/frontend/coprs_frontend/coprs/templates/coprs/group_add.html
+++ b/frontend/coprs_frontend/coprs/templates/coprs/group_add.html
@@ -26,6 +26,6 @@
<p>
You agree to build only <a href="https://docs.pagure.org/copr.copr/user_documentation.html#what-i-can-buil...">allowed content</a> in Copr. Check if your <a href="https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses">license</a> is allowed.
</p>
- {{ copr_form(form, view = 'coprs_ns.copr_new', username=g.user.name, group=group) }}
+ {{ copr_form(form, view = 'coprs_ns.copr_new', username=g.user.name, group=group, comments=comments) }}
{% endblock %}
diff --git a/frontend/coprs_frontend/coprs/views/coprs_ns/coprs_general.py b/frontend/coprs_frontend/coprs/views/coprs_ns/coprs_general.py
index 9420f2e..979eea1 100644
--- a/frontend/coprs_frontend/coprs/views/coprs_ns/coprs_general.py
+++ b/frontend/coprs_frontend/coprs/views/coprs_ns/coprs_general.py
@@ -148,10 +148,13 @@ def coprs_fulltext_search(page=1):
@login_required
def copr_add(username=None, group_name=None):
form = forms.CoprFormFactory.create_form_cls()()
+ comments = {}
+ for chroot in MockChrootsLogic.get_multiple(active_only=True):
+ comments[chroot.name] = chroot.comment
if group_name:
group = ComplexLogic.get_group_by_name_safe(group_name)
- return flask.render_template("coprs/group_add.html", form=form, group=group)
- return flask.render_template("coprs/add.html", form=form)
+ return flask.render_template("coprs/group_add.html", form=form, group=group, comments=comments)
+ return flask.render_template("coprs/add.html", form=form, comments=comments)
@coprs_ns.route("/<username>/new/", methods=["POST"])
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 4 months
[copr/copr] branch master updated: backend: do not start a build if
copr_base is not available yet
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
praiskup pushed a commit to branch master
in repository copr/copr.
The following commit(s) were added to refs/heads/master by this push:
new 6cf66a9 backend: do not start a build if copr_base is not available yet
6cf66a9 is described below
commit 6cf66a9b138d2ecaa48e60a8fe500a47a4d3569e
Author: Jakub Kadlcik <frostyx(a)email.cz>
AuthorDate: Sun Dec 1 19:57:18 2019 +0100
backend: do not start a build if copr_base is not available yet
We don't have any mechanism to define relationships between builds
and actions, so we can possibly come across a situation when an action
for creating repodata for new project takes a longer time than
expected and meanwhile a build in the project is started. That will
inevitably result in failure because we set `skip_if_unavailable=0`
for the `[copr_base]` repository.
Merges: #1125
Fixes: #1057
---
backend/backend/daemons/build_dispatcher.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/backend/backend/daemons/build_dispatcher.py b/backend/backend/daemons/build_dispatcher.py
index ccfe823..4546ca7 100644
--- a/backend/backend/daemons/build_dispatcher.py
+++ b/backend/backend/daemons/build_dispatcher.py
@@ -1,5 +1,6 @@
# coding: utf-8
+import os
import time
import multiprocessing
@@ -181,6 +182,11 @@ class BuildDispatcher(multiprocessing.Process):
self.log.debug("Skipped job %s, cached", job)
continue
+ repodata = os.path.join(job.destdir, job.chroot, "repodata/repomd.xml")
+ if not os.path.exists(repodata) and job.chroot != "srpm-builds":
+ self.log.debug("Skipping job %s because copr_base repo is not available yet", job)
+ continue
+
# ... and if the task is new to us,
# allocate new vm and run full build
try:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 4 months
[copr/copr] branch master updated: frontend: Adding tests for
webhooks
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
praiskup pushed a commit to branch master
in repository copr/copr.
The following commit(s) were added to refs/heads/master by this push:
new ea52504 frontend: Adding tests for webhooks
ea52504 is described below
commit ea525040cdfe9ec355629798a648c5e53d1b55c0
Author: Silvie Chlupova <sisi.chlupova(a)gmail.com>
AuthorDate: Mon Nov 25 16:09:39 2019 +0100
frontend: Adding tests for webhooks
Fixes: #803
Merges: #1122
---
frontend/coprs_frontend/tests/test_webhooks.py | 226 +++++++++++++++++++++++++
1 file changed, 226 insertions(+)
diff --git a/frontend/coprs_frontend/tests/test_webhooks.py b/frontend/coprs_frontend/tests/test_webhooks.py
index ea0c8c8..30ad8f6 100644
--- a/frontend/coprs_frontend/tests/test_webhooks.py
+++ b/frontend/coprs_frontend/tests/test_webhooks.py
@@ -77,3 +77,229 @@ class TestCustomWebhook(CoprsTestCase):
assert resp.status_code == 403
assert resp.data.decode('ascii') == "BAD_UUID\n"
+
+
+class TestGithubWebhook(CoprsTestCase):
+ def github_post(self, data, token, copr_id, headers):
+ url = "/webhooks/github/{copr_id}/{uuid}/"
+ url = url.format(uuid=token, copr_id=copr_id)
+
+ return self.tc.post(
+ url,
+ content_type="application/json",
+ data=json.dumps(data) if data is not None else None,
+ headers=headers
+ )
+
+ def test_package_bad_request(self, f_hook_package, f_db):
+ headers = {'X-GitHub-Event': 'test'}
+ hook_payload = {'some': 'data'}
+ r = self.github_post(
+ hook_payload,
+ self.c1.webhook_secret,
+ self.c1.id,
+ headers
+ )
+ assert r.data.decode('ascii') == "Bad Request"
+ assert r.status_code == 400
+
+ def test_hook_status_ping_event(self, f_hook_package, f_db):
+ hook_payload = {'some': 'data'}
+ headers = {'X-GitHub-Event': 'ping'}
+ r = self.github_post(
+ hook_payload,
+ self.c1.webhook_secret,
+ self.c1.id,
+ headers
+ )
+
+ assert r.data.decode('ascii') == 'OK'
+ assert r.status_code == 200
+
+ def test_hook_data_stored(self, f_hook_package, f_db):
+ package_name = self.pHook.name
+ source_json = {"type": "git",
+ "clone_url": "https://github.com/{0}/{1}.git".format(self.u1.username, package_name),
+ "subdirectory": "", "committish": "", "spec": "",
+ "srpm_build_method": "rpkg"}
+ self.pHook.source_json = json.dumps(source_json)
+ headers = {'X-GitHub-Event': 'push'}
+ self.pHook.webhook_rebuild = True
+ hook_payload = {
+ "ref": "refs/heads/master",
+ "before": "2a7a2e3e0ee63ac5abcca96209e1fc50cd457226",
+ "commits": [{"added": ["{0}".format(package_name)], "removed": [], "modified": []}],
+ "repository": {"clone_url": "https://github.com/{0}/{1}.git".format(self.u1.username, package_name)},
+ "sender": {
+ "login": self.u1.username,
+ "url": "https://api.github.com/users/{0}".format(self.u1.username)
+ }
+ }
+ r = self.github_post(
+ hook_payload,
+ self.c1.webhook_secret,
+ self.c1.id,
+ headers
+ )
+ package = self.models.Package.query.filter_by(name=package_name).first()
+
+ assert r.data.decode('ascii') == 'OK'
+ assert r.status_code == 200
+ assert len(package.builds) == 1
+
+ def test_bad_uuid(self, f_hook_package, f_db):
+ r = self.github_post(
+ None,
+ "invalid-token",
+ self.c1.id,
+ {'X-GitHub-Event': 'issues'}
+ )
+ assert r.status_code == 403
+
+
+class TestGitlabWebhook(CoprsTestCase):
+ def gitlab_post(self, data, token, copr_id, headers):
+ url = "/webhooks/gitlab/{copr_id}/{uuid}/"
+ url = url.format(uuid=token, copr_id=copr_id)
+
+ return self.tc.post(
+ url,
+ content_type="application/json",
+ data=json.dumps(data) if data is not None else None,
+ headers=headers
+ )
+
+ def test_package_bad_request(self, f_hook_package, f_db):
+ headers = {'X-Gitlab-Event': 'test'}
+ hook_payload = {'some': 'data'}
+ r = self.gitlab_post(
+ hook_payload,
+ self.c1.webhook_secret,
+ self.c1.id,
+ headers
+ )
+ assert r.data.decode('ascii') == "Bad Request"
+ assert r.status_code == 400
+
+ def test_hook_data_stored(self, f_hook_package, f_db):
+ package_name = self.pHook.name
+ source_json = {"type": "git",
+ "clone_url": "https://gitlab.com/{0}/{1}.git".format(self.u1.username, package_name),
+ "subdirectory": "", "committish": "", "spec": "",
+ "srpm_build_method": "rpkg"}
+ self.pHook.source_json = json.dumps(source_json)
+ headers = {'X-Gitlab-Event': 'Push Hook'}
+ self.pHook.webhook_rebuild = True
+ hook_payload = {
+ "object_kind": "push",
+ "ref": "refs/heads/master",
+ "before": "9e6f31bead67d176a71a198f0c10fc764799a4a7",
+ "after": "f956357fe84ba899faf9efadeed1f32c8c8cac85",
+ "commits": [{"added": ["{0}".format(package_name)], "removed": [], "modified": []}],
+ "project": {"git_http_url": "https://gitlab.com/{0}/{1}.git".format(self.u1.username, package_name)},
+ "user_username": self.u1.username
+ }
+ r = self.gitlab_post(
+ hook_payload,
+ self.c1.webhook_secret,
+ self.c1.id,
+ headers
+ )
+ package = self.models.Package.query.filter_by(name=package_name).first()
+
+ assert r.data.decode('ascii') == 'OK'
+ assert r.status_code == 200
+ assert len(package.builds) == 1
+
+ def test_bad_uuid(self, f_hook_package, f_db):
+ r = self.gitlab_post(
+ None,
+ "invalid-token",
+ self.c1.id,
+ {'X-Gitlab-Event': 'Push Hook'}
+ )
+ assert r.status_code == 403
+
+
+class TestBitbucketWebhook(CoprsTestCase):
+ def bitbucket_post(self, data, token, copr_id, headers):
+ url = "/webhooks/bitbucket/{copr_id}/{uuid}/"
+ url = url.format(uuid=token, copr_id=copr_id)
+
+ return self.tc.post(
+ url,
+ content_type="application/json",
+ data=json.dumps(data) if data is not None else None,
+ headers=headers
+ )
+
+ def test_package_bad_request(self, f_hook_package, f_db):
+ headers = {'X-Event-Key': 'repo:test'}
+ hook_payload = {'some': 'data'}
+ r = self.bitbucket_post(
+ hook_payload,
+ self.c1.webhook_secret,
+ self.c1.id,
+ headers
+ )
+ assert r.data.decode('ascii') == "Bad Request"
+ assert r.status_code == 400
+
+ def test_hook_data_stored(self, f_hook_package, f_db):
+ package_name = self.pHook.name
+ source_json = {"type": "git",
+ "clone_url": "https://bitbucket.org/{0}/{1}".format(self.u1.username, package_name),
+ "subdirectory": "", "committish": "", "spec": "",
+ "srpm_build_method": "rpkg"}
+ self.pHook.source_json = json.dumps(source_json)
+ headers = {'X-Event-Key': 'repo:push'}
+ self.pHook.webhook_rebuild = True
+ hook_payload = {
+ "object_kind": "push",
+ "ref": "refs/heads/master",
+ "before": "9e6f31bead67d176a71a198f0c10fc764799a4a7",
+ "after": "f956357fe84ba899faf9efadeed1f32c8c8cac85",
+ "push": {
+ "changes": [{"new": {"name": "{0}".format(package_name), "type": "tag",
+ "target": {"hash": "82c876a27ceafd80465c35e601afab604463ae86"}}}]
+ },
+ "commits": [{"added": ["{0}".format(package_name)], "removed": [], "modified": []}],
+ "repository": {
+ "links": {
+ "self": {
+ "href": "https://api.bitbucket.org/2.0/repositories/{0}/{1}".format(self.u1.username,
+ package_name)},
+ "html": {
+ "href": "https://bitbucket.org/{0}/{1}".format(self.u1.username, package_name)
+ },
+ },
+ },
+ "actor": {
+ "links": {
+ "html": {
+ "href": "https://bitbucket.org/%7B4610cba6-e60c-4a9d-9e9f-481e6ce42327%7D/"
+ },
+ }
+ },
+ "user_username": self.u1.username
+ }
+ r = self.bitbucket_post(
+ hook_payload,
+ self.c1.webhook_secret,
+ self.c1.id,
+ headers
+ )
+ package = self.models.Package.query.filter_by(name=package_name).first()
+
+ assert r.data.decode('ascii') == 'OK'
+ assert r.status_code == 200
+ assert len(package.builds) == 1
+
+ def test_bad_uuid(self, f_hook_package, f_db):
+ r = self.bitbucket_post(
+ None,
+ "invalid-token",
+ self.c1.id,
+ {'X-Event-Key': 'repo:push'}
+ )
+ assert r.status_code == 403
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 4 months
[copr/copr] branch master updated (00f59d2 -> bdfc82f)
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
msuchy pushed a change to branch master
in repository copr/copr.
from 00f59d2 rpmbuild: fix custom method for F31's systemd
add bdfc82f frontend: add info to UI that build was resubmitted from another build
No new revisions were added by this update.
Summary of changes:
.../coprs_frontend/coprs/templates/coprs/detail/build.html | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 4 months
[copr/copr] branch master updated: rpmbuild: fix custom method for
F31's systemd
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
praiskup pushed a commit to branch master
in repository copr/copr.
The following commit(s) were added to refs/heads/master by this push:
new 00f59d2 rpmbuild: fix custom method for F31's systemd
00f59d2 is described below
commit 00f59d2f6409ebdccda8298c69d658e667c4f10d
Author: Pavel Raiskup <praiskup(a)redhat.com>
AuthorDate: Fri Nov 29 18:03:03 2019 +0100
rpmbuild: fix custom method for F31's systemd
Use 'mock --copyin' rather than "mock --shell 'cat -'" for copying files
into mock buildroot. This is bugfix caused by changed systemd-nspawn's
in F31, see https://github.com/rpm-software-management/mock/issues/432.
Fixes: #1123
Merges: #1124
---
rpmbuild/bin/copr-sources-custom | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/rpmbuild/bin/copr-sources-custom b/rpmbuild/bin/copr-sources-custom
index 6729288..5eda4e1 100755
--- a/rpmbuild/bin/copr-sources-custom
+++ b/rpmbuild/bin/copr-sources-custom
@@ -80,7 +80,7 @@ if __name__ == "__main__":
pkgs = args.builddeps.split()
run_cmd(mock + ['--install'] + pkgs)
- run_cmd(mock + ['--shell', 'cat - > /script'], stdin=args.script)
+ run_cmd(mock + ['--copyin', args.script.name, '/script'])
setup_cmd = 'set -ex; chmod a+x /script;'
@@ -94,8 +94,8 @@ if __name__ == "__main__":
if args.hook_payload_file:
payload_file_inner = "{0}/hook_payload".format(pipes.quote(workdir))
- run_cmd(mock + ['--shell', 'cat - > ' + payload_file_inner],
- stdin=args.hook_payload_file)
+ run_cmd(mock + ['--copyin', args.hook_payload_file.name,
+ os.path.join(workdir, 'hook_payload')])
run_cmd(mock + ['--shell', 'chmod a+r ' + payload_file_inner])
cmd = 'set -xe ; cd {workdir} ; {env} /script'.format(
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 4 months
[copr/copr] branch master updated (6810dac -> 3543115)
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
praiskup pushed a change to branch master
in repository copr/copr.
from 6810dac backend: build reattaching: avoid doubled fc.update() call
add 3543115 beaker-tests-sanity: build something in aarch64 chroot
No new revisions were added by this update.
Summary of changes:
.../copr-cli-basic-operations/runtest-aarch64.sh | 45 ++++++++++++++++++++++
1 file changed, 45 insertions(+)
create mode 100755 beaker-tests/Sanity/copr-cli-basic-operations/runtest-aarch64.sh
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 4 months