Skip to main content

Other CI providers

The Docker image ghcr.io/mankinds/ci works with every CI that can run a container as a build step. The pattern is always the same: inject MANKINDS_API_KEY, run mankinds-ci --agent ..., and let the exit code decide the build status.

CircleCI

version: 2.1
jobs:
mankinds_eval:
docker:
- image: ghcr.io/mankinds/ci:v1
steps:
- run:
name: Mankinds quality gate
command: mankinds-ci --agent 00000000-0000-4000-8000-000000000000
workflows:
build_and_eval:
jobs:
- mankinds_eval:
context: mankinds # CircleCI context carrying MANKINDS_API_KEY
filters:
branches:
only: main

Set MANKINDS_API_KEY in Organization Settings → Contexts → mankinds → Add environment variable.

Bitbucket Pipelines

image: atlassian/default-image:4

pipelines:
branches:
main:
- step:
name: Mankinds quality gate
image: ghcr.io/mankinds/ci:v1
script:
- mankinds-ci --agent 00000000-0000-4000-8000-000000000000

Set MANKINDS_API_KEY as a Secured Repository variable in Repository settings → Pipelines → Repository variables.

Jenkins

Declarative pipeline using the Docker plugin:

pipeline {
agent {
docker {
image 'ghcr.io/mankinds/ci:v1'
args '-e MANKINDS_API_KEY=$MANKINDS_API_KEY'
}
}
environment {
MANKINDS_API_KEY = credentials('mankinds-api-key')
}
stages {
stage('Mankinds quality gate') {
steps {
sh 'mankinds-ci --agent 00000000-0000-4000-8000-000000000000'
}
}
}
}

Create the credential mankinds-api-key in Manage Jenkins → Credentials → System → Global credentials as a "Secret text" entry.

Generic Docker pattern

Any CI that runs containers can run the gate:

docker run --rm \
-e MANKINDS_API_KEY=$MANKINDS_API_KEY \
ghcr.io/mankinds/ci:v1 \
--agent 00000000-0000-4000-8000-000000000000 \
--base-url https://app.mankinds.io \
--timeout-minutes 30

The container exits 0 when the gate passes and non-zero when the gate fails or cannot be checked.

Without Docker (curl + jq)

If your runner cannot pull images, call the public API directly:

  1. POST /api/v1/agents/{agent_id}/runs with X-API-Key.
  2. Poll GET /api/v1/agents/{agent_id}/runs/{run_id} until the run is terminal.
  3. Fail the job unless results.gate.passed is true.

The Docker image exists to keep that polling and exit-code handling out of your CI scripts.

See also