[opensuse-buildservice] OBS + GitHub - deprecation of GitHub Services
Hello, guys! I searched how to integrate OBS with GitHub so that a git push would cause OBS to fetch the source code and build. I followed directions on these pages: https://openbuildservice.org/2013/11/22/source-update-via_token/ https://github.com/seccubus/obs_autobuild_test (CC their authors, thank you for the great material!) But when I opened GitHub's Integration & services to add the Obs service, I read this: "Note: [GitHub Services are being deprecated][1]. Please contact your integrator for more information on how to migrate or replace a service with [webhooks][2] or [GitHub Apps][3]." [1]: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ [2]: https://developer.github.com/webhooks/ [3]: https://developer.github.com/apps/differences-between-apps/#about-github-app... The news is from April 25, 2018. The first paragraph summarizes it: "GitHub plans on shutting down GitHub Services so we can shift focus to other areas of the API, such as strengthening GitHub Apps and GraphQL, and improving webhooks. The intention of GitHub Services was to allow third-party developers to submit code for integrating with their services, but this functionality has been superseded by GitHub Apps and webhooks. GitHub Services has not supported new features since April 25, 2016, and we plan to officially deprecate it on October 1st, 2018." Although I successfully integrated OBS with GitHub using a GitHub Service, is it already possible to do that same integration using GitHub Apps or webhooks? Thank you! Antonio The Linux Kamarada Project http://kamarada.github.io/ -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Yes, we are aware of it and will look into it. (The CLA blocked me on working on github integration in the past, but might not be a problem anymore with webhooks). On Freitag, 25. Mai 2018, 05:05:13 CEST wrote Linux Kamarada:
Hello, guys! I searched how to integrate OBS with GitHub so that a git push would cause OBS to fetch the source code and build. I followed directions on these pages:
https://openbuildservice.org/2013/11/22/source-update-via_token/
https://github.com/seccubus/obs_autobuild_test
(CC their authors, thank you for the great material!)
But when I opened GitHub's Integration & services to add the Obs service, I read this:
"Note: [GitHub Services are being deprecated][1]. Please contact your integrator for more information on how to migrate or replace a service with [webhooks][2] or [GitHub Apps][3]."
[1]: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ [2]: https://developer.github.com/webhooks/ [3]: https://developer.github.com/apps/differences-between-apps/#about-github-app...
The news is from April 25, 2018. The first paragraph summarizes it:
"GitHub plans on shutting down GitHub Services so we can shift focus to other areas of the API, such as strengthening GitHub Apps and GraphQL, and improving webhooks. The intention of GitHub Services was to allow third-party developers to submit code for integrating with their services, but this functionality has been superseded by GitHub Apps and webhooks. GitHub Services has not supported new features since April 25, 2016, and we plan to officially deprecate it on October 1st, 2018."
Although I successfully integrated OBS with GitHub using a GitHub Service, is it already possible to do that same integration using GitHub Apps or webhooks?
Thank you!
Antonio The Linux Kamarada Project http://kamarada.github.io/
-- Adrian Schroeter email: adrian@suse.de SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Am 25.05.18 um 07:50 schrieb Adrian Schröter:
Yes, we are aware of it and will look into it.
(The CLA blocked me on working on github integration in the past, but might not be a problem anymore with webhooks).
Hi Adrian, any news on this ? Cause since Oct. 1st you are unable to setup a new GitHub Service. This feature got disbaled. Hence you are already forced to make use of webhooks. Existing Services will work until Jan 31, 2019 Thank you very much ... -- Christian ------------------------------------------------------------ https://join.worldcommunitygrid.org?recruiterId=177038 ------------------------------------------------------------ http://www.sc24.de - Sportbekleidung ------------------------------------------------------------
On Wed, Oct 24, 2018 at 10:13 AM Christian <chris@computersalat.de> wrote:
Am 25.05.18 um 07:50 schrieb Adrian Schröter:
Yes, we are aware of it and will look into it.
(The CLA blocked me on working on github integration in the past, but might not be a problem anymore with webhooks).
Hi Adrian,
any news on this ? Cause since Oct. 1st you are unable to setup a new GitHub Service. This feature got disbaled. Hence you are already forced to make use of webhooks.
Existing Services will work until Jan 31, 2019 Thank you very much ...
Webhooks support for GitHub and Pagure was merged into OBS back in July: https://github.com/openSUSE/open-build-service/commit/7d4a4eef5e647704b39833... These are active on the build service today, there's just no documentation for them... -- 真実はいつも一つ!/ Always, there's only one truth! -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Am 24.10.18 um 16:15 schrieb Neal Gompa:
These are active on the build service today, there's just no documentation for them... Hi Neal,
thank you for info. How should the 'Payload URL' look alike ? I guess it is the <API URL> + <PRJ> + <PKG> + trigger/service ? Can you help please? Thank you -- Christian ------------------------------------------------------------ https://join.worldcommunitygrid.org?recruiterId=177038 ------------------------------------------------------------ http://www.sc24.de - Sportbekleidung ------------------------------------------------------------
Am 24.10.18 um 16:37 schrieb Christian:
Am 24.10.18 um 16:15 schrieb Neal Gompa:
These are active on the build service today, there's just no documentation for them... Hi Neal,
thank you for info. How should the 'Payload URL' look alike ? I guess it is the <API URL> + <PRJ> + <PKG> + trigger/service ?
The URL is https://build.opensuse.org/trigger/webhook?id=$TOKEN_ID The token_id is listed on osc tokens and you have to put the token itself as secret Greetings, Stephan -- Lighten up, just enjoy life, smile more, laugh more, and don't get so worked up about things. Kenneth Branagh -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
The URL is https://build.opensuse.org/trigger/webhook?id=$TOKEN_ID
The token_id is listed on osc tokens and you have to put the token itself as secret
Am 24.10.18 um 21:00 schrieb Stephan Kulow: the webhook config on GitHub is split up into two config parts .. 1) Payload URL: 2) secret did you test it that way ? -- Christian ------------------------------------------------------------ https://join.worldcommunitygrid.org?recruiterId=177038 ------------------------------------------------------------ http://www.sc24.de - Sportbekleidung ------------------------------------------------------------
Am 25.10.18 um 09:23 schrieb Christian:
The URL is https://build.opensuse.org/trigger/webhook?id=$TOKEN_ID
The token_id is listed on osc tokens and you have to put the token itself as secret
Am 24.10.18 um 21:00 schrieb Stephan Kulow: the webhook config on GitHub is split up into two config parts .. 1) Payload URL: 2) secret
did you test it that way ?
coolo@cleopatra#~>osc token --create home:coolo demopac Create a new token <status code="ok"> <summary>Ok</summary> <data name="token">aWup8hf2dzF8c2GPfoKn1BpV</data> <data name="id">1920</data> </status> And then paste aWup... into the secret: https://pasteboard.co/HK3ry5c.png Greetings, Stephan -- Lighten up, just enjoy life, smile more, laugh more, and don't get so worked up about things. Kenneth Branagh -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Okt 25 2018, Stephan Kulow <coolo@suse.de> wrote:
Am 25.10.18 um 09:23 schrieb Christian:
The URL is https://build.opensuse.org/trigger/webhook?id=$TOKEN_ID
The token_id is listed on osc tokens and you have to put the token itself as secret
Am 24.10.18 um 21:00 schrieb Stephan Kulow: the webhook config on GitHub is split up into two config parts .. 1) Payload URL: 2) secret
did you test it that way ?
coolo@cleopatra#~>osc token --create home:coolo demopac Create a new token <status code="ok"> <summary>Ok</summary> <data name="token">aWup8hf2dzF8c2GPfoKn1BpV</data> <data name="id">1920</data> </status>
And then paste aWup... into the secret: https://pasteboard.co/HK3ry5c.png
Are you sure it's the token id and not the token string that you need to use? osc token --trigger also uses the token string. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Am 25.10.18 um 10:13 schrieb Andreas Schwab:
On Okt 25 2018, Stephan Kulow <coolo@suse.de> wrote:
Am 25.10.18 um 09:23 schrieb Christian:
The URL is https://build.opensuse.org/trigger/webhook?id=$TOKEN_ID
The token_id is listed on osc tokens and you have to put the token itself as secret
Am 24.10.18 um 21:00 schrieb Stephan Kulow: the webhook config on GitHub is split up into two config parts .. 1) Payload URL: 2) secret
did you test it that way ?
coolo@cleopatra#~>osc token --create home:coolo demopac Create a new token <status code="ok"> <summary>Ok</summary> <data name="token">aWup8hf2dzF8c2GPfoKn1BpV</data> <data name="id">1920</data> </status>
And then paste aWup... into the secret: https://pasteboard.co/HK3ry5c.png
Are you sure it's the token id and not the token string that you need to use? osc token --trigger also uses the token string.
Well, you need both - don't ask me why. But it's in the code: https://bit.ly/2yzK1kx Greetings, Stephan -- Lighten up, just enjoy life, smile more, laugh more, and don't get so worked up about things. Kenneth Branagh -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On 10/25/2018 02:54 PM, Stephan Kulow wrote:
Am 25.10.18 um 10:13 schrieb Andreas Schwab:
On Okt 25 2018, Stephan Kulow <coolo@suse.de> wrote:
Am 25.10.18 um 09:23 schrieb Christian:
The URL is https://build.opensuse.org/trigger/webhook?id=$TOKEN_ID
The token_id is listed on osc tokens and you have to put the token itself as secret
Am 24.10.18 um 21:00 schrieb Stephan Kulow: the webhook config on GitHub is split up into two config parts .. 1) Payload URL: 2) secret
did you test it that way ?
coolo@cleopatra#~>osc token --create home:coolo demopac Create a new token <status code="ok"> <summary>Ok</summary> <data name="token">aWup8hf2dzF8c2GPfoKn1BpV</data> <data name="id">1920</data> </status>
And then paste aWup... into the secret: https://pasteboard.co/HK3ry5c.png Are you sure it's the token id and not the token string that you need to use? osc token --trigger also uses the token string.
Well, you need both - don't ask me why. But it's in the code: https://bit.ly/2yzK1kx Because GitHub creates a signature over the payload with this token. The token gets not transferred by GitHub. GitHub only transfers the id which OBS uses to verify this signature. This is a different concept than osc does. We just leveraged that there was already functionality to create tokens in OBS.
https://developer.github.com/webhooks/securing/#validating-payloads-from-git... Hope that helps. And yes, we should document this :) Christian -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Hi, everyone! I successfully integrated OBS and GitHub after reading previous messages on this mailing list: https://lists.opensuse.org/opensuse-buildservice/2018-05/msg00042.html https://lists.opensuse.org/opensuse-buildservice/2018-10/msg00034.html I made a begin-to-end how-to and published it: https://kamarada.github.io/en/2019/03/19/integrating-the-open-build-service-... It starts with an existing GitHub repository and an empty OBS package and ends with an integrated setup so that any git push to GitHub triggers a package rebuild in OBS. Please feel free to copy and paste it as is to an official place (maybe a wiki or the OBS blog), change the example to a more appropriate one if you want, I can also help if given the proper permissions and instructions. Only later I realized the OBS documentation has been updated with instructions on how to use GitHub webhooks: https://openbuildservice.org/help/manuals/obs-user-guide/cha.obs.source_serv... But all the necessary information is fragmented across the OBS guides. My how-to references Adrian's and Frank's texts, so I carbon copy them and again thank them for sharing information. Antonio The Linux Kamarada Project http://kamarada.github.io/ Em seg, 29 de out de 2018 às 09:22, Christian Bruckmayer <cbruckmayer@suse.com> escreveu:
And yes, we should document this :)
Christian
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Am 25.10.18 um 09:53 schrieb Stephan Kulow:
coolo@cleopatra#~>osc token --create home:coolo demopac Create a new token <status code="ok"> <summary>Ok</summary> <data name="token">aWup8hf2dzF8c2GPfoKn1BpV</data> <data name="id">1920</data> </status>
And then paste aWup... into the secret: https://pasteboard.co/HK3ry5c.png Thank you for the example ...
where should this be documented ? -- Christian ------------------------------------------------------------ https://join.worldcommunitygrid.org?recruiterId=177038 ------------------------------------------------------------ http://www.sc24.de - Sportbekleidung ------------------------------------------------------------
participants (7)
-
Adrian Schröter
-
Andreas Schwab
-
Christian
-
Christian Bruckmayer
-
Linux Kamarada
-
Neal Gompa
-
Stephan Kulow