1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-22 06:02:51 +00:00
catalog/task/golang-build/0.1
2020-07-16 18:35:59 +01:00
..
tests Fix golnag build tests 2020-07-16 18:35:59 +01:00
golang-build.yaml This patch splits golang-build task from the golang directory 2020-07-13 13:41:58 +01:00
OWNERS This patch splits golang-build task from the golang directory 2020-07-13 13:41:58 +01:00
README.md Remove word "volume" from "Workspace volume" in READMEs 2020-07-13 22:07:58 +01:00

Golang Build

This Task is Golang task to build Go projects.

Install the task

kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/master/task/golang-build/0.1/golang-build.yaml

Parameters

  • package: base package under test
  • packages: packages to test (default: ./...)
  • version: golang version to use for tests (default: latest)
  • flags: flags to use for go build command (default: -v)
  • GOOS: operating system target (default: linux)
  • GOARCH: architecture target (default: amd64)
  • GO111MODULE: value of module support (default: auto)

Workspaces

  • source: A Workspace containing the source to build.

Usage

This TaskRun runs the Task to compile commands from tektoncd/pipeline. golangci-lint.

apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
  name: build-my-code
spec:
  taskRef:
    name: golang-build
  workspaces:
  - name: source
    persistentVolumeClaim:
      claimName: my-source
  params:
  - name: package
    value: github.com/tektoncd/pipeline