Shell access for builds.sr.ht CI

Have you ever found yourself staring at a failed CI build, wondering desperately
what happened? Or, have you ever needed a fresh machine on-demand to test out an
idea in? Have you been working on Linux, but need to test something on OpenBSD?
Starting this week, builds.sr.ht can help with all of these problems, because
you can now SSH into the build environment.

If you didn’t know, Sourcehut is the 100%
open/libre software forge for hackers, complete with git and Mercurial
hosting, CI, mailing lists, and more - with no JavaScript. Try it out!

The next time your build fails on builds.sr.ht, you’ll probably notice the
following message:

After the build fails, we process everything normally - sending emails,
webhooks, and so on - but keep the VM booted for an additional 10 minutes. If
you do log in during this window, we keep the VM alive until you log out or
until your normal build time limit has elapsed. Once you’ve logged in, you get a
shell and can do anything you like, such as examining the build artifacts or
tweaking the source and trying again.

You can also connect to any build over SSH by adding shell: true to your build
manifest. When you do, the VM will be kept alive after all of the tasks have
finished (even if it doesn’t fail) so you can SSH in. You can also SSH in before
the tasks have finished, and tail the output of the build in your terminal. An
example use case might be getting a fresh Alpine environment to test build your
package on:

This article includes third-party JavaScript content from
asciinema.org, a free- and open-source platform that I trust.

Since build manifests run normally in advance of your shell login, you can do
things like install your preferred editor and dotfiles, pull down your SSH keys
through build
secrets, or
anything else you desire to set up a comfortable working environment.

Furthermore, by leveraging the builds.sr.ht
API, you can write scripts which take
advantage of the shell features. Need a NetBSD shell? With a little scripting
you can get something like this working:

With experimental multiarch support being rolled out, soon you’ll be just a few
keystrokes away from an ARM or PowerPC shell, too.

I want to expand more on SSH access in the future. Stay tuned and let me
know if you have any cool ideas!

Articles from blogs I follow around the net

This post gives an overview of the recent updates to the Writing an OS in Rust blog and the used libraries and tools.
I was very busy with finishing my master's thesis, so I didn't have any to implement any notable changes myself. Thanks to contrib…

This is an archive of a series of comp.arch USENET posts by John Mashey in the early to mid 90s, on the defnition of reduced instruction set computer (RISC). Contrary to popular belief, RISC isn't about the number of instructions! This is archived her…