This repository has been archived on 2022-02-23. You can view files and clone it, but cannot push or open issues or pull requests.
archive_hook.sh/docs/faq.md

33 lines
1.6 KiB
Markdown
Raw Permalink Normal View History

2020-04-28 09:32:02 +00:00
# FAQ
2020-04-28 11:30:26 +00:00
## What is this for?
forgehook attempts to decouple the tight integration between repository ownership on a forge, and the ability to perform CI/CD tasks such as running tests or deploying an application/website.
Usecase 1: Automatically deploy your website/application from your shell account, without giving a 3rd party CI/CD tool (eg. [drone](https://drone.tildegit.org)) access to your shell.
Usecase 2: Maintain a central repository of files shared by different users. These users subscribe to the repository and run on each update a task to keep their $HOME copy updated. Example: dotfiles, a theme for a website.
Usecase 3: Empower users to run their own automated battery of tests on a repository. One user may wish to run the repository's provided test suite, while some users may need more specific testing for their personal usecase.
2020-04-28 09:32:02 +00:00
## How can i manually trigger update for a repo
If you want to integrate third-party tooling as an unprivileged user (i.e. not an endpoint), you can use the unprivileged `forgehook-trigger` command:
```
$ forgehook-trigger https://tildegit.org/tilde-fr/infra
```
This is handy in case you do not have ownership over the repository (and nobody on the server does), but you've got another channel at hand to receive updates (maybe an IRC bot).
## How can i trigger update for a repo system-wide?
So basically, you're building an endpoint! All you need is running `forgehook-notify` command. This requires group membership to the forgehook group, or root privileges:
```
# adduser notifier forgehook
# su notifier
$ # I am now privileged to notify updates for all users
$ forgehook-notify https://tildegit.org/tilde-fr/infra
```