CControxity Docs
GuidesReferenceHTTP APIOpen Controxity
How to

Releases from CI, and a first setup

One command in CI tells Controxity what each release is and sends its source maps; one command writes a first controxity.yml and a guide for the fixer.

Controxity's command line is one file with no dependencies, for Node.js 18 or newer. Get it from your Controxity:

curl -fsSL https://your-controxity/sdk/cli.js -o controxity.js

In CI: release#

After the build, before or after the deploy:

CONTROXITY_URL=https://your-controxity CONTROXITY_KEY=$CONTROXITY_KEY \
  node controxity.js release --version 1.4.2 --maps dist

It does two things:

  1. Says what the release is. The version, and the git commit and branch it was built from. A place that reports 1.4.2 is then known to run that commit, so Controxity can tell which fixes it holds, even when your version numbers aren't in order (build-77, a date, a name). See Versions.
  2. Sends the source maps in --maps (any number of folders), each by its bundle's name: dist/assets/app.js.map is assets/app.js. When your frames name them with a folder in front, add it: --maps-prefix static. See Send source maps.
OptionDefault
--versionCONTROXITY_VERSION, else package.json's version, else the commit. Use the version the app gives init().
--commitThe CI's own (GITHUB_SHA, CI_COMMIT_SHA, BITBUCKET_COMMIT, CIRCLE_SHA1), else git rev-parse HEAD.
--branchThe CI's own, else git's.
--strictOff: when Controxity can't be reached it warns and your deploy goes on. With it, the step fails.
--jsonAlso print the result as one line of JSON.

It uses the place's server key (dep_…), the one the SDK uses. Each release is in the Activity record.

What it carries#

It answers with the fixes this release carries since the one before (on the same branch):

Controxity knows release 1.4.3 is 3f9c2a1b7d4e on main. 2 source maps saved.
It carries 2 fixes since 1a2b3c4:
  - The cart total no longer fails on an empty cart. (code:error:typeerror-src-cart-js-2-total, 1.4.2)
  - Shipping rates wait and retry when the carrier says 429. (code:error:fetcherror-src-shipping-js-57-rates, 1.4.3)

Those are fixes Controxity shipped, and your own commits that said Fixes code:error:…, whose commits this release holds. For release notes, --json also prints the result as one line of JSON. With no release before it, it lists what it holds from the last 30 days. When Controxity's copy of your code doesn't have the commit yet, it fetches it; if it still can't see it, it says so, and your deploy goes on.

- name: Tell Controxity
  run: |
    curl -fsSL "$CONTROXITY_URL/sdk/cli.js" -o controxity.js
    node controxity.js release --maps dist
  env:
    CONTROXITY_URL: ${{ vars.CONTROXITY_URL }}
    CONTROXITY_KEY: ${{ secrets.CONTROXITY_KEY }}

Once, in your repository: init#

node controxity.js init

It reads your repository, with no AI and nothing sent anywhere, and writes:

A file that's there already is left as it is (--force writes over controxity.yml). --dry-run shows what it would write. Read them over, then commit them: Controxity reads them from your code before each fix. See controxity.yml.

Controxity 1.132.0These pages are in the repository: docs/site