Giter Club home page Giter Club logo

Comments (9)

cskiwi avatar cskiwi commented on September 26, 2024 1

Going to the github webhooks settings I get:

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <title>Error</title>
</head>

<body>
    <pre>Cannot POST /api/webhook/github</pre>
</body>

</html>

The webhook is: https://domain.com/api/webhook/github that should be correct right?
I have SSL and all configured with cert-manager

from kubero.

cskiwi avatar cskiwi commented on September 26, 2024 1

No. It should be https://domain.com/api/repo/webhooks/github

Where did this webhook URL come from? Kubero CLI?

//edit: added /api/ in the URL

Via the "Connect" button when creating a new pipeline

It also added :80 to the url, with the addition of /repo/webhooks and removing the :80 it works, Ill make a PR later today if not fixed by then :)

from kubero.

mms-gianni avatar mms-gianni commented on September 26, 2024 1

Found the config and fixed in version v0.0.158 of the operator

https://github.com/kubero-dev/kubero-operator/blob/v0.0.157/config/samples/application_v1alpha1_kubero.yaml#L59

from kubero.

mms-gianni avatar mms-gianni commented on September 26, 2024

Make sure your Pipeline is connected. It works only on connected repositories, since this process installs the webhook and creates the deployment keys.

You should see the webhooks github is sending here: https://github.com/cskiwi/yourRepo/settings/hooks

from kubero.

mms-gianni avatar mms-gianni commented on September 26, 2024

Oh and it's also important to use SSL on your webhook endpoint. I really need to mention this in the documentation somewhere.

from kubero.

mms-gianni avatar mms-gianni commented on September 26, 2024

No. It should be https://domain.com/api/repo/webhooks/github

Where did this webhook URL come from? Kubero CLI?

//edit: added /api/ in the URL

from kubero.

mms-gianni avatar mms-gianni commented on September 26, 2024

Sure. Still reviewing all your previous PR's 😄 appreciate them.

Wondering where the :80 came from then.

I was investigating, why this path is not listed in the API docs. It seems Swaggergen is ignoring the ".all" method.

https://github.com/kubero-dev/kubero/blob/main/server/src/routes/repo.ts#L47

from kubero.

cskiwi avatar cskiwi commented on September 26, 2024

I was looking into why the webhook was wrong, but I can't seem to find where it's set.
It is using the environment variable: KUBERO_WEBHOOK_URL

But I can't seem to remember setting it, and i find nothing in the code that would define this.

from kubero.

mms-gianni avatar mms-gianni commented on September 26, 2024

Interesting.

My first doubt was the kubero cli was proposing the wrong URL. But seems OK.

https://github.com/kubero-dev/kubero-cli/blob/8e7002d25ff1764f931f8e8131a9860029d76e8a/cmd/kuberoCli/install.go#L575

I plan to separate the webhook URL and the rest of the UI.

from kubero.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.