woodpecker-ci / woodpecker

Woodpecker is a simple, yet powerful CI/CD engine with great extensibility.
https://woodpecker-ci.org
Apache License 2.0
4.33k stars 373 forks source link

Allow setting name for matrix pipelines #2819

Open JakobDev opened 1 year ago

JakobDev commented 1 year ago

Clear and concise description of the problem

Since #2695 the build status of matrix pipelines gets correctly reported, what is awesome. However, there is still room for improvement. Currently it gets reported as {name}/{number}. It would be better if a name would be used instead of a number.

Suggested solution

Add a new filed matrixname which allows setting the name for a matrix pipeline. With the example from the documentation it could look like this:

matrix:
  GO_VERSION:
    - 1.4
    - 1.3
  DATABASE:
    - mysql:5.5
    - mysql:6.5
    - mariadb:10.1

steps:
  build:
    image: golang:${GO_VERSION}
    commands:
      - go get
      - go build
      - go test

services:
  database:
    image: ${DATABASE}

matrixname: ${GO_VERSION}-${DATABASE}

This would be reported as e.g. {name}/1.4-mysql:5.5.

Alternative

If only one variable is used, we can also use the variable instead of the number.

Additional context

No response

Validations

aozomaro commented 1 year ago

On this I have another use case: We run a rather large suite of automated ui tests. To do this, we use a matrix workflow that essentially 1 dimensional (Machine-1 - Machine-n) … what would be nice is to be able to roll up all runs into a single status report in GitHub .. currently it reports a large number of jobs and that is causing developers confusion.