diff --git a/docs/api/source/includes/_jobs.md b/docs/api/source/includes/_jobs.md index c124781..6c08d49 100644 --- a/docs/api/source/includes/_jobs.md +++ b/docs/api/source/includes/_jobs.md @@ -33,10 +33,37 @@ force | Whether it's a forced build (true if present) +```shell +curl \ + -H 'x-api-key: secret' \ + 'https://example.com/api/v1/jobs/poll?arch=x86_64&max=2' +``` + +> JSON output format + +```json +{ + "message": "", + "data": [ + { + "target_id": 1, + "kind": "git", + "url": "https://aur.archlinux.org/discord-ptb.git", + "branch": "master", + "path": "", + "repo": "bur", + "base_image": "archlinux:base-devel", + "force": true + } + ] +} +``` + Poll the server for new builds. ### HTTP Request diff --git a/docs/api/source/includes/_logs.md b/docs/api/source/includes/_logs.md index ba6dada..d6134b7 100644 --- a/docs/api/source/includes/_logs.md +++ b/docs/api/source/includes/_logs.md @@ -125,8 +125,8 @@ id | ID of requested log @@ -152,6 +152,13 @@ Plaintext contents of the build log. ## Remove a build log +```shell +curl \ + -XDELETE \ + -H 'X-Api-Key: secret' \ + https://example.com/api/v1/logs/1 +``` + Remove a build log from the server. ### HTTP Request diff --git a/docs/api/source/includes/_targets.md b/docs/api/source/includes/_targets.md index 93a4e86..b71da84 100644 --- a/docs/api/source/includes/_targets.md +++ b/docs/api/source/includes/_targets.md @@ -27,6 +27,7 @@ curl \ "kind": "git", "url": "https://aur.archlinux.org/discord-ptb.git", "branch": "master", + "path" : "", "repo": "bur", "schedule": "", "arch": [ @@ -73,8 +74,9 @@ curl \ "kind": "git", "url": "https://aur.archlinux.org/discord-ptb.git", "branch": "master", + "path": "", "repo": "bur", - "schedule": "0 3", + "schedule": "0 2", "arch": [ { "id": 1, @@ -124,6 +126,7 @@ Parameter | Description kind | Kind of target to add; one of 'git', 'url'. url | URL of the Git repository. branch | Branch of the Git repository. +path | Subdirectory inside Git repository to use. repo | Vieter repository to publish built packages to. schedule | Cron build schedule (syntax explained [here](https://rustybever.be/docs/vieter/usage/builds/schedule/)) arch | Comma-separated list of architectures to build package on. @@ -149,12 +152,20 @@ Parameter | Description kind | Kind of target; one of 'git', 'url'. url | URL of the Git repository. branch | Branch of the Git repository. +path | Subdirectory inside Git repository to use. repo | Vieter repository to publish built packages to. schedule | Cron build schedule arch | Comma-separated list of architectures to build package on. ## Remove a target +```shell +curl \ + -XDELETE \ + -H 'X-Api-Key: secret' \ + https://example.com/api/v1/targets/1 +``` + Remove a target from the server. ### HTTP Request diff --git a/vieter.toml b/vieter.toml index 3f63d47..1f839f0 100644 --- a/vieter.toml +++ b/vieter.toml @@ -13,4 +13,3 @@ api_update_frequency = 2 image_rebuild_frequency = 1 max_concurrent_builds = 3 max_log_age = 64 -log_removal_schedule = '*/2 *'