1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-22 06:02:51 +00:00
catalog/task/makisu/0.1
PuneetPunamiya b42efe207a Modifies makisu task according to the new reorg proposal
Changes include:
  - adds version label
  - adds a minimum pipeline versions supported by the task
  - adds tags for task
  - modified description to add a summary

This patch also moves the makisu files to the task directory
and modifies the path for install task command in readme file

Issue: #386

Signed-off-by: Puneet Punamiya <ppunamiy@redhat.com>
2020-07-10 22:06:57 +01:00
..
makisu.yaml Modifies makisu task according to the new reorg proposal 2020-07-10 22:06:57 +01:00
README.md Modifies makisu task according to the new reorg proposal 2020-07-10 22:06:57 +01:00

makisu

This Task builds source into a container image using uber's makisu tool.

Makisu is a fast and flexible Docker image build tool designed for unprivileged containerized environments such as Mesos or Kubernetes.

Create the registry configuration

makisu uses a registry configuration which should be stored as a secret in Kubernetes.

Create a registry.yaml containing your user and password for the Docker hub (or configure a different registry). Keep in mind that the secret must exist in the same namespace as the build runs.

For example:

index.docker.io:
  .*:
    security:
      tls:
        client:
          disabled: false
      basic:
        username: ""
        password: ""
kubectl --namespace default create secret generic docker-registry-config --from-file=./registry.yaml

Install the Task

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

Parameters

  • CONTEXTPATH: The path to the build context (default: /workspace)
  • PUSH_REGISTRY: The Registry to push the image to (default: index.docker.io)
  • REGISTRY_SECRET: Secret containing information about the used regsitry (default: docker-registry-config)

Workspaces

  • source: A Workspace volume containing the source to build.

Resources

Outputs

  • image: An image-type PipelineResource specify the image that should be built.

Usage

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

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

Docker Registry

apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
  name: example-run
spec:
  taskRef:
    name: makisu
  workspaces:
  - name: source
    persistentVolumeClaim:
      claimName: my-source
  resource:
    outputs:
    - name: image
      resourceSpec:
        type: image
        params:
        - name: url
          value: gcr.io/my-repo/my-image

Other Registries

The PUSH_REGISTRY must match the name of the registry specified in the registry.yaml

apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
  name: example-run-gcr
spec:
  taskRef:
    name: makisu
  params:
  - name: PUSH_REGISTRY # must match the registry in the secret
    value: eu.gcr.io
  - name: REGISTRY_SECRET
    value: gcr-registry-config
  workspaces:
  - name: source
    persistentVolumeClaim:
      claimName: my-source
  resources:
    outputs:
    - name: image
      resourceSpec:
        type: image
        params:
        - name: url
          value: gcr.io/my-repo/my-image