Fistron docs

fistron.io

Install a pull request

Your CI tests the code, but it never installs the product the way a user does: an installer change, a change of the server’s setup or an upgrade path is first exercised after the merge. With a label on a pull request, Fistron installs the pull request’s build on a clean machine, upgrades to it from the last release, runs the tests the change needs and answers on the pull request (ADR 0141).

Before you start

Set it up

  1. Set the setting pr-installation (or write .fistron/pr-installation.toml): the labels (fistron-install, fistron-upgrade, fistron-migrate by default), the kit, the targets and, for the tests’ selection, the Fast Feedback Loop’s tier.
  2. Write the kit: install installs the pull request’s build, upgrade installs the last release and upgrades to it, test runs the tests (only those in FISTRON_SELECTED_TESTS when Fistron selected). Other builds, such as the pull request’s installer, are named {with.<name>.path}.
  3. Add a workflow on the labels: it builds the pull request’s build and signs it (cosign, keyless), then runs fistron validation request with the pull request, its labels and the builds by digest. The job waits for the answer: it passes only when every path passed.

The settings and the kit are read from your repository’s base branch, not from the pull request: a pull request changes what is installed, never what the agent runs.

Through your team’s own pipeline

If your CI already installs the product (Jenkins, GitHub Actions or GitLab CI), Fistron can use that pipeline instead of a kit (ADR 0158). In the setting pr-installation, set executor = "pipeline" and [pipeline]:

The answer on the pull request is the same as with a kit: each path’s verdict with a link to its run, where it stopped, the step that failed and the RCA. A newer push replaces the older run: Fistron stops a run it started, and leaves your CI’s own runs.

An example of two repositories, each installed by its own pipeline: examples/pr-installation-pipeline in Fistron’s repository. The installer’s pull requests go through a Jenkins pipeline (its Jenkinsfile), the server’s through a GitHub workflow (.github/workflows/pr-install.yml); both run the same QE stages (provision, install, upgrade, smoke tests, Cucumber), and each pins the other repository’s build (with.server.reference, with.installer.reference). Its .fistron/pr-installation.toml files are what the form below keeps.

In the GUI

Open Quality and delivery > Install each pull request in your project and name the repository:

  1. How it installs: first Read the pipeline: name its CI and the pipeline, and Read its parameters and stages asks the agent to read it, starting nothing. It shows each parameter with the source Fistron proposes for it, the proposed NAME = source lines to copy into Its parameters, and the pipeline’s stages. Then the setting as a form: Who installs (your team’s pipeline or the kit), the labels, the pipeline’s CI and its name, This pipeline is a test or a staging pipeline (until you confirm it, Fistron starts nothing), who starts its run, Its parameters as NAME = source lines, the stages of each path and the time limits. Keep the installation of a pull request checks the setting as Fistron reads it before it is kept.
  2. A trial run: a pull request’s number, head, labels and build; Run it once installs it without a comment on the pull request. Tick I start the pipeline’s run from here when ci-run-start is at decide: a person’s start from Fistron is then enough.
  3. The runs: each installation on Work, with its record.

The agent needs no [validation] for your team’s pipeline: it reads the pipeline with its CI connector ([acquisition.jenkins], .github or .gitlab) and starts and stops runs through the write path ([actions.jenkins], or the repository’s GitHub or GitLab group, with ci-run-start and ci-run-stop).

Ask for an installation

  1. Open the pull request and add the label fistron-install; add fistron-upgrade for the upgrade from the last release and fistron-migrate for a migration’s rehearsal.
  2. The workflow starts. Each new push to the pull request while the label stays installs again; a newer push cancels the run of the older one.
  3. To stop, remove the label.

Read the answer

Fistron comments on the pull request, one comment updated in place:

Part Says
The table each path (install, upgrade, migrate), its target and its verdict: passed, failed (a test failed), error (a step failed: the installer, the machine) or refused (the build’s signature, a target that is not clean); why
Build, With the builds installed, by reference
Tests how many tests the Fast Feedback Loop selected for the files the pull request changes, or why the kit ran its own set
Why a path failed the cause from the failed run’s RCA, and the report among the project’s documents

In the control plane, open the project’s Work and the work pr-installation: its result and the documents (each path’s run record, the RCA’s report, pr-installation.json).

Troubleshooting

You see Cause and fix
The job waits, then exits 2 No agent took the work: an agent that may run kits and reaches the repository is needed; the work’s page says which it waits for.
refused: “neither provisioned for the run, reset before it nor ephemeral” The target in .fistron/pr-installation.toml is not clean: use one with provision, reset or ephemeral.
refused: the build’s signature The agent does not trust your workflow’s identity: its [validation.trust.pull-requests] names the workflow.
error: “machines of … are up (max_at_once …)” Earlier runs’ machines still exist: wait, or raise max_at_once. A machine left over is reported with every run until it is destroyed.
“not published: the pull request’s head is now …” A newer push came while it ran: its own run answers.
No comment, the job passed The write path does not allow pr-installation for the repository.

Next