acid/acid.adoc

109 lines
2.9 KiB
Plaintext
Raw Normal View History

2024-03-29 14:08:15 +01:00
acid(1)
=======
:doctype: manpage
:manmanual: acid Manual
:mansource: acid {release-version}
Name
----
acid - A Continuous Integration Daemon
Synopsis
--------
*acid* [_OPTION_]... acid.yaml [_COMMAND_...]
Description
-----------
*acid* run without command arguments will start an HTTP server that creates
2024-04-18 07:10:32 +02:00
and executes tasks against *git*(1) commits from a particular Gitea instance,
in accordance with the passed configuration file.
2024-03-29 14:08:15 +01:00
When a command is passed, *acid* will relay it to that running instance
2024-04-18 07:10:32 +02:00
of itself as an RPC call.
Tasks can be triggered to run either upon receiving Gitea push events
on the */push* endpoint, and/or using the RPC commands.
2024-03-29 14:08:15 +01:00
Options
-------
*-version*::
Output version information and exit.
Commands
--------
2024-04-14 22:24:33 +02:00
*enqueue* _OWNER_ _REPO_ _REF_ [_RUNNER_]...::
Create new or restart existing tasks for the given reference,
which will be resolved to a full commit hash.
*restart* [_ID_]...::
2024-03-29 14:08:15 +01:00
Schedule tasks with the given IDs to be rerun.
2024-04-14 22:24:33 +02:00
Run this command without arguments to pick up external database changes.
*reload*::
Reload configuration.
2024-03-29 14:08:15 +01:00
Configuration
-------------
For help with creating the configuration file, consult the _acid.yaml.example_
file present in the distribution.
All paths are currently relative to the directory you launch *acid* from.
The *notify*, *setup*, *build*, and *deploy* scripts are processed using Go's
2024-03-29 14:08:15 +01:00
_text/template_ package, and take an object describing the task,
which has the following fields:
*ID*::
Unique integer ID for each task.
*Owner*::
Gitea user owning the repository.
*Repo*::
Name of the repository.
*FullName*::
Full name of the repository, including the owner.
*Hash*::
Commit hash pertaining to the task.
*Runner*::
Runner ID.
*RunnerName*::
Descriptive name of the runner.
2024-12-26 15:26:33 +01:00
// Intentionally not documenting CreatedUnix, ChangedUnix, DurationSeconds,
// which can be derived from the objects.
*Created*, *Changed*::
`*time.Time` of task creation and last task state change respectively,
or nil if not known.
*CreatedAgo*, *ChangedAgo*::
Abbreviated human-friendly relative elapsed time duration
since *Created* and *Changed* respectively.
*Duration*::
`*time.Duration` of the last run in seconds, or nil if not known.
2024-03-29 14:08:15 +01:00
*URL*::
*acid* link to the task, where its log output can be seen.
*RepoURL*::
Gitea link to the repository.
*CommitURL*::
Gitea link to the commit.
*CloneURL*::
Gitea link for cloning the repository over HTTP.
2024-04-16 07:38:23 +02:00
The special *quote* template function quotes fields for safe usage
in *sh*(1) command arguments.
2024-03-29 14:08:15 +01:00
Runners
-------
Runners and deploy scripts receive the following additional
environment variables:
2024-03-29 14:08:15 +01:00
*ACID_ROOT*:: The same as the base directory for configuration.
*ACID_RUNNER*:: The same as *Runner* in script templates.
Reporting bugs
--------------
Use https://git.janouch.name/p/acid to report bugs, request features,
or submit pull requests.
2024-04-18 07:10:32 +02:00
See also
--------
*git*(1), *sh*(1)