github.com/diadata-org/diadata@v1.4.593/.tekton/Task.Golangci-lint.yaml (about) 1 apiVersion: tekton.dev/v1beta1 2 kind: Task 3 metadata: 4 name: golangci-lint 5 namespace: tekton-pipelines 6 labels: 7 app.kubernetes.io/version: "0.1" 8 annotations: 9 tekton.dev/pipelines.minVersion: "0.12.1" 10 tekton.dev/tags: lint 11 tekton.dev/displayName: "golangci lint" 12 spec: 13 description: >- 14 This Task is Golang task to validate Go projects. 15 params: 16 # - name: package 17 # description: base package (and its children) under validation 18 - name: flags 19 description: flags to use for the test command 20 default: --verbose 21 - name: config 22 description: config file to be used 23 default: /workspace/src/.golangci.yml 24 - name: version 25 description: golangci-lint version to use 26 default: "v1.39" 27 - name: GOOS 28 description: "running operating system target" 29 default: linux 30 - name: GOARCH 31 description: "running architecture target" 32 default: amd64 33 - name: GO111MODULE 34 description: "value of module support" 35 default: auto 36 resources: 37 inputs: 38 - name: git-source 39 type: git 40 targetPath: src/ 41 steps: 42 - name: lint 43 image: docker.io/golangci/golangci-lint:$(params.version) 44 workingDir: $(resources.inputs.git-source.path) 45 script: | 46 golangci-lint run $(params.flags) --config=$(params.config) 47 env: 48 - name: GOPATH 49 value: /workspace 50 - name: GOOS 51 value: "$(params.GOOS)" 52 - name: GOARCH 53 value: "$(params.GOARCH)" 54 - name: GO111MODULE 55 value: "$(params.GO111MODULE)"