mirror of
https://github.com/tektoncd/catalog.git
synced 2024-11-25 06:17:50 +00:00
f4708d478e
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> |
||
---|---|---|
.. | ||
tests | ||
golangci-lint.yaml | ||
README.md |
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