@@ -414,23 +414,22 @@ def get_push_trigger() {
414
414
// Gets desired artifacts to build from pipeline config
415
415
def get_artifacts_to_build (pipecfg , stream , basearch ) {
416
416
// Explicit stream-level override takes precedence
417
- def artifacts = pipecfg. streams[stream]. artifacts?. " ${ basearch} "
418
- if (artifacts == null ) {
419
- // calculate artifacts from defaults + additional - skip
420
- artifacts = []
421
- artifacts + = pipecfg. default_artifacts. all ?: []
422
- artifacts + = pipecfg. default_artifacts. " ${ basearch} " ?: []
423
- artifacts + = pipecfg. streams[stream]. additional_artifacts?. all ?: []
424
- artifacts + = pipecfg. streams[stream]. additional_artifacts?. " ${ basearch} " ?: []
425
- artifacts - = pipecfg. streams[stream]. skip_artifacts?. all ?: []
426
- artifacts - = pipecfg. streams[stream]. skip_artifacts?. " ${ basearch} " ?: []
417
+ def artifacts = (pipecfg. streams[stream]. artifacts?. " ${ basearch} " ?: []) as Set
418
+ if (artifacts. isEmpty()) {
419
+ // calculate artifacts from defaults, add additional, remove skip
420
+ artifacts. addAll(pipecfg. default_artifacts. all ?: [])
421
+ artifacts. addAll(pipecfg. default_artifacts. " ${ basearch} " ?: [])
422
+ artifacts. addAll(pipecfg. streams[stream]. additional_artifacts?. all ?: [])
423
+ artifacts. addAll(pipecfg. streams[stream]. additional_artifacts?. " ${ basearch} " ?: [])
424
+ artifacts. removeAll(pipecfg. streams[stream]. skip_artifacts?. all ?: [])
425
+ artifacts. removeAll(pipecfg. streams[stream]. skip_artifacts?. " ${ basearch} " ?: [])
427
426
}
428
427
if (pipecfg. streams[stream]. skip_disk_images) {
429
428
// Only keep the extensions container. Note that the ostree container
430
429
// and QEMU image are always built and not skippable artifacts.
431
430
artifacts = artifacts. intersect([" extensions-container" ])
432
431
}
433
- return artifacts. unique()
432
+ return artifacts
434
433
}
435
434
436
435
// Build all the artifacts requested from the pipeline config for this arch.
0 commit comments