1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-25 06:17:50 +00:00
catalog/task/buildkit/0.1
PuneetPunamiya 5a3e5f630f Adds category field as an annotation as tekton.dev/categories
- Initially all tags were mapped to categories in Hub,
     for e.g. config.yaml: https://github.com/tektoncd/hub/blob/master/config.yaml,
     so whenever a new tag was added in a task it was mapped to a category called `others`.
     Hence before every release we had to manually map these new tags to some category,
     hence after the discussion in Catalog and Hub WG, a proposal was created for adding
     a category as an annotation.

   - PR to update the TEP-0003-Tekton Catalog Organization: https://github.com/tektoncd/community/pull/352

Signed-off-by: Puneet Punamiya <ppunamiy@redhat.com>
2021-07-26 13:15:08 +01:00
..
support Move supporting files to support dir 2020-10-26 09:03:20 +00:00
.gitignore Modifies buildkit task according to the new reorg proposal 2020-07-10 22:06:57 +01:00
buildkit.yaml Adds category field as an annotation as tekton.dev/categories 2021-07-26 13:15:08 +01:00
create-certs.sh Modifies buildkit task according to the new reorg proposal 2020-07-10 22:06:57 +01:00
README.md Improves url links in the README 2021-05-24 17:47:52 +01:00

BuildKit

This Task builds source into a container image using Moby BuildKit.

See also buildkit-daemonless for the daemonless version of this task.

Install

Step 0: Create mTLS secrets

You need to determine the SAN of the BuildKit daemon Service and create mTLS certificates. In this example, we use buildkitd as the SAN.

$ ./create-certs.sh buildkitd
$ kubectl apply -f .certs/buildkit-daemon-certs.yaml
secret/buildkit-daemon-certs created
$ kubectl apply -f .certs/buildkit-client-certs.yaml
secret/buildkit-client-certs created
$ rm -rf .certs

Step 1: Deploy BuildKit daemon

Two types of the daemon manifests are included:

$ kubectl apply -f deployment+service.rootless.yaml
deployment.apps/buildkitd created
service/buildkitd created

The number of replicas can be adjusted as you like:

$ kubectl scale --replicas=10 deployment/buildkitd

See also BuildKit documentation for the further information about the manifests.

Step 2: Install the task

$ kubectl apply -f task.yaml
task.tekton.dev/buildkit created

Parameters

  • DOCKERFILE: The path to the Dockerfile to execute (default: ./Dockerfile)
  • BUILDKIT_CLIENT_IMAGE: BuildKit client image (default:moby/buildkit:vX.Y.Z@sha256:...)
  • BUILDKIT_DAEMON_ADDRESS: BuildKit daemon address (default:tcp://buildkitd:1234)
  • BUILDKIT_CLIENT_CERTS: The name of Secret that contains ca.pem, cert.pem, key.pem for mTLS connection to BuildKit daemon (default:buildkit-client-certs)

Workspaces

  • source: A Workspace containing the source to build.

Resources

Outputs

  • image: An image-type PipelineResource specifying the image that should be built. Currently, generating resourceResult is not supported. (buildkit#993)