mirror of
https://github.com/tektoncd/catalog.git
synced 2024-11-28 06:30:40 +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
|
- name: build
|
||||||
image: golang:$(inputs.params.version)
|
image: golang:$(inputs.params.version)
|
||||||
workingdir: /workspace/src/$(inputs.params.package)
|
workingdir: /workspace/src/$(inputs.params.package)
|
||||||
command:
|
script: |
|
||||||
- /bin/bash
|
go build $(inputs.params.flags) $(inputs.params.packages)
|
||||||
args:
|
|
||||||
- -c
|
|
||||||
- "go build $(inputs.params.flags) $(inputs.params.packages)"
|
|
||||||
env:
|
env:
|
||||||
- name: GOPATH
|
- name: GOPATH
|
||||||
value: /workspace
|
value: /workspace
|
||||||
|
@ -30,11 +30,8 @@ spec:
|
|||||||
- name: lint
|
- name: lint
|
||||||
image: golangci/golangci-lint:$(inputs.params.version)
|
image: golangci/golangci-lint:$(inputs.params.version)
|
||||||
workingdir: /workspace/src/$(inputs.params.package)
|
workingdir: /workspace/src/$(inputs.params.package)
|
||||||
command:
|
script: |
|
||||||
- /bin/bash
|
golangci-lint run $(inputs.params.flags)
|
||||||
args:
|
|
||||||
- -c
|
|
||||||
- "golangci-lint run $(inputs.params.flags)"
|
|
||||||
env:
|
env:
|
||||||
- name: GOPATH
|
- name: GOPATH
|
||||||
value: /workspace
|
value: /workspace
|
||||||
|
@ -33,11 +33,8 @@ spec:
|
|||||||
- name: unit-test
|
- name: unit-test
|
||||||
image: golang:$(inputs.params.version)
|
image: golang:$(inputs.params.version)
|
||||||
workingdir: /workspace/src/$(inputs.params.package)
|
workingdir: /workspace/src/$(inputs.params.package)
|
||||||
command:
|
script: |
|
||||||
- /bin/bash
|
go test $(inputs.params.flags) $(inputs.params.packages)
|
||||||
args:
|
|
||||||
- -c
|
|
||||||
- "go test $(inputs.params.flags) $(inputs.params.packages)"
|
|
||||||
env:
|
env:
|
||||||
- name: GOPATH
|
- name: GOPATH
|
||||||
value: /workspace
|
value: /workspace
|
||||||
|
Loading…
Reference in New Issue
Block a user