Dustin C. Hatch 7792b66de8 fedoraBuild: Add function for building for Fedora
When we want to build an RPM for Fedora, we usually need to build one
per Fedora release.  This is cumbersome, and typically requires
changing the list of release versions to target every six months.  To
make this easier, I've added a `fedoraBuild` shared library function.
This function will generate a matrix pipeline that runs the provided
closure for every supported Fedora version+architecture combination.  By
default, it will run for _amd64_ and _arm64_, but callers can provide an
alternate list with the `architectures` argument.  The supplied closure
must accept two arguments, `arch`, and `fedoraVersion`.  This allows the
code inside the closure to use those values, e.g. in stage names or to
perform conditional build steps based on the target.  By default, a node
will be allocated for each target using the approproate Fedora container
image.  An alternate image can be supplied with the `containerImage`
argument.  This argument takes either a string, which will cause all
containers to use the same image, or a closure that accepts the same
`arch` and `fedoraVersion` variables, and returns a container image
name.

Example:

```groovy
fedoraBuild {
    container('build') {
        sh 'echo hello from ${FEDORA}'
    }
}
```

This will run the `sh` step in the `build` container for every
currently-supported version of Fedora on _amd64_ and _arm64_ nodes.
2025-11-23 16:47:32 -06:00
Description
No description provided
81 KiB
Languages
Groovy 100%