CI YAML script: combine two lists?

Help! : )

I’m hoping to prepare a CI configuration that combines a couple separate command lists, by way of YAML references. I’ve reviewed the YAML features examples already, but haven’t quite got this solved yet.

I’ve tried this suggestion as well, but somehow the CI Linter is still rejecting it.

Simplified example:

.part1: &part_one
  - do something 1
  - do something 2

.part2: &part_two
  - do something 3
  - do something 4

task:
  stage: test
  # how to combine here?
  script:   <<: [*part_one, *part_two]  #?
 

Note I’m aware of before_script; in this case I’d hope to support several additional “mix-in” components, used variably between several tasks.

Is this possible? What’s the correct syntax for combining two lists?

Thanks!

Hey Samba, I’m trying to do the exact same thing, did you ever get it working?