mirror of
https://github.com/tektoncd/catalog.git
synced 2024-11-26 06:23:37 +00:00
0ff3c77ff4
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> |
||
---|---|---|
.. | ||
test | ||
golangci-lint.yaml | ||
OWNERS | ||
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/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