Documentation menu
Guides

Report deploys from your pipeline

Tell Skaftor what your own CI/CD deployed: create a report token, post started/finished/failed events from your deploy script, and see them on Ship › Environments.

When your team or pipeline deploys an environment, Skaftor learns what's live from pipeline reports. This works with any CI that can run curl — GitHub Actions, GitLab CI, Jenkins and others.

1. Make a report token

In Settings › "Environments", open an environment your team deploys and under "Pipeline reports" select "Make a token". It's shown once — store it in your pipeline's secret SKAFTOR_REPORT_TOKEN.

Only ever send the token in the Authorization header. A token sent in a URL or request body is revoked automatically.

2. Report from your deploy script

Send a started event before the deploy and a finished event once the rollout completes (or failed if it didn't):

curl -sS --fail-with-body --retry 5 -X POST https://app.skaftor.com/api/deploy-report \
  -H "Authorization: Bearer $SKAFTOR_REPORT_TOKEN" -H "Content-Type: application/json" \
  -d '{"event":"finished","component":"api","commit":"'"$GITHUB_SHA"'",
       "runId":"'"$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT"'",
       "sentAt":"'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'","rolloutFinished":true}'

Settings shows a complete, copy-ready script for your environment, with commit and run-id hints for GitHub Actions ($GITHUB_SHA), GitLab ($CI_COMMIT_SHA) and Jenkins ($GIT_COMMIT). By default a failed report doesn't fail the deploy; set SKAFTOR_REPORT_STRICT=1 to make it.

3. See it in Skaftor

Ship › "Environments" shows each component's commit, who reported it, the run link, and its state. A deploy that started but never finished is shown as "Did not finish" after the time you set.

Alternatives

  • Mark as deployed — record a deploy by hand on Ship › Environments.
  • Deploy hook — let Skaftor ask your receiver to deploy a branch through a signed webhook; your pipeline then reports what ran.

Related