1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-25 06:17:50 +00:00
catalog/pipeline/buildpacks/0.2
Quan Zhang e294e1246b [TEP-0110] Update Tekton Catalog installation instructions
Prior to this change, the installation instructions directly use the resource urls in the Catalog repo, which results in tight coupling between the organization and how users fetch resources (as described in TEP-0110). This commit updates the installation guide to install Tekton Catalog resources via Tekton Hub Api: https://github.com/tektoncd/hub/pull/539

This change decouples the Tekton Catalog organization from resouces resolution, which enables Tekton Catalog reorganization.
2022-08-16 16:25:52 +01:00
..
samples Copy buildpacks from 0.1 to 0.2 2022-07-07 09:25:07 +01:00
tests Copy buildpacks from 0.1 to 0.2 2022-07-07 09:25:07 +01:00
buildpacks.yaml Update buildpacks to work with Pipeline v0.36.0 2022-07-07 09:25:07 +01:00
README.md [TEP-0110] Update Tekton Catalog installation instructions 2022-08-16 16:25:52 +01:00

Buildpacks

This pipeline builds source into a container image using Cloud Native Buildpacks. To do that, it uses builders to run buildpacks against your application source.

What are Cloud Native Buildpacks?

Cloud Native Buildpacks are pluggable, modular tools that transform application source code into OCI images. They replace Dockerfiles in the app development lifecycle, and enable for swift rebasing of images and modular control over images (through the use of builders), among other benefits.

Dependencies

Compatibility

Install

Install dependencies (if missing)

kubectl apply -f https://api.hub.tekton.dev/v1/resource/tekton/task/git-clone/0.3/raw
kubectl apply -f https://api.hub.tekton.dev/v1/resource/tekton/task/buildpacks/0.3/raw
kubectl apply -f https://api.hub.tekton.dev/v1/resource/tekton/task/buildpacks-phases/0.2/raw

Install pipeline

kubectl apply -f https://api.hub.tekton.dev/v1/resource/tekton/pipeline/buildpacks/0.2/raw

Workspaces

  • source-ws: Location where source is stored. (REQUIRED)
  • cache-ws: Location where cache is stored if CACHE_IMAGE is not provided. (optional)

Parameters

  • BUILDER_IMAGE: The image on which builds will run (must include lifecycle and compatible buildpacks). (REQUIRED)
  • TRUST_BUILDER: Whether the builder image is trusted. When false, each build phase is executed in isolation and credentials are only shared with trusted images. (optional, default: "false")
  • APP_IMAGE: The name of where to store the app image. (REQUIRED)
  • SOURCE_URL: A git repo url where the source code resides. (REQUIRED)
  • SOURCE_REFERENCE: The branch, tag or SHA to checkout. (optional, default: "")
  • SOURCE_SUBPATH: A subpath within checked out source where the source to build is located. (optional, default: "")
  • ENV_VARS: Environment variables to set during build-time. (optional, default: [""])
  • PROCESS_TYPE: The default process type to set on the image. (optional, default: "web")
  • RUN_IMAGE: The name of the run image to use (defaults to image specified in builder). (optional, default: "")
  • CACHE_IMAGE: The name of the persistent cache image. (optional, default: "")
  • USER_ID: The user ID of the builder image user. (optional, default: "1000")
  • GROUP_ID: The group ID of the builder image user. (optional, default: "1000")

Builders

The following are the suggested builders from the Cloud Native Buildpacks project. This is only a subset of builders available.

  • gcr.io/buildpacks/builder:v1: Ubuntu 18 base image with buildpacks for .NET, Go, Java, Node.js, and Python
  • heroku/buildpacks:18: Base builder for Heroku-18 stack, based on ubuntu:18.04 base image
  • heroku/buildpacks:20: Base builder for Heroku-20 stack, based on ubuntu:20.04 base image
  • paketobuildpacks/builder:base: Ubuntu bionic base image with buildpacks for Java, .NET Core, NodeJS, Go, Ruby, NGINX and Procfile
  • paketobuildpacks/builder:full: Ubuntu bionic base image with buildpacks for Java, .NET Core, NodeJS, Go, PHP, Ruby, Apache HTTPD, NGINX and Procfile
  • paketobuildpacks/builder:tiny: Tiny base image (bionic build image, distroless-like run image) with buildpacks for Java Native Image and Go

Platforms

The Pipeline can be run on linux/amd64 platform.

Usage

See the following samples for usage:

  • cache-image.yaml: A PipelineRun configured to cache build artifacts in an image.
  • cache-volume.yaml: A PipelineRun configured to cache build artifacts in a volume.
  • env-vars.yaml: A PipelineRun configured to provide build-time environment variables.
  • run-image.yaml: A PipelineRun configured to specify an explicit run image.

Support

The Buildpacks Community is always here to help.

We can be found in our discussion board or slack (#tekton).

Contributing

We ❤ contributions.

This pipeline is maintained at buildpacks/tekton-integration. Issues, pull requests and other contributions can be made there.

To learn more, read the CONTRIBUTING and DEVELOPMENT documents.