Skip to content

User-provided matrixed steps for a shared pipeline definition #8711

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
justinabrahms opened this issue Apr 16, 2025 · 0 comments
Open

User-provided matrixed steps for a shared pipeline definition #8711

justinabrahms opened this issue Apr 16, 2025 · 0 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@justinabrahms
Copy link
Contributor

Feature request

Steps should be able to matrix with objects as inputs.

Use case

I have a shared pipeline. It handles communication with various stakeholders via slack, etc, as well as notifying various services that a deploy has happened.

I'd like the users of this pipeline to have the ability to add custom steps in the pipeline. They need parallelism due to potentially long running test suites. My thought was that the user could provide an object as an input to the pipeline and we could do a matrix build across those values.

# [...pipelinerun..]
params:
 - name: post-dev-validation-steps
   value:
   - name: "always-pass"
     image: "alpine:3.14"
     script: "echo Hello from dev validation && exit 0"
   - name: "something that takes a long time"
     image: "ubuntu:20.04"
     script: "sleep 180"

An underlying step would look something like..

apiVersion: tekton.dev/v1
kind: Task
metadata:
  name: custom-script
  namespace: productivity-team
spec:
  params:
    - name: validation
      type: object
      properties:
        name:
          type: string
        image:
          type: string
        script:
          type: string
  workspaces:
    - name: source
      description: The workspace containing the source code
  steps:
    - name: custom-validation
      image: $(params.validation.image)
      script: |
        #!/usr/bin/env bash
        set -xe
        echo "Running script: $(params.validation.name)"
        $(params.validation.script)
@justinabrahms justinabrahms added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
Status: Todo
Development

No branches or pull requests

1 participant