1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-25 06:17:50 +00:00
catalog/task/golangci-lint/0.2
Yulia Gaponenko f4708d478e Add linux/amd64 platform annotation to the rest of the tasks
At this moment all tasks which can be executed on linux/s390x or
linux/ppc64le are tested and labelled accordingly.
The rest of the tasks can be labelled as `linux/amd64`, which
is default platform and where tasks are already tested via
default PR testing cycle.

Signed-off-by: Yulia Gaponenko <yulia.gaponenko1@de.ibm.com>
2021-10-29 17:08:38 +01:00
..
tests Allow to override GO caching environment variable 2021-06-02 12:14:54 +01:00
golangci-lint.yaml Add linux/amd64 platform annotation to the rest of the tasks 2021-10-29 17:08:38 +01:00
README.md Add linux/amd64 platform annotation to the rest of the tasks 2021-10-29 17:08:38 +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/main/task/golangci-lint/0.2/golangci-lint.yaml

Parameters

  • package: base package under validation
  • context: path to the directory to use as context (default: .)
  • 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)
  • GOCACHE: value for go caching path (default: "")
  • GOMODCACHE: value for go module caching path (default: "")
  • GOLANGCI_LINT_CACHE: value for golangci-lint caching path (default: "")

Workspaces

  • source: A Workspace containing the source to build.

Platforms

The Task can be run on linux/amd64 platform.

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