Skip to main content

Deployments (DORA)

Push a deployment event from your CI/CD when you ship. Milestone uses it to compute your DORA deployment frequency, lead time, and change-failure rate.


Step 1 — Get your ingest token​

In your Milestone account, navigate to App Settings → Integrations → Deployments (DORA) and click Setup.

Copy the ingest token and save it as a CI/CD secret named MILESTONE_INGEST_TOKEN.

info

The token is shown only once and is not stored by Milestone. Regenerating a token issues a new one; the old one stays valid until it expires. If a token is exposed, contact Milestone support to rotate it.


Step 2 — Add a step to your pipeline​

Recipes require curl ≥ 7.76 and jq on the runner. Replace "your-service" in the snippets with the name of the service being deployed.

Add this as the last step of your deploy job in .github/workflows/deploy.yml:

- name: Report deployment to Milestone
if: success()
env:
MILESTONE_INGEST_TOKEN: ${{ secrets.MILESTONE_INGEST_TOKEN }}
REPOSITORY: ${{ github.repository }}
RUN_ID: ${{ github.run_id }}
RUN_ATTEMPT: ${{ github.run_attempt }}
REF_NAME: ${{ github.ref_name }}
COMMIT_SHA: ${{ github.sha }}
REPO_URL: ${{ github.server_url }}/${{ github.repository }}
run: |
curl -sS --fail-with-body -X POST "https://events.mstone.ai/deployments" \
-H "x-shared-secret: $MILESTONE_INGEST_TOKEN" \
-H "content-type: application/json" \
-d "$(jq -n \
--arg id "$REPOSITORY-$RUN_ID-$RUN_ATTEMPT-$GITHUB_JOB" --arg at "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
--arg st "success" --arg ref "$REF_NAME" --arg sha "$COMMIT_SHA" --arg repo "$REPO_URL" \
'{external_id:$id, triggered_at:$at, status:$st, service_names:["your-service"], repo_url:$repo, ref_name:$ref, commit_sha:$sha}')"

Step 3 — Test it​

Run this command to verify the connection. A {"accepted":1} response means Milestone received it. Set MILESTONE_INGEST_TOKEN in your shell first.

curl -sS --fail-with-body -X POST "https://events.mstone.ai/deployments" \
-H "x-shared-secret: $MILESTONE_INGEST_TOKEN" \
-H "content-type: application/json" \
-d '{"external_id":"test-1","triggered_at":"2026-07-19T14:32:00Z","status":"success","service_names":["your-service"]}'