Add shared CI delivery command
This commit is contained in:
29
docs/cli.md
29
docs/cli.md
@@ -1,6 +1,6 @@
|
||||
# Command line
|
||||
|
||||
ReleaseKit currently provides five commands. The exit statuses below belong
|
||||
ReleaseKit currently provides six commands. The exit statuses below belong
|
||||
to the native executable. `go run` examples are convenient for source execution,
|
||||
but the Go driver maps a nonzero child exit status to 1. Use the built executable
|
||||
or `./scripts/release` for publication when distinct statuses are needed.
|
||||
@@ -125,3 +125,30 @@ artifacts and retry with `--assets DIR`. Matching content is kept and only
|
||||
known missing assets are added. See the
|
||||
[delivery consumer guide](consumers/delivery.md) and
|
||||
[Gitea integration guide](integrations/gitea.md).
|
||||
|
||||
Prepare a tagged CI checkout and deliver it:
|
||||
|
||||
```sh
|
||||
releasekit ci-deliver [--repo DIR] [--config FILE] [--remote NAME] --commit OID VERSION
|
||||
```
|
||||
|
||||
`ci-deliver` fetches `VERSION` from the selected Git remote (default `origin`),
|
||||
requires the tag's peeled commit to match the required full `--commit` object
|
||||
ID, and checks out that commit detached. It then loads the profile from the
|
||||
prepared checkout, validates delivery settings and the configured token, and
|
||||
downloads application dependencies only when the profile selects build targets.
|
||||
Binary profiles are built and delivered through the same facade path as
|
||||
`deliver`; source-only profiles skip dependency downloads and binary builds.
|
||||
`--config` follows the existing profile path rules: relative paths are resolved
|
||||
from `--repo`, and absolute paths are used as-is. This command explicitly
|
||||
prepares and changes the selected checkout. Ordinary `deliver` continues to
|
||||
operate on already prepared source without fetching, checking out, or
|
||||
downloading dependencies.
|
||||
|
||||
In Woodpecker, pass `CI_WORKSPACE`, `CI_COMMIT_SHA`, and `CI_COMMIT_TAG` as the
|
||||
repository, expected commit, and version arguments. The CLI does not read
|
||||
provider-specific environment variable names. Checkout and dependency
|
||||
preparation failures return status 1; usage, profile, credential, and invalid
|
||||
version errors return status 2. Final delivery uses the same statuses as
|
||||
`deliver`: 0 for complete, 1 for known failure, conflict, or partial delivery,
|
||||
and 3 for uncertain remote state.
|
||||
|
||||
Reference in New Issue
Block a user