1
0
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:
Vincent Demeester 2020-03-03 11:44:52 +01:00 committed by tekton-robot
parent 8fb72180f7
commit c1dcad81d5
3 changed files with 6 additions and 15 deletions

View File

@ -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

View File

@ -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

View File

@ -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