Hello Jonathan!

On Sun, Jul 1, 2018 at 6:56 PM Jonathan Leroy <jonathan@harrycow.fr> wrote:
Hi,

I've setup a GitHub webhook according to the documentation at
https://copr.fedorainfracloud.org/coprs/jleroy/PlexMediaPlayer/webhooks/.
When a push my commits to GitHub, a POST request is sent to the
webhook URL by GitHub and and HTTP 200 response received according to
GitHub logs. But nothing happens on Copr's side.

That's because you have set SOURCES as subdirectory, which causes filtering
out commits that did not modify a subpath of SOURCES/. Like e.g. if you
make a change in the spec file under SPECS, then this change won't get rebuilt.

The problem here is that the 'Subdirectory' parameter is overloaded and
it does more than it probably should. The filtering on paths should be a
separate thing. We are assuming there that the spec file will be placed
next to sources, which is not true in this case.

The systematic fix for this will take time however so I would suggest
switching to make_sprm method. You can then leave subdirectory empty
and set 'Spec file' to SPECS/plexmediaplayer.spec. But you will additionally
need to write a Makefile placed at .copr/Makefile in you repository
with 'srpm' target. There you can manually invoke rpkg to build the srpm.


Note that you will probably need much more simpler script.


You could also use Custom build method with Custom webhook.
That might be more simple although you will need to switch your Github
webhook for the Custom one (see "Custom webhook") at the bottom of
the 'webhooks' page. Again, manual invocation of either rpkg or
rpmbuild -bs will be needed to be build the srpm but this time, you
will write the command directly into Copr input form instead of using
the .copr/Makefile in your Git repository. If you use rpkg, you will also
need to add it to the 'builddeps' field.

This might take a bit of trial and error to get it up and running. Let us
know if you meet and difficulties.

Best regards
Copr team
 

However, if I trigger the build manually using the "Rebuild" button,
everything works fine.

Any idea?

--
Jonathan Leroy
_______________________________________________
copr-devel mailing list -- copr-devel@lists.fedorahosted.org
To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/copr-devel@lists.fedorahosted.org/message/XI76WCQVKPSSLO4CRWMQJ4TJCT224FPG/