Home / Reference

CI/CD

GitHub Actions keeps executing your pipelines. obskitpy shows them, builds the workflow file for you and governs what reaches each environment.

Connect GitHub

Press Connect with GitHub (on CI/CD → Pipelines, in the Pipeline builder, or on Integrations). A GitHub page opens with the code already copied: paste it, press Authorize, and the console lists your repositories (public and private, yours and your organizations') to add with one click. Nobody fills a form. The token is stored encrypted and never shown again; Disconnect removes it. The login asks for the repo, workflow and read:user scopes (read private repositories, open Pull Requests and write .github/workflows).

For whoever publishes or hosts obskitpy

GitHub signs people in through an OAuth App. obskitpy uses the device flow, which needs only the app's public Client ID (no secret, no callback URL). Register the app once (ticking Enable Device Flow) and put its Client ID in DEFAULT_CLIENT_ID (portal/services/github_account.py) so every installation shows just the button, or set OBSKITPY_GITHUB_CLIENT_ID on a deployment. Until one of those exists, the GitHub panel says it is not set up and offers an Advanced option to use your own OAuth App.

Prefer a fixed token, or running without the interface? Set these on the portal (observability/.portal.env) and restart it:

Variable Use
OBSKITPY_GITHUB_TOKEN a fine-grained token: Actions (read), and for publishing pipelines Contents and Pull requests (write)
OBSKITPY_GITHUB_WEBHOOK_SECRET signs the deliveries; without it the webhook endpoint refuses everything

In CI/CD → Pipelines, connect owner/name. obskitpy reads the latest runs and their jobs. For real time, add a webhook in the repository: URL https://YOUR-PORTAL/api/v1/cicd/webhook, content type JSON, the same secret, events Workflow runs and Workflow jobs. Each delivery is verified by its HMAC signature and applied once (repeated deliveries are ignored). Synchronize covers anything missed. The portal must be reachable by GitHub for webhooks.

Pipeline builder

CI/CD → Pipeline builder asks which repository and project type, when to run (pull request, push to main, manual), which checks (Ruff, Mypy, Pytest, pip-audit and Bandit, package build) and whether a release candidate goes to DEV or HMG. You review the YAML, and only after you confirm does obskitpy open a Pull Request with two files: .github/workflows/ci.yml (the checks) and .github/workflows/obskitpy-deploy.yml (the deploy workflow, see below). It never pushes to the default branch.

The workflow is made only of a fixed, reviewed catalog of jobs: there are no free-form commands. A generated pipeline never deploys to PRD by itself.

Releases and deployments

On a robot page, Releases registers an immutable release (version, commit, tag) and deploys it to an environment:

What a deployment does

A deployment that takes effect (DEV and HMG at once, PRD when approved) does three things:

  1. The agents run the released commit. The run carries the release's commit; the agent fetches exactly that commit instead of the head of the branch. Before the first deployment of an environment, DEV and HMG still run the branch head.
  2. GitHub is told. If the robot's repository (its repository URL) is connected, obskitpy creates a GitHub deployment for the commit in the environment development, staging or production (visible under Environments) and marks it as succeeded.
  3. The deploy workflow runs. obskitpy dispatches obskitpy-deploy.yml with the environment, robot, version and commit. That workflow runs only when dispatched (never on push or pull request) and passes the values through env: so a version string cannot inject commands. Add your own deploy steps at its end (container image, cloud job...). Protect the production environment in GitHub (required reviewers) if you want a second approval there.

GitHub is best effort: if it fails or the workflow is not on the default branch yet (the Pull Request is not merged), the deployment still counts and the reason is kept (hover the deployment on the robot page). Nothing is sent to GitHub before a PRD deployment is approved.

✎ Edit this page on GitHub