Configuration
Where config lives
Section titled “Where config lives”The agent loads one config file per task from CONFIG_DIR (default ./config). The file name
matches the task name in the request URL: a request to /dc-agent/save-artifact/<name>/...
loads config/<name>.json.
Both JSON and YAML are accepted — the loader tries config/<name>.json first and falls back
to config/<name>.yml.
Two endpoints use a fixed, shared config file rather than a per-name one:
fetch-urlalways loadsconfig/fetch-url.json.docker/pushanddocker/checkalways loadconfig/dc-docker.json(the{name}in the URL is the service name, not the config file name).
The api-key model
Section titled “The api-key model”Every authenticated config has an apiKeys object:
{ "apiKeys": { "s3cr3t-value-the-caller-sends": "gitlab-ci" }}- The map key is the shared secret. The caller must send it in the
api-keyrequest header (or as the password of an HTTP BasicAuthorizationheader). - The map value is only a human-readable label identifying who owns that key. It is never matched against anything.
- Keys are stored in plaintext — anyone who can read
config/*.jsoncan read every live secret. Restrict file permissions and keep the config directory off shared storage.
You can list several keys to rotate or to identify multiple callers:
{ "apiKeys": { "key-for-gitlab": "gitlab-ci", "key-for-jenkins": "jenkins" }}A complete annotated example
Section titled “A complete annotated example”A save-artifact config, shown in both formats, with each field explained below. JSON has no
comments, so the annotations follow in the table; in YAML you can inline them instead:
{ "type": "SAVE_ARTIFACT", "apiKeys": { "REPLACE_WITH_A_LONG_RANDOM_SECRET": "gitlab-ci" }, "dir": "/opt/sbp-android", "extension": "apk"}type: SAVE_ARTIFACTapiKeys: REPLACE_WITH_A_LONG_RANDOM_SECRET: gitlab-cidir: /opt/sbp-androidextension: apk| Field | Meaning |
|---|---|
type |
The endpoint this command is called through (see the note above). |
apiKeys |
Accepted secrets → owner labels (see above). |
dir |
Directory on the host where the uploaded file is written. |
extension |
File extension appended to the stored artifact. |
Each command page documents the fields its own config accepts. For the full deploy-family parameter list, see the parameter reference.