1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-25 06:17:50 +00:00
catalog/task/golang-build/0.1
Vincent Demeester d93795673c Update self reference from master to main 🧙
And update references to community, pipeline, etc. too.

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
2021-03-19 11:09:49 +00:00
..
tests Remove unnecessary sidecar in golang test 2020-12-22 08:29:07 +00:00
golang-build.yaml Fix Catlin error by adding Digest to the Images 2020-10-26 09:03:20 +00:00
README.md Update self reference from master to main 🧙 2021-03-19 11:09:49 +00:00

Golang Build

This Task is Golang task to build Go projects.

Install the task

kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/main/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