1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-26 06:23:37 +00:00
catalog/task/golangci-lint/0.1
2020-07-16 18:35:59 +01:00
..
tests Fix golangci-lint tests 2020-07-16 18:35:59 +01:00
golangci-lint.yaml This patch splits golangci-lint task from the golang directory 2020-07-13 13:41:58 +01:00
OWNERS This patch splits golangci-lint task from the golang directory 2020-07-13 13:41:58 +01:00
README.md Remove word "volume" from "Workspace volume" in READMEs 2020-07-13 22:07:58 +01:00

Golangci Lint

This Task is a Golang task to validate Go projects.

Install the task

kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/master/task/golangci-lint/0.1/golangci-lint.yaml

Parameters

  • package: base package under validation
  • flags: flags to use for golangci-lint command (default:--verbose)
  • version: golangci-lint version to use (default: v1.16)
  • GOOS: operating system target (default: linux)
  • GOARCH: architecture target (default: amd64)
  • GO111MODULE: value of module support (default: auto)

Workspaces

  • source: A Workspace containing the source to build.

Usage

This TaskRun runs the Task to validate tektoncd/pipeline pkg package with golangci-lint.

apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
  name: lint-my-code
spec:
  taskRef:
    name: golangci-lint
  workspaces:
  - name: source
    persistentVolumeClaim:
      claimName: my-source
  params:
  - name: package
    value: github.com/tektoncd/pipeline
  - name: flags
    value: --verbose