From 4a89e9aaa64d7ceaf00856c623fd1f5dcc2139e0 Mon Sep 17 00:00:00 2001 From: Francois Kritzinger Date: Tue, 7 Jan 2025 11:18:01 +0200 Subject: Update INSTALL with instructions for enabling GitHub CI integration --- INSTALL | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 110 insertions(+), 1 deletion(-) diff --git a/INSTALL b/INSTALL index 94b73cf..7986b84 100644 --- a/INSTALL +++ b/INSTALL @@ -356,7 +356,116 @@ For sample CI request handler implementations see brep/handler/ci/. 6.4 Enabling GitHub CI integration -@@ TODO +6.4.1 Background + +The GitHub CI integration has one user-configurable setting: +warning= (whether or not to fail on warnings). + +In order not to have to support repository configuration files, a deployment +will consist of two registered GitHub Apps with the same webhook URL (i.e., +the same brep instance) but different query parameters: one with +warning=success and the other with warning=failure. The App id is passed (as a +query parameter) so that we know which private key to use (the key cannot be +shared between Apps). + +We will call the warning=success App the "Default App" and the warning=failure +App the "Werror App". + +6.4.2 Create the GitHub Apps + +To create a GitHub App under the organization, visit +https://github.com/organizations//settings/apps (Settings -> Developer +settings -> GitHub Apps). Then click on New GitHub App. + +App names (note: 34 character limit): + + Default App: " CI" + Werror App: " CI - warnings as errors" + +App description: + + Default App: "Trigger CI on branch push and pull request." + Werror App: "Trigger CI on branch push and pull request. Warnings are + treated as errors". + +App homepage: + + https://ci..org/ + +Skip the "Identifying and authorizing users" and "Post installation" sections. + +Leave webhooks active. + +Webhook URL: + + Default App: https://ci..org/?ci-github&app-id=XXX&warning=success + Werror App: https://ci..org/?ci-github&app-id=XXX&warning=failure + +Note that the App id only becomes available once the App has been registered +so we update it later in both URLs. + +Webhook secret: Use the same random 64-character string for both Apps. + + echo `tr -dc -- A-Za-z0-9