All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trevor Gamblin <tgamblin@baylibre.com>
To: alex.kanavin@gmail.com,
	openembedded-architecture
	<openembedded-architecture@lists.openembedded.org>,
	bitbake-devel <bitbake-devel@lists.openembedded.org>,
	Yocto-mailing-list <yocto@lists.yoctoproject.org>
Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
Subject: Re: [Openembedded-architecture] proposal: build pipelines in bitbake-setup
Date: Tue, 5 May 2026 12:17:07 -0400	[thread overview]
Message-ID: <66b3dbc7-e6f0-4013-8d2e-d646f0fd8c9b@baylibre.com> (raw)
In-Reply-To: <CANNYZj-hrSdEoX5XRmM1MYhXMVkqpa0CBHHbMqVhjM034bKTDg@mail.gmail.com>


On 2026-05-05 06:17, Alexander Kanavin via lists.openembedded.org wrote:
> Hello,
>
> bitbake-setup currently doesn't support describing build pipelines: a
> sequence of commands that actually produce something useful. For a
> true end-to-end solution this gap should be filled.
>
> Here's my proposal, which probably has obvious shortcomings, that I
> would like to hear about :)

Hi,

Thanks for submitting this proposal. I will try to summarize some of my 
thoughts from the public call and otherwise in-line.

