Repository navigation
Conversation
On noetic-devel, the robot container workflow now publishes the images that passed the smoke test, for arm64 and amd64, as ghcr.io/ros-mobile-robots/diffbot-robot. The robot downloads the image instead of building it, and a published version can be installed again. The build jobs stay read-only. On noetic-devel they save the tested image as an artifact. A separate publish job, the only one with packages: write, loads both archives, checks their platform and commit, pushes them and combines them: noetic-<commit> per commit, never replaced, and noetic, which moves only forward in git history. Pull requests publish nothing. compose.yaml uses the published image unless .env sets ROBOT_IMAGE. docker compose up -d --no-build downloads it, docker compose pull --policy always updates it, and ROBOT_IMAGE=diffbot-robot:local with up -d --build --pull never builds local changes. CI's Compose smoke test uses the image it just built.
publish_image.sh now copies the archives with skopeo as OCI manifests, so the combined index keeps its description and commit annotations also when the runners' classic image store saved the images. It checks both archives' platform and commit without loading them. A tag counts as missing only when the registry says so. A denied read, after three tries, stops the job, so that a failed read can't lead to replacing a published version. Only a manual run with first_publication set takes a package that both tags can't be read from as not existing yet. check_version now requires an OCI index with the commit annotation, exactly one image per architecture without attestations, and the commit label in each image. noetic must carry a commit annotation, and with this commit also this version's digest.
With first_publication, publish_image.sh now creates the package under the separate tag first-publication, then reads the version and noetic again. It writes them only if both read as present or missing, so an existing version is reused, and noetic still moves only forward. If the reads stay denied, it stops. check_version also compares each image's own platform with its index entry, and requires the description annotation.
3 tasks
The workflows table takes the Firmware and PR description rows of noetic-devel and keeps this branch's Robot container row, which says that the workflow publishes the tested images.
This was referenced Nov 13, 2026
publish_image.sh asked with docker buildx whether a tag exists and took every error text with "not found" for a missing tag. A login helper that isn't installed and a token service that answers 404 print that too. The script now asks with skopeo, which prints the registry's own error code. Only "manifest unknown" for the requested tag counts as missing. A registry that doesn't know the repository counts as unreadable, like a denial: only a first-publication run may answer that with a write. Other errors stop the job after three tries. test_publish_image.sh runs the script with stand-ins for skopeo and docker and compares the writes the script attempts with the expected ones, for each answer of the registry.
…ocal compose.yaml had the published image's name and a build section on the same service, so a build on the robot was stored under the published name. compose.yaml now only runs an image. compose.build.yaml holds the build, with the fixed name diffbot-robot:local for both services. Without a build section, --no-build has nothing to prevent: the commands in the comments drop it.
- The workflow names each action by the full commit of a release. - Both base images are named by tag and index digest, and remo_robot.repos names the lidar driver by one commit, so both architectures' builds start from the same inputs. - The image no longer carries org.opencontainers.image.licenses. - The build job checks the settings template with compose.build.yaml too and runs test_publish_image.sh. - The comment on the publish queue says when GitHub cancels a run. - The Dockerfile's header says that RViz is in the image.
- The README names the bench check on Remo and what is still open, the two places for the ROS master with the lidar's condition, the own build with compose.build.yaml, and the two new files. - smoke_test.sh says that it lists the lidar driver's node and doesn't start the driver. - The workflows table says when the workflow runs.
- compose.build.yaml stands alone, with a service of its own. Combined with compose.yaml in either order, the build keeps the name diffbot-robot:local. A CI step checks that. - publish_image.sh counts a read as unreadable only for the registry's own refusals: a denied or unauthorized manifest request, an unknown repository, or a 403 of the token service. A login file that can't be read says "permission denied" too and now stops the job, also in a first publication. - test_publish_image.sh passes a login file and checks that every skopeo call gets it, gives each architecture its own digest, and compares all arguments of each index creation. New tests: an unreadable login file, and one denied read next to a missing tag. - env.example and compose.yaml say that the lidar switch needs the ROS master on the PC.
- The CI step for the name of a local build turns every profile on, so that the lidar service counts, and also reads the tags of a build section. - test_publish_image.sh checks an option and its value as two arguments and notes each argument of an index creation on its own. Two sources passed as one argument now fail the test.
The publisher combines the two images under a staging tag, noetic-<commit>-index, checks that index, and only then gives its digest the version's tag. It checks both archives before any write, also before a first publication, and takes the index's description from the images' label, which the Dockerfile sets. A refusal of the registry names the tag and the reason. noetic's commit has to be a full commit ID of the history before noetic moves. The summary lists the checked index's images, and the temporary folder is removed. The script has a function per step and main, as the code rules ask. The tests run in a small git history of their own, so that noetic's forward-only moves are tested with git's answers. They also cover the archives by their exact paths, a first publication that goes on once the registry answers, an index that fails its check, both refusal texts and the three tries: 34 tests instead of 14. The workflow checks the image that the robot downloads with the template's settings, sets the commit label through GITHUB_SHA, gives the publish job a time limit and keeps its token out of git's settings. The build service of compose.build.yaml is never started by up. The update command pulls the repository too, and the examples name the local build diffbot-robot:local.
A tag or digest that the registry gives no sha256 digest for stops the publication, so that two missing digests never compare as equal. noetic's commit annotation has to name a commit object: the ID of an annotated tag has 40 hexadecimal digits too, and git would follow it to its commit. A published version is checked at the digest that noetic then gets. New tests: an index without the arm64 image, of another media type, of another commit and without the images' description; a version or noetic tag that points elsewhere after its write; no digest; the ID of a tag as noetic's commit; archives without a description; and the rerun after a failed arm64 copy. 44 tests. The build job's checkout drops its token too.
The digest pattern ends with \z instead of $, which also matched before a final line feed inside the JSON string. New tests: a digest that is too short and one that ends with a line feed, which the old pattern let through. The tests' header says that a copy is noted when it succeeds. 46 tests.
The tests of a too short digest and of one with a line feed also check the message "The registry gives no sha256 digest for …". Without it, the short digest stopped the run later, at noetic's other digest, and a pattern without its length passed all tests. The header's first lines are rewrapped.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
CI publishes the robot image that passed its smoke test to GitHub's container registry (GHCR), for arm64 and amd64, as
ghcr.io/ros-mobile-robots/diffbot-robot. The robot downloads that image withdocker compose up -dinstead of building it. A build on the robot took 14 min 20 s on Remo's Raspberry Pi 4 B and had no fixed version (#140).noetic-<commit>is published once per commit and never replaced.noeticmoves only forward in git history, to a commit after the one it has. The package also lists the two images of a version,noetic-<commit>-amd64and-arm64, andnoetic-<commit>-index. An index is the list that names the image of each architecture under one tag. The script gives a new index this tag first, and the version's tag only after its check. The tag stays.compose.yamlruns the published image and never builds one.ROBOT_IMAGEin.envnames another version. A build of one's own has its own file,compose.build.yaml, whose service is only built, never started, under the fixed namediffbot-robot:local.buildjobs stay read-only. Onnoetic-devel, for a push or a manual run, each saves the image that it tested as an archive. Pull requests publish nothing.publishjob is the only one withpackages: write, and it runs nothing from the images. Its script,.docker/robot/publish_image.sh, in short:noetic-<commit>andnoetic. Only the registry'smanifest unknownmeans that a tag is free. A refusal (a denied read, an unknown repository) stops the run and names the tag and the reason, except in a first publication that a maintainer starts by hand. Any other error of these two reads stops the run after three tries.noetic-<commit>-index, checks that index, and then gives its digest the version's tag. A version that exists already is checked and reused.noeticto the version ifnoeticis missing or at an earlier commit.Limits: the handover of the archives between the jobs, the workflow's login and push to GHCR, and downloads of this package without a login run for the first time after the merge. A new package is private: until it is public, a robot without a GHCR login can't download the image with
docker compose up -d, anddocker compose -f compose.build.yaml buildbuilds one on the robot instead. The README's link to "Without any PC" opens that section once the docs pull request is merged. The packages that apt and rosdep install aren't pinned, and the image isn't signed.How it was tested
At the head, bd8e2c5. d243aca, 4d9cbc7, bb4d43d and bd8e2c5 change the publish script, its tests, the workflow and the texts of the image's folder after a2c6710, the merge of
noetic-develat ece6128 (#222 and #224).test_publish_image.sh, also a CI step): 46 tests pass, in a small git history of their own.noeticmoves to a later commit, stays at a later one, and stays when its commit is unrelated, missing, a name such asHEAD, the ID of a tag, or not in the history.noetic, an unchecked index, the version's tag before the check, a missing digest read asnull, and a digest pattern without its length or with$instead of\z.registry:2, at 4d9cbc7, with skopeo 1.13.3, the runners' version, and stand-in images: a first publication (a normal run, because that registry answersmanifest unknownfor a new repository), a rerun, a newer, an older and an unrelated commit, archives from two commits, archives with two descriptions, and no archives. The version, its staging tag andnoetichave the same digest. Against a fake registry: a token service that answers 404, a 404 page, a 500, a denied read and an unknown repository write nothing, and the last two name the reason. With first publication ticked, the script tried the copy underfirst-publication, the fake registry refused it, and nothing else was written.ROBOT_IMAGE, both services nameghcr.io/ros-mobile-robots/diffbot-robot:noetic(also a CI step). A typo in the default fails the check.upstarts no container of the build service, andbuildstill buildsdiffbot-robot:local(Compose 5.7.1, dry runs).compose.build.yaml. The update command has hadgit pull &&in front since d243aca.Documentation
ros-mobile-robots/ros-mobile-robots.github.io#67, which merges after the first publication.
Part of #159, a step of #109. #159 stays open until the docs pull request merges.
Before the merge
This pull request waits for a run on Remo, so that the first image it publishes has run on the robot. The image built from this branch has to pass the first five checks of #160 on Remo's Raspberry Pi, with Remo's Teensy 4.0:
The image is built on the Pi with
docker compose -f compose.build.yaml buildand started as the README describes, withROBOT_IMAGE=diffbot-robot:local. The commit, the image ID and the firmware version go into #160 with the results.After the merge, in this order
The merge starts the first publication: the two
buildjobs, thenpublish.publishpasses, go on with step 2.publishstops withThe registry doesn't let this job read …and the log names a refusal for both tags, check that no packagediffbot-robotexists yet. If one exists, check this repository's access to it instead. Only for a missing package, run the workflow by hand onnoetic-devel(Actions tab, Robot container, Run workflow) with First publication ticked. That run builds both images again. If GHCR still refuses both reads, it creates the package under the tagfirst-publication, the amd64 image of this first version: leave that tag. If the tags are readable by then, it publishes as usual.On the organization's Packages tab, open the package
diffbot-robot:Check that both platforms download without a login. The commands use a new, empty Docker settings folder with an empty entry for
ghcr.io, so that Docker can't fall back to a saved login. The check passes only if the last line ends without an error:Then the docs pull request follows, with its own steps: its excerpts are pinned to the merge commit, and its list of tags gets
noetic-<commit>-index.A failed
publishjob can be rerun while the archives exist, for one day. After that, rerun the whole workflow.