Better doc
This commit is contained in:
parent
205143d7a7
commit
a209695949
2 changed files with 30 additions and 14 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
albatros
|
43
README.md
43
README.md
|
@ -67,6 +67,34 @@ $ curl http://localhost:8080/build?job=builder%2Fdispatch-1678866433-15aad86a
|
|||
|
||||
Of course, most of that will be handled by Gitea.
|
||||
|
||||
## Writing your build script
|
||||
|
||||
You must create an executable `.albatros` file at the root of your repository.
|
||||
Then, you can use the interpreter you want to execute it, let use `bash`
|
||||
as an example, but please use python, javascript, or anything else that has
|
||||
proper error handling...
|
||||
|
||||
```bash
|
||||
#!/usr/bin/env bash
|
||||
echo "Building commit $COMMIT"
|
||||
go build
|
||||
```
|
||||
|
||||
During the build, the following environment variables are available:
|
||||
|
||||
```bash
|
||||
REPO_URL=https://git.deuxfleurs.fr/quentin/albatros.git
|
||||
COMMIT=3fff73597f8ca18ef04c0d9bf64132ba55aadcaa
|
||||
BRANCH=main
|
||||
FLAVOR=default
|
||||
SECRET1=xxx
|
||||
SECRET2=xxx
|
||||
```
|
||||
|
||||
## Registering a webhook in Gitea
|
||||
|
||||
*Todo*
|
||||
|
||||
## Security model
|
||||
|
||||
Albatros only tries to protect your secrets.
|
||||
|
@ -99,20 +127,7 @@ read the content of your environment variable. It should not be that hard,
|
|||
containers use PID namespace by default, so one containerized process
|
||||
can not access process information of other processes in the system.
|
||||
|
||||
## Writing your build script
|
||||
|
||||
The following variables will be
|
||||
|
||||
```bash
|
||||
REPO_URL=https://git.deuxfleurs.fr/quentin/albatros.git
|
||||
COMMIT=3fff73597f8ca18ef04c0d9bf64132ba55aadcaa
|
||||
BRANCH=main
|
||||
FLAVOR=default
|
||||
SECRET1=xxx
|
||||
SECRET2=xxx
|
||||
```
|
||||
|
||||
## Ideas
|
||||
|
||||
- [ ] Register the builder programatically
|
||||
- [ ] Allow user to define it's own set of builders (ones with more CPU+RAM, etc.)
|
||||
- [ ] Allow users to define their own set of builders (ones with more CPU+RAM, etc.)
|
||||
|
|
Loading…
Reference in a new issue