mirror of
https://github.com/tektoncd/catalog.git
synced 2024-11-22 06:02:51 +00:00
d65ed39437
With git-clone version 0.8, Task now runs as non-root and with this change I
guess it's not working well with our GKE clusters and tests started
failing in nightly runs.
For now changing the version of git-clone to use 0.7 so that for now CI
is unblocked 😅
Signed-off-by: vinamra28 <jvinamra776@gmail.com>
|
||
---|---|---|
.. | ||
tests | ||
golang-test.yaml | ||
README.md |
Golang Test
This task is a Golang task to test Go projects.
Install the task
kubectl apply -f https://api.hub.tekton.dev/v1/resource/tekton/task/golang-test/0.2/raw
Parameters
- package: base package to build in
- packages: packages to test (default: ./cmd/...)
- context: path to the directory to use as context (default: .)
- version: golang version to use for builds (default: latest)
- flags: flags to use for
go test
command (default: -race -cover -v) - GOOS: operating system target (default: linux)
- GOARCH: architecture target (default: amd64)
- GO111MODULE: value of module support (default: auto)
- GOCACHE: value for go caching path (default: "")
- GOMODCACHE: value for go module caching path (default: "")
Workspaces
- source: A Workspace containing the source to build.
Platforms
The Task can be run on linux/amd64
, linux/s390x
and linux/ppc64le
platforms.
Specify value for GOARCH
parameter according to the desired target architecture.
Do not use -race
flag in flags
parameter for linux/s390x
platform.
Usage
This TaskRun runs the Task to run unit-tests on
tektoncd/pipeline
.
apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
name: test-my-code
spec:
taskRef:
name: golang-test
workspaces:
- name: source
persistentVolumeClaim:
claimName: my-source
params:
- name: package
value: github.com/tektoncd/pipeline
- name: packages
value: ./pkg/...