mirror of
https://github.com/tektoncd/catalog.git
synced 2024-11-24 06:15:46 +00:00
Use script for golang tasks 🦍
It simplifies the task spec. Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
This commit is contained in:
parent
8fb72180f7
commit
c1dcad81d5
@ -33,11 +33,8 @@ spec:
|
||||
- name: build
|
||||
image: golang:$(inputs.params.version)
|
||||
workingdir: /workspace/src/$(inputs.params.package)
|
||||
command:
|
||||
- /bin/bash
|
||||
args:
|
||||
- -c
|
||||
- "go build $(inputs.params.flags) $(inputs.params.packages)"
|
||||
script: |
|
||||
go build $(inputs.params.flags) $(inputs.params.packages)
|
||||
env:
|
||||
- name: GOPATH
|
||||
value: /workspace
|
||||
|
@ -30,11 +30,8 @@ spec:
|
||||
- name: lint
|
||||
image: golangci/golangci-lint:$(inputs.params.version)
|
||||
workingdir: /workspace/src/$(inputs.params.package)
|
||||
command:
|
||||
- /bin/bash
|
||||
args:
|
||||
- -c
|
||||
- "golangci-lint run $(inputs.params.flags)"
|
||||
script: |
|
||||
golangci-lint run $(inputs.params.flags)
|
||||
env:
|
||||
- name: GOPATH
|
||||
value: /workspace
|
||||
|
@ -33,11 +33,8 @@ spec:
|
||||
- name: unit-test
|
||||
image: golang:$(inputs.params.version)
|
||||
workingdir: /workspace/src/$(inputs.params.package)
|
||||
command:
|
||||
- /bin/bash
|
||||
args:
|
||||
- -c
|
||||
- "go test $(inputs.params.flags) $(inputs.params.packages)"
|
||||
script: |
|
||||
go test $(inputs.params.flags) $(inputs.params.packages)
|
||||
env:
|
||||
- name: GOPATH
|
||||
value: /workspace
|
||||
|
Loading…
Reference in New Issue
Block a user