IBM/tekton-lint

Report missing parameter in TaskSpec (inline tasks)

开放

#61 创建于 2020年11月26日

 (1 条评论) (0 个反应) (0 位负责人)TypeScript (21 个派生)auto 404
good first issuehacktoberfesthelp wanted

仓库指标

星标
 (32 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

In 0.5.2 we should report missing parameters in taskSpec tasks

Example:


    - name: inline-task
      params:
        - name: pipeline-debug
          value: $(params.pipeline-debug)
      workspaces:
        - name: secrets
          workspace: artifacts
      taskSpec:
        workspaces:
          - name: secrets
            mountPath: /secrets
        params:
          - name: pipeline-debug
        stepTemplate:
          env:
            - name: PIPELINE_RUN_ID
              valueFrom:
                fieldRef:
                  fieldPath: metadata.annotations['devops.cloud.ibm.com/tekton-pipeline']
        steps:
          - name: setup
            image: node:alpine
            script: |
              #!/bin/bash

              set -e -o pipefail

              if [ $PIPELINE_DEBUG == 1 ]; then
                pwd
                env
                trap env EXIT
                set -x
              fi

              export TOKEN=$(cat "/secrets/$(params.token)")

The line export TOKEN=$(cat "/secrets/$(params.token)") use a parameter token which was not added nor provided for the task, the linter is missing this.

贡献者指南