Build some lines of a list on some targets only#
Keep one build list for every target of a site file, and mark the lines that only some targets build.
Before you start#
A site file with a target for each node type, such as the one in Build a list on every target from continuous integration.
A build list that every target builds.
The output on this page comes from docs/examples/select.sh.
It adds the table of step 1 to each target of the site file of Build a list on every target from continuous integration, with the target’s own token, and runs the dry runs and the run below on a copy of that file with the local scheduler, its paths under $WORK and the stand-in eb of the tutorial.
Steps#
Pick a long option for the selection, such as
--only-targets, and add a[targets.select]table to the table of each target, after its[targets.phases], with the token of that target; forzen4:[targets.select] option = "--only-targets" value = "zen4" strip = true
strip = trueremoves the option from a line beforeebgets it, as the option is for eb-pipeline, not for EasyBuild. A line without the option builds on every target;when_absent = "none"builds it on none.Check the site file:
eb-pipeline check --site site.tomlINFO [check] example: site file is validGive the lines for some targets only the option, with their tokens after it, such as
--only-targets=zen2,zen4or--only-targets zen2,zen4:cat build.listExample-1.0-GCCcore-15.2.0.eb Example-2.0-GCCcore-15.2.0.eb --only-targets=zen4
Check what each target builds:
eb-pipeline run --site site.toml --list build.list --target zen4 --build-type production --dry-run | grep "^\[build\]" eb-pipeline run --site site.toml --list build.list --target zen2 --build-type production --dry-run | grep "^\[build\]"
INFO [run] zen4: dry run: nothing executed [build] eb Example-1.0-GCCcore-15.2.0.eb [build] eb Example-2.0-GCCcore-15.2.0.eb INFO [run] zen2: dry run: nothing executed [build] eb Example-1.0-GCCcore-15.2.0.eb
zen4builds both lines andzen2the first, andebgets no--only-targets. The plan of a target lists the lines it leaves out underdeselected:eb-pipeline plan --site site.toml --list build.list --target zen2 --build-type production | grep -A5 "\"deselected\"""deselected": [ { "easyconfig": "Example-2.0-GCCcore-15.2.0.eb", "unit": "all" } ],
Check that it worked#
A run says how many lines it left out:
eb-pipeline run --site site.toml --list build.list --target zen2 --build-type production --log-stamp 20261117_090000 --result result.json; echo "exit $?"
INFO [licences] zen2: not configured
INFO [shard] zen2: not configured
INFO [sources] zen2: not configured
INFO [admission] zen2: not configured
INFO [caches] zen2: not configured
INFO [logs] zen2: not configured
INFO [build] zen2: 1 line(s) deselected for this target
INFO [build] zen2: Example-1.0-GCCcore-15.2.0: start
INFO [build] zen2: Example-1.0-GCCcore-15.2.0: ok
exit 0
It writes the lines it keeps, with strip applied, to selected-TARGET.list in its log directory, which stack shard gets when the list is sharded, and its result file lists the others under deselected, in no status count:
cat $WORK/site/logs/20261117_090000/zen2/selected-zen2.list
grep -A4 "\"deselected\"" result.json
Example-1.0-GCCcore-15.2.0.eb
"deselected": [
{
"easyconfig": "Example-2.0-GCCcore-15.2.0.eb",
"unit": "all"
}
If it fails#
Message |
Cause |
What to do |
|---|---|---|
|
The option has no leading dashes. |
Write it with them, as the message says. |
A line is under |
Its option names the token of no target, as a typing error would. |
Correct the token in the build list. |
A line without the option is under |
The target sets |
Set |
The |
The target sets no |
Set |