Concept · Steward
You merge, it builds
The Steward merges no one's pull requests. You merge your own once vouched for, and at its build times it tests the newest commit on each repository's branch once and releases its new version. How a build goes, when a vouch saves it the test, urgent fixes, and what to look at before you merge.
- Article
- 1303
- Applies to
- Steward 0.36.139
- Last reviewed
- For
- For developers
Who merges#
You do. Since Steward 0.36.124 the Steward merges no one's pull requests: it has no merge button, catches no pull request up with its branch, and keeps no queue of versions. Whoever writes a pull request merges it, once it's vouched for and GitHub says it merges cleanly.
The Steward's part comes after: at its build times, it takes what you merged, tests it once, and releases it.
How a change goes out#
- Claim its version before the work starts, or, in a repository that keeps its changelog entries in a
changes/folder, write its entry in the fileclaim-versionnames. See Versions claimed up front. - Push the branch, and open its pull request.
- Vouch for it, in the clone you pushed from:
vouchruns the repository's tests on this PC and marks the commit as tested. See Vouching for your work. - Merge it yourself, once GitHub says it merges cleanly: GitHub's Merge pull request button, or
gh pr merge <number> --repo <owner/name> --merge. - The next build releases it.
When it builds#
While it's on duty and Builds and releases by itself is on in its settings, the Steward builds at its build times: 00:00, 06:00, 12:00 and 18:00, every day, unless you change them in its settings' Build pipeline tab.
- Plugged in, the PC is woken a few minutes before each build. On battery it never is.
- A build the PC slept through begins once it wakes, and says it was late.
- Between builds it only looks: every 10 minutes it checks each repository's branch, pull requests and releases, and raises an alarm for anything that needs you. Nothing is released between builds, except an urgent fix (below).
With Builds and releases by itself off, as on a new install, there are no builds at set times. It releases only when you press a button: Release, or Run now, whose round builds when a build time has passed since its last build.
Build now, for when you can't wait, is build at a console: it asks you to type build first, and a script or a coding session can't run it. See The Steward's command line.
What a build does#
For each repository you checked for releasing:
- It takes the newest commit on the repository's branch.
- When that commit carries a version with no release yet, it runs the repository's tests on it, once, in a worktree of its own. It skips the test when a vouch already covers that commit (below), or when the same code already passed here. A failure is run once more, so one flaky test doesn't hold a release.
- When they pass, it releases that version, as How the Steward releases says.
A commit is tested once. If its test fails, that's a failed release, raised as an alarm at once, and the builds don't try that commit again: press Release once you've looked, or push a new commit, which is tested afresh. A repository with no tests is released untested, and its build says so.
A build takes at most 30 minutes (A build takes at most, in the Build pipeline tab). Then it releases what's ready, as it is, and ends.
Merge several pull requests between two builds and they go out as one release, at the newest version, its notes bringing every version merged since the last release.
When a vouch saves the test#
A build doesn't test a commit again when one of your team's accounts vouched for it (see Team in The Steward's settings). A vouch covers the branch's newest commit when it's on:
- that commit itself; or
- the pull request's head that a merge brought in unchanged: a pull request merged while it was up to date with its branch.
Anything else on the branch is tested at the build first.
An urgent fix#
A fix that can't wait for the next build gets a line in its changelog entry starting **Urgent fix:. Once it's merged, while Builds and releases by itself is on, its repository builds on its own at the next round, within minutes.
Each commit builds once this way: one whose release failed waits for a new commit or the next build. A repository with no release yet has no urgent build: its first release isn't an urgent fix.
Versions merged out of order#
A version below one already released isn't released. Its build says so: "v0.4.20 on its branch is below v0.4.22, released already: a version above it (claim-version) releases what is merged".
Claim a new version with claim-version, which hands out one above the branch's and every release's, and set it in a new pull request: its release brings what was merged.
The Steward's own pull requests#
The one kind of pull request the Steward merges is its own. In a repository that keeps its changelog entries in a changes/ folder, each build stamps them first: it gives them the release's version, sets it in the version files and folds the entries into CHANGELOG.md, on a branch of its own. Then it opens a pull request for that branch, and merges it at once. It never pushes straight to your branch. See Changelog entries in a changes folder.
A stamp pull request GitHub won't merge at once stays open. Merge it yourself, and the next build releases it.
Without pull requests#
A repository worked with plain git (on a host the Steward has no tool for, or with Source control set to Git) has no pull requests. You land your branch in the repository's branch yourself, and the next build tests its newest commit and releases it as a v<version> tag. There's no host to carry a vouch, so the build tests it itself.
Before you merge#
Related articles
Is this page right?
If something on it is wrong or out of date, tell us and we'll fix the page.
Still stuck? Write to support@castellan-software.com and mention article 1303. Every version of Steward, and what changed in it, is in its release notes.