1
0
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:
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 - 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

View File

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

View File

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