self-hosted runner for codeberg repo #762

Open
opened 1 month ago by biop0765 · 5 comments

Is it possible to add a self-hosted CI-runner to my repo? I see that woodpecker is suggested but I cannot find how to add it to my repo.

Many thanks for the initiative.

(Context: we are large scientific institute that runs jobs locally on servers using gitlab[.]com/repos but some people do not like to use non-DE servers to host scientific code. We would like to suggest they host their code in codeberg - but can run jobs from in-house runners) The code themselves are tiny only - but the jobs take lots of time.

Is it possible to add a self-hosted CI-runner to my repo? I see that woodpecker is suggested but I cannot find how to add it to my repo. Many thanks for the initiative. (Context: we are large scientific institute that runs jobs locally on servers using gitlab[.]com/repos but some people do not like to use non-DE servers to host scientific code. We would like to suggest they host their code in codeberg - but can run jobs from in-house runners) The code themselves are tiny only - but the jobs take lots of time. <!-- NOTE: If your issue is a security concern, please send an email to contact@codeberg.org (and if related to Gitea also to security@gitea.io) instead of opening a public issue. Thank you. Welcome to the Codeberg Community Tracker. This is the right place for bug reports, feature requests and feedback. It's the central place where we track progress and discuss, so please open issues here unless you are sure it's directly related to a specific Codeberg product and only some contributors there need to join the discussion. Easy rule: If you are unsure, report it here. When reporting bugs or asking for features in the software itself, please understand that Codeberg is a fork of Gitea. Please always check upstream (→ see FAQ) if your there is already an open issue. If not, you'd really help us if you could directly get in touch with the maintainers and open an issue here if you think a wider audience should know about that (e. g. when discussing hotfixes, backports or when discussing whether some feature should become part of Gitea or a Codeberg "add-on"). If you don't have a GitHub account, please mention this and we'll gladly forward your report to the Gitea maintainers. Thank you for reporting your findings and giving feedback on Codeberg. ## Some FAQ: ### What does upstream mean? Upstream refers to Gitea, the software Codeberg is built upon. If we ask you if you can report upstream, please visit https://github.com/go-gitea/gitea/issues and check for the bug there and report elsewise. It's usually good if the person interested in a feature or bugfix opens the request to react to questions and join the discussion. We would usually just fire the report, but won't find the time to properly react to that ... **If you do not have a GitHub account**, just tell us and we'll happily forward the report for you. ### I just noticed a typo in the sign_up / sing_up route when regis... No, this is not a typo, but intentional. It was a quick fix to avoid spammers targetting our instance and it actually worked out quite well to rename the route from sign_up to sing_up (few people notice, nice to see you have sharp eyes) ... we might have to take more effective countermeasures in the future, but for now we're actually quite good with that one ... ### How can I help? If you want to help improving Codeberg as a community home for software development, we'll gladly welcome your contribution. Check out the docs about improving Codeberg https://docs.codeberg.org/improving-codeberg/ and have a look at the open issues, especially those that are looking for contribution https://codeberg.org/Codeberg/Community/issues?state=open&labels=105 - some of them don't even require much coding knowledge. We are also happy if you forward bug reports to Gitea if the original author hasn't done that yet or hasn't got a GitHub account. -->
Owner

Hey, yes this is possible, but out of scope for Codeberg / Woodpecker. If you have your self-hosted CI runner, e.g. WoodpeckerCI, Drone, (some others), or self-written, you can connect them to the Gitea API. This is commonly done, and not hard to do (if you have a software that already supports the Gitea API).

For example, in order to connect a custom instance of Woodpecker to Codeberg, you'll need to install Woodpecker on your systems and configure them according to these docs https://woodpecker-ci.org/docs/administration/vcs/gitea (Codeberg is based on Gitea).
This might also work for other solutions you might be running.

Please let us know if you require further assistance.

Hey, yes this is possible, but out of scope for Codeberg / Woodpecker. If you have your self-hosted CI runner, e.g. WoodpeckerCI, Drone, (some others), or self-written, you can connect them to the Gitea API. This is commonly done, and not hard to do (if you have a software that already supports the Gitea API). For example, in order to connect a custom instance of Woodpecker to Codeberg, you'll need to install Woodpecker on your systems and configure them according to these docs https://woodpecker-ci.org/docs/administration/vcs/gitea (Codeberg is based on Gitea). This might also work for other solutions you might be running. Please let us know if you require further assistance.
Poster

Thank you for quick reply. So one needs to create the 3 variables from
https://codeberg.org/user/settings/applications

+     - WOODPECKER_GITEA=true
+     - WOODPECKER_GITEA_URL=${WOODPECKER_GITEA_URL}
+     - WOODPECKER_GITEA_CLIENT=${WOODPECKER_GITEA_CLIENT}
+     - WOODPECKER_GITEA_SECRET=${WOODPECKER_GITEA_SECRET}

Is the value for WOODPECKER_GITEA_URL https://codeberg.org/authorize correct?

Many thanks

Thank you for quick reply. So one needs to create the 3 variables from https://codeberg.org/user/settings/applications ``` + - WOODPECKER_GITEA=true + - WOODPECKER_GITEA_URL=${WOODPECKER_GITEA_URL} + - WOODPECKER_GITEA_CLIENT=${WOODPECKER_GITEA_CLIENT} + - WOODPECKER_GITEA_SECRET=${WOODPECKER_GITEA_SECRET} ``` Is the value for WOODPECKER_GITEA_URL https://codeberg.org/authorize correct? Many thanks
Owner

I guess the URL just needs to be the URL of the instance, e.g. https://codeberg.org

I guess the URL just needs to be the URL of the instance, e.g. https://codeberg.org

Yes, WOODPECKER_GITEA_URL is just the instance, so https://codeberg.org.

Yes, `WOODPECKER_GITEA_URL` is just the instance, so `https://codeberg.org`.
Poster

Thank you all. I will report back in a few days.

Thank you all. I will report back in a few days.
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: Codeberg/Community#762
Loading…
There is no content yet.