chainguard-dev/melange

RFE: support range in test.pipeline

smoser opened this issue · 0 comments

I was trying to iterate over a test pipeline, but it didn't work for me.
Its possible I just don't have the right syntax.

package:
  name: test-me2
  version: 1.0
  epoch: 0

environment:
  contents:
    packages:
      - busybox
      - git

pipeline:
  - runs: |
      p=${{targets.contextdir}}/usr/bin/yo-world
      mkdir -p $(dirname "$p")
      { echo "#!/bin/sh"; echo echo hello; } > "$p"
      chmod 755 "$p"

The package will build fine.
But then if I append the stanza:

data:
  - name: stuff
    items:
      key1: val1

test:
  pipeline:
    - range: data
      runs: |
        echo testing it for ${{range.key}}/${{range.value}}
        /usr/bin/yo-world

then it won't unmarshal. So I suspect this just isn't supported.
Is this a thing we could have?