From 36b4d735fa08a36c566897b5952dd49134e68320 Mon Sep 17 00:00:00 2001 From: "alvaro.gonzalez" Date: Tue, 21 Jan 2025 16:25:13 +0200 Subject: [PATCH 1/2] Add a better warning about branch names --- docs/cloud/rahti2/tutorials/webhooks.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/cloud/rahti2/tutorials/webhooks.md b/docs/cloud/rahti2/tutorials/webhooks.md index c4f6eb5c5a..8818de1892 100644 --- a/docs/cloud/rahti2/tutorials/webhooks.md +++ b/docs/cloud/rahti2/tutorials/webhooks.md @@ -2,10 +2,6 @@ Webhooks are URLs that allow triggering actions in a system. Rahti 2 supports webhooks to trigger rebuilds. This means that each BuildConfig is listening to a particular URL that includes a secret (more about that later), and that when this URL is called, a build will be triggered for a default branch. -!!! info "Default branch name" - - In Rahti 2 the default branch name is `master`. Branches named otherwise (e.g. GitHub's default value `main`) will be ignored, so make sure that both sides use the same branch name. - There are few types of formats supported: Generic, GitHub, GitLab and Bitbucket. This means that if the source code of the application is in Gitlab, the Gitlab URL type must be selected. ![Triggers](../../img/trigger.drawio.svg) @@ -30,6 +26,13 @@ When the `BuildConfig` is configured, you can get the URL via the webinterface. ![Copy URL with Secret](../../img/webhooks.png) + +!!! Warning "Default branch names do not match" + + You need to make sure that the branches in both sides (`Rahti2` and `GitHub`) match. In Rahti 2 the default branch name is `master`. But in GitHub the default branch name is `main`. This means that by default, any change in `main` will be ignored by Rahti2. + + If you want changes in `main` to be picked up by Rahti2, you need to: Edit the `BuildConfig`, click in `Show advanced Git options`, and add the correct branch name (in this case `master`) under `Git reference`. + ## GitHub Once you got the URL and the secret, go to . There you should go to the repository where the code is, and in **Settings -> Webhooks**, click in "Add webhook". From a8c25097523cd83d0beabfe33bbf09ab38ba6889 Mon Sep 17 00:00:00 2001 From: Joonas Somero Date: Thu, 23 Jan 2025 09:30:49 +0200 Subject: [PATCH 2/2] Clarify --- docs/cloud/rahti2/tutorials/webhooks.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/cloud/rahti2/tutorials/webhooks.md b/docs/cloud/rahti2/tutorials/webhooks.md index 8818de1892..da1448927b 100644 --- a/docs/cloud/rahti2/tutorials/webhooks.md +++ b/docs/cloud/rahti2/tutorials/webhooks.md @@ -26,12 +26,15 @@ When the `BuildConfig` is configured, you can get the URL via the webinterface. ![Copy URL with Secret](../../img/webhooks.png) - !!! Warning "Default branch names do not match" - You need to make sure that the branches in both sides (`Rahti2` and `GitHub`) match. In Rahti 2 the default branch name is `master`. But in GitHub the default branch name is `main`. This means that by default, any change in `main` will be ignored by Rahti2. + You need to make sure that the branch names match between Rahti 2 and GitHub. In Rahti 2, the default branch name is `master`, but in GitHub, the default branch name is `main`. This means that—by default—any change in a GitHub branch named `main` will be ignored by Rahti 2. + + If you want changes in `main` to be picked up by Rahti 2, you need to: - If you want changes in `main` to be picked up by Rahti2, you need to: Edit the `BuildConfig`, click in `Show advanced Git options`, and add the correct branch name (in this case `master`) under `Git reference`. + 1. Edit the **BuildConfig** + 1. Expand **Show advanced Git options** under **Source** + 1. Add the correct branch name (in this case `master`) under **Git reference**. ## GitHub