>
> 0. Design goals:
>
> - something suitable for most situations, including newcomers running
> a local build, and CI doing a nightly job
> - avoid custom scripts in most situations
> - self-documented; everything must be described
> - extensible; if there's something missing that no one thought about,
> it can be added later in a way that supplements existing features
> without replacing them.
>
> 1. Specification in a build configuration would look like this:
>
> "build-targets": {
>      "steps" : [
>          { "name": "build-apple", "description": "Build an apple for
> the purpose of making apple pie", "command": "bitbake apple-image"},
>          { "name": "build-orange", "description": "Build an orange for
> the purpose of making orange juice", "command": "bitbake
> orange-image"},
>          { "name": "test-apple", "description": "Test an apple using
> testimage class", "command": "bitbake -c testimage apple-image"},
>          { "name": "test-orange", "description": "Test an orange using
> testimage class", "command": "bitbake -c testimage orange-image"},
>          { "name": "qemu-console", "description": "Start the last built
> image in qemu with console UI", "command": "runqemu kvm snapshot
> nographic"},
>          { "name": "publish", "description":"Copy build artefacts to a
> public download server", "command":
> "path/to/publish-image-executable"}
>      ],
>      "pipelines": [
>          {"name": "publish-apple", "description": "Build, test, and
> publish apple (requires publishing rights on the download server)",
> "steps": ["build-apple", "test-apple", "publish"]},
>          {"name": "publish-orange", "description": "Build, test, and
> publish orange  (requires publishing rights on the download server)",
> "steps": ["build-orange", "test-orange", "publish"]},
>          {"name": "qemu-apple", "description": "Build and start apple
> in qemu with console UI", "steps": ["build-apple", "qemu-console"]},
>          {"name": "qemu-orange", "description": "Build and start orange
> in qemu with console UI", "steps": ["build-orange", "qemu-console"]}
>      ]
> }
>
> Configurations would include a list of possible pipelines:
>          "configurations": [
>          {
>              "name": "fruitgarden",
>              "description": "Alex's fruit garden",
>              "bb-layers": ["meta-fruit"],
>              "oe-fragments": [ "distro/fruit-garden", "machine/earth" ],
>              "pipelines": ["qemu-apple", "qemu-orange",
> "publish-apple", "publish-orange"]
>          }
I think it's worth considering for the nightly-job-in-CI case whether 
people will want to use bitbake-setup to cover that entire scope (i.e., 
build-test-publish). There are a lot of existing CI systems out there 
(Buildbot, Tekton, GitHub/Gitea/Forgejo Actions, GitLab CI, etc.) where 
you already define pipelines as a series of stages/steps, and each one 
is generally intended to cover either a single command or a handful of 
closely-associated ones. I am not sure that users would want to invoke a 
bitbake-setup pipeline as a single step in these systems, as that would 
potentially obfuscate failures and configuration issues just by having 
too many things happening per step. However, I can see it being useful 
to people who want a fire-and-forget reproducer for typical build/test 
configurations.

As a side note, it feels like stepping outside of the "build setup" 
space and including things like runtime testing, artifact publishing, 
etc. feels like a clash with bitbake-setup's name.
>
> 2. Nomenclature:
>
> - "step" is a single command that is also given a short name and a
> longer description. Steps are building blocks for pipelines and can't
> be individually executed.
Why not? Why not have the ability to run something like 'bitbake-setup 
run-step <step_name'? That would actually be an advantage this feature 
could provide over many other CI systems, as it's usually difficult or 
impossible to rerun individual steps (you have to re-run a whole job or 
pipeline). I can see this being very useful for example when you need to 
run 'bitbake -c testimage' in a loop many times to try and catch 
intermittent failures.
> - "pipeline" is a sequence of steps, that is also given a short name
> and a longer description. Pipelines can mix and match defined steps as
> they please.
> - each configuration includes a list of possible targets, and once it
> is set up, any of them can be executed (see below for the UI).
>
> 3. User Interface to pipelines
>
> Once there is a setup, there are two ways to execute a pipeline:
>
> a) For each pipeline there is a shell script that can be run directly:
>
> /path/to/bitbake-builds/fruitgarden/qemu-apple
> /path/to/bitbake-builds/fruitgarden/publish-apple
> etc.
>
> qemu-apple script would look something like:
>
> #!/bin/sh
> # Build and start apple in qemu with console UI
> . init-build-env
> # Build an apple for the purpose of making apple pie
> bitbake apple-image
> # Start the last built image in qemu with console UI
> runqemu kvm snapshot nographic
>
> e.g. assembled from pipeline steps and their descriptions.
Similarly here - maybe a 'bitbake-setup run-pipeline <pipeline_name>' 
would be more effective?
>
> b) Interactive UI :'bitbake-setup build'
>
> This would present an interactive UI similar to 'bitbake-setup init', e.g:
> $ bitbake-setup build
> Available build pipelines:
> 1. qemu-apple  Build and start apple in qemu with console UI
> 2. qemu-orange Build and start orange in qemu with console UI
> ... etc
> Please choose one of the above: 1
>
> The following commands will be executed:
> # Build an apple for the purpose of making apple pie
> bitbake apple-image
> # Start the last built image in qemu with console UI
> runqemu kvm snapshot nographic
>
> Proceed? [y/N]
> etc.
>
> 4. Implementation
>
> This should actually be fairly straightforward. There's no need to add
> new features to bitbake (e.g. 'standard target definitions' in layers
> was considered at some point, but after more consideration I think it
> can be postponed or perhaps altogether avoided), or modify oe-core.
My other main concern about this is around maintenance - depending on 
how it is ultimately implemented, it could end up looking like a 
miniature CI/CD system for Yocto builds - that is certainly how I find 
myself seeing it, and I've written my responses in that mindset. I can 
see the utility in having the feature available more generally to reduce 
time spent reproducing a common build/test case, but I wonder if it'd 
get used often enough under its currently proposed form.

Trevor
>
> Alex
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#2324): https://lists.openembedded.org/g/openembedded-architecture/message/2324
> Mute This Topic: https://lists.openembedded.org/mt/119158252/7611679
> Group Owner: openembedded-architecture+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-architecture/unsub [tgamblin@baylibre.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


  reply	other threads:[~2026-05-05 16:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-05 10:17 proposal: build pipelines in bitbake-setup Alexander Kanavin
2026-05-05 16:17 ` Trevor Gamblin [this message]
2026-05-05 18:42   ` [Openembedded-architecture] " Alexander Kanavin
2026-05-06 10:23     ` Daiane Angolini
2026-05-06 12:43       ` Alexander Kanavin
2026-05-06 13:29         ` Trevor Gamblin
2026-05-06 14:02           ` Daiane Angolini
2026-05-06 14:22             ` Alexander Kanavin
2026-05-07 12:36 ` [bitbake-devel] " Ross Burton
2026-05-07 13:13   ` Alexander Kanavin
2026-05-07 13:20     ` [Openembedded-architecture] " Richard Purdie
2026-05-07 13:51       ` Alexander Kanavin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=66b3dbc7-e6f0-4013-8d2e-d646f0fd8c9b@baylibre.com \
    --to=tgamblin@baylibre.com \
    --cc=alex.kanavin@gmail.com \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=openembedded-architecture@lists.openembedded.org \
    --cc=yocto@lists.yoctoproject.org \
    --cc=zhangfei.gao@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.