@@ -588,6 +588,65 @@ def check_prerequisites(should_print: bool = True) -> Dict[str, TestConfig]:
588588 }
589589 },
590590
591+ "prefer-new-parameters" : {
592+ "name" : "Only use new platform parameters when both old and new parameters exist" ,
593+ "pipelinerun" : {
594+ "apiVersion" : "tekton.dev/v1" ,
595+ "kind" : "PipelineRun" ,
596+ "metadata" : {
597+ "name" : "prefer-new-platform-parameters" ,
598+ "namespace" : "default" ,
599+ "labels" : {
600+ "pipelinesascode.tekton.dev/event-type" : "push" ,
601+ }
602+ },
603+ "spec" : {
604+ "pipelineRef" : {"name" : "build-pipeline" },
605+ "params" : [
606+ {
607+ "name" : "build-platforms" ,
608+ "value" : ["linux/amd64" , "linux/arm64" , "linux/s390x" ]
609+ },
610+ {
611+ "name" : "other-param" ,
612+ "value" : "test"
613+ }
614+ ],
615+ "pipelineSpec" : {
616+ "tasks" : [
617+ {
618+ "name" : "build-task-amd64" ,
619+ "params" : [{"name" : "PLATFORM" , "value" : "linux/amd64" }],
620+ "taskRef" : {"name" : "build-task" }
621+ },
622+ {
623+ "name" : "build-task-arm64" ,
624+ "params" : [{"name" : "PLATFORM" , "value" : "linux/arm64" }],
625+ "taskRef" : {"name" : "build-task" }
626+ },
627+ {
628+ "name" : "other-task" ,
629+ "taskRef" : {"name" : "other-task" }
630+ }
631+ ]
632+ },
633+ "workspaces" : [{"name" : "shared-workspace" , "emptyDir" : {}}]
634+ }
635+ },
636+ "expected" : {
637+ "annotations" : {
638+ "kueue.konflux-ci.dev/requests-linux-amd64" : "1" ,
639+ "kueue.konflux-ci.dev/requests-linux-s390x" : "1" ,
640+ "kueue.konflux-ci.dev/requests-linux-arm64" : "1" ,
641+ "kueue.konflux-ci.dev/requests-aws-ip" : "2" ,
642+ },
643+ "labels" : {
644+ "kueue.x-k8s.io/queue-name" : "pipelines-queue" ,
645+ "kueue.x-k8s.io/priority-class" : "konflux-post-merge-build" ,
646+ }
647+ }
648+ },
649+
591650}
592651
593652# Configuration combinations that can be applied to any PipelineRun
@@ -658,6 +717,10 @@ def check_prerequisites(should_print: bool = True) -> Dict[str, TestConfig]:
658717 "pipelinerun_key" : "mixed_platforms_excluded_included" ,
659718 "config_key" : "development"
660719 },
720+ "prefer_new_parameters_dev" : {
721+ "pipelinerun_key" : "prefer-new-parameters" ,
722+ "config_key" : "development"
723+ },
661724
662725 # multiplatform_old edge cases
663726 "multiplatform_old_no_pipelineSpecTasks" : {
@@ -682,6 +745,10 @@ def check_prerequisites(should_print: bool = True) -> Dict[str, TestConfig]:
682745 "pipelinerun_key" : "integration_test_push" ,
683746 "config_key" : "staging"
684747 },
748+ "prefer_new_parameters_staging" : {
749+ "pipelinerun_key" : "prefer-new-parameters" ,
750+ "config_key" : "staging"
751+ },
685752
686753 # Test key PipelineRuns with production config
687754 "multiplatform_new_production" : {
0 commit comments