apiVersion: tekton.dev/v1
kind: Task
metadata:
  name: build-artifact
  namespace: example-apps
spec:
  description: Inert fixture. Describes a task; nothing here runs.
  params:
    - name: target
      type: string
      default: all
    - name: flags
      type: array
      default: []
  workspaces:
    - name: source
      description: Checked-out source tree
  results:
    - name: artifact-digest
      description: Digest of the produced artifact
      type: string
  steps:
    - name: compile
      image: registry.example.invalid/ci/build:3.1
      workingDir: $(workspaces.source.path)
      script: |
        echo "target=$(params.target)"
      args: ["$(params.flags[*])"]
    - name: record
      image: registry.example.invalid/ci/build:3.1
      script: |
        printf 'sha256:0000' > $(results.artifact-digest.path)
