-
Notifications
You must be signed in to change notification settings - Fork 577
/
lint.yaml
41 lines (41 loc) · 1.04 KB
/
lint.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: golangci-lint
spec:
params:
- name: package
description: base package (and its children) under validation
- name: flags
description: flags to use for the test command
default: --verbose
- name: version
description: golangci-lint version to use
default: "v1.21.0"
- name: GOOS
description: "running operating system target"
default: linux
- name: GOARCH
description: "running architecture target"
default: amd64
- name: GO111MODULE
description: "value of module support"
default: auto
workspaces:
- name: source
mountPath: /workspace/src/$(params.package)
steps:
- name: lint
image: golangci/golangci-lint:$(params.version)
workingDir: $(workspaces.source.path)
script: |
golangci-lint run $(params.flags)
env:
- name: GOPATH
value: /workspace
- name: GOOS
value: "$(params.GOOS)"
- name: GOARCH
value: "$(params.GOARCH)"
- name: GO111MODULE
value: "$(params.GO111MODULE)"