1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-21 05:55:35 +00:00
catalog/task/ko/0.1
vinamra28 24bf826a1d Use specific digest of ko instead of latest
Signed-off-by: vinamra28 <jvinamra776@gmail.com>
2023-09-22 09:32:22 +01:00
..
tests Use latest git-clone in Task's tests 2023-09-22 09:32:22 +01:00
ko.yaml Use specific digest of ko instead of latest 2023-09-22 09:32:22 +01:00
README.md add ko task 2023-02-17 22:44:31 +00:00

ko

This Task builds source into a container image using ko.

Install the Task

kubectl apply -f https://api.hub.tekton.dev/v1/resource/tekton/task/ko/0.1/raw

Parameters

  • ko-image: The ko image to use for builds (default: ghcr.io/ko-build/ko:latest)
  • main: The import path of package main (default: .)
  • extra-args: additional arguments to pass to ko build (default: [])
  • KO_DOCKER_REPO: ko environment variable which identifies where to push images (default: ``)
  • KO_DEFAULTBASEIMAGE: base image for ko build (default: ``)

Workspaces

  • source: A Workspace containing the source to build.
  • dockerconfig: Workspace including a docker "config.json". ko will use this authentication configured to push to the image registry.

Usage

This TaskRun runs the Task to build and push a container image using ko

apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
  name: example-run
spec:
  taskRef:
    name: ko
  workspaces:
  - name: source
    persistentVolumeClaim:
      claimName: my-source