github kimdre/doco-cd v0.134.0

2 hours ago

What's Changed

Role- and permission-based API keys

Caution

Breaking change
API_SECRET and API_SECRET_FILE are no longer supported. Migrate to API_KEYS or API_KEYS_FILE (see below), assigning full to a key that needs the former all-access behavior (See the wiki for migration steps).
Remove the legacy variables entirely; their presence prevents startup.

API keys can now be assigned cumulative role presets or explicit permissions. Authorization is enforced across both the REST API and MCP tools: REST requests without the required permission are denied, and MCP exposes only the tools allowed by the key’s grant.

See REST API -> authentication to see how to set it up:

Role presets

The role presets are cumulative:

  • read grants read access to health, jobs, runs, and sync windows
  • inspect adds Compose project and Swarm stack inspection
  • write adds workload control, job and poll triggers, and mirror compaction
  • full adds project and stack deletion.

Explicit permissions

For more precise access, configure a key with an explicit permissions list instead of a role. See the wiki for available permissions.
Explicit permissions grant only the listed capabilities.

- key: read-only-key
  role: read
- key: deploy-key
  permissions:
    - projects:inspect
    - projects:control

New label to configure scheduled job timeouts

Prevent hung jobs from blocking future runs with the new cd.doco.job.timeout label:

labels:
  cd.doco.job.enabled: "true"
  cd.doco.job.schedule: "0 2 * * *"
  cd.doco.job.execution_mode: "one_off"
  cd.doco.job.timeout: "1h"

When the deadline expires, doco-cd gracefully stops the workload, restores any stop_services targets, marks the run as failed, and releases skip_running. Timeouts use the existing failure notifications and error metrics, and also apply to manual executions.

  • Supported modes: standalone restart and one_off, plus Swarm one_off. Swarm restart jobs cannot use a timeout.
  • Recovery: recovered one_off jobs retain their original deadline rather than receiving a fresh timeout. Restart-mode deadlines do not survive a doco-cd restart.
  • Timing: workload preparation counts toward the timeout; stopping and restoring stop_services does not. Graceful shutdown can extend beyond the deadline.

Accepts positive Go durations such as 90s, 30m, or 1h30m. Unset or empty means unlimited runtime, preserving existing behavior.

🚨 Breaking Changes

  • feat(api)!: add role- and permission-based API keys by @kimdre in #2180

✨ Features

  • feat(scheduler): add configurable job timeouts by @kimdre in #2193

🐛 Bug Fixes

📦 Dependencies

  • chore(deps): update golang:1.27.3 docker digest to e519d3b by @renovate[bot] in #2159
  • chore(deps): update docker/github-builder digest to a31d231 by @renovate[bot] in #2158
  • fix(deps): update module filippo.io/age to v1.3.2 by @renovate[bot] in #2161
  • fix(deps): update aws-sdk-go-v2 monorepo by @renovate[bot] in #2160
  • chore(deps): update docker/login-action action to v4.8.0 by @renovate[bot] in #2163
  • fix(deps): update module github.com/testcontainers/testcontainers-go to v0.45.0 by @renovate[bot] in #2165
  • fix(deps): update module github.com/avast/retry-go/v5 to v5.1.1 by @renovate[bot] in #2164
  • chore(deps): update dependency zensical to v0.1.0 by @renovate[bot] in #2162
  • chore(deps): update gcr.io/distroless/base-debian13 docker digest to ca90dc2 by @renovate[bot] in #2166
  • fix(deps): update module github.com/getkin/kin-openapi to v0.153.0 by @renovate[bot] in #2167
  • fix(deps): update aws-sdk-go-v2 monorepo by @renovate[bot] in #2169
  • fix(deps): update module github.com/go-co-op/gocron/v2 to v2.23.1 by @renovate[bot] in #2170
  • fix(deps): update module golang.org/x/sync to v0.25.0 by @renovate[bot] in #2171
  • fix(deps): update module golang.org/x/sys to v0.50.0 by @renovate[bot] in #2172
  • chore(deps): update dependency zensical to v0.1.1 by @renovate[bot] in #2177
  • fix(deps): update aws-sdk-go-v2 monorepo by @renovate[bot] in #2179
  • fix(deps): update module github.com/docker/compose/v5 to v5.7.1 by @renovate[bot] in #2183
  • chore(deps): update dependency markdown-exec to v1.13.0 by @renovate[bot] in #2184
  • chore(deps): update gcr.io/distroless/base-debian13 docker digest to 0e48b9b by @renovate[bot] in #2188
  • chore(deps): update docker:29-dind docker digest to 7bf70dc by @renovate[bot] in #2192
  • chore(deps): update docker/buildx-bin docker tag to v0.39.0 by @renovate[bot] in #2189
  • fix(deps): update module github.com/moby/buildkit to v0.35.0 by @renovate[bot] in #2190
  • fix(deps): update module golang.org/x/crypto to v0.59.0 by @renovate[bot] in #2191

New Contributors

Full Changelog: v0.133.2...v0.134.0

Don't miss a new doco-cd release

NewReleases is sending notifications on new releases.