1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-22 06:02:51 +00:00
catalog/task/buildah/0.1
Piyush Garg 479c6d967b Update e2e scipts according to new structure
This will update the e2e scripts to run tests according to
new catalog structure after reorg

Fix #420
2020-07-16 18:35:59 +01:00
..
tests Update e2e scipts according to new structure 2020-07-16 18:35:59 +01:00
buildah.yaml Modifies buildah task according to the new reorg proposal 2020-07-10 22:06:57 +01:00
OWNERS Modifies buildah task according to the new reorg proposal 2020-07-10 22:06:57 +01:00
README.md Remove word "volume" from "Workspace volume" in READMEs 2020-07-13 22:07:58 +01:00

Buildah

This Task builds source into a container image using Project Atomic's Buildah build tool. It uses Buildah's support for building from Dockerfiles, using its buildah bud command. This command executes the directives in the Dockerfile to assemble a container image, then pushes that image to a container registry.

Install the Task

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

Parameters

  • IMAGE: The name (reference) of the image to build.
  • BUILDER_IMAGE:: The name of the image containing the Buildah tool. See note below. (default: quay.io/buildah/stable:v1.11.0)
  • DOCKERFILE: The path to the Dockerfile to execute (default: ./Dockerfile)
  • CONTEXT: Path to the directory to use as context (default: .)
  • TLSVERIFY: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) (default: true)
  • FORMAT: The format of the built container, oci or docker (default: oci)
  • BUILD_EXTRA_ARGS: Extra parameters passed for the build command when building images. (default: "")
  • PUSH_EXTRA_ARGS: Extra parameters passed for the push command when pushing images. (default: "")

Workspaces

  • source: A Workspace containing the source to build.

Usage

This TaskRun runs the Task to fetch a Git repo, and build and push a container image using Buildah.

apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
  name: buildah-build-my-repo
spec:
  taskRef:
    name: buildah
  params:
  - name: IMAGE
    value: gcr.io/my-repo/my-image
  workspaces:
  - name: source
    persistentVolumeClaim:
      claimName: my-source

In this example, the Git repo being built is expected to have a Dockerfile at the root of the repository.