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
pratap0007 0ff3c77ff4 This patch splits golangci-lint task from the golang directory
Changes include:
  - moves the golangci-lint task to the task directory
  - moves the OWNERS to golangci-lint task
  - moves and modifies readme file from golang
    to golangci-lint task
  - moves test directory from golang to golangci-lint task
  - changes the yaml filename to match the resource name

Issue: #386

Signed-off-by: Shiv Verma <shverma@redhat.com>
2020-07-13 13:41:58 +01:00
..
test This patch splits golangci-lint task from the golang directory 2020-07-13 13:41:58 +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 This patch splits golangci-lint task from the golang directory 2020-07-13 13:41: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 volume 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