.. | ||
samples | ||
tests | ||
buildpacks.yaml | ||
README.md |
Buildpacks
This task 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.
See also buildpacks-phases
for the deconstructed version of this task, which runs each of the lifecycle phases individually. This task uses the creator binary, which coordinates and runs all of the phases.
Compatibility
- Tekton v0.17.0 and above
- Platform API 0.4
- For other versions, see previous versions.
Install
kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/master/task/buildpacks/0.4/buildpacks.yaml
Workspaces
source
: Directory where application source is located. (REQUIRED)cache
: Directory where cache is stored (when no cache image is provided). (optional)dockerconfig
: An optional workspace that allows providing a.docker/config.json
file for Builpacks lifecycle binary to access the container registry. The file should be placed at the root of the Workspace with nameconfig.json
. (optional)
Parameters
APP_IMAGE
: The name of where to store the app image. (REQUIRED)BUILDER_IMAGE
: The image on which builds will run (must include lifecycle and compatible buildpacks). (REQUIRED)SOURCE_SUBPATH
: A subpath within thesource
input 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
: Reference to a run image to use. (optional, default: "")CACHE_IMAGE
: The name of the persistent app cache image (if no cache workspace is provided). (optional, default: "")SKIP_RESTORE
: Do not write layer metadata or restore cached layers. (optional, default: "false")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")PLATFORM_DIR
: The name of the platform directory. (optional, default: "empty-dir")
Results
APP_IMAGE_DIGEST
: The digest of the builtAPP_IMAGE
.
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 Pythonheroku/buildpacks:18
: Base builder for Heroku-18 stack, based on ubuntu:18.04 base imageheroku/buildpacks:20
: Base builder for Heroku-20 stack, based on ubuntu:20.04 base imagepaketobuildpacks/builder:base
: Ubuntu bionic base image with buildpacks for Java, .NET Core, NodeJS, Go, Ruby, NGINX and Procfilepaketobuildpacks/builder:full
: Ubuntu bionic base image with buildpacks for Java, .NET Core, NodeJS, Go, PHP, Ruby, Apache HTTPD, NGINX and Procfilepaketobuildpacks/builder:tiny
: Tiny base image (bionic build image, distroless-like run image) with buildpacks for Java Native Image and Go
Platforms
The Task can be run on linux/amd64
platform.
Usage
See the following samples for usage:
env-vars.yaml
: A PipelineRun configured to provide build-time environment variables.results.yaml
: A PipelineRun configured to demonstrate usage of task results.dockerconfig.yaml
: A PipelineRun configured to demonstrate usage ofdockerconfig
workspace for referencing.docker/config.json
file.
Support
The Buildpacks Community is always here to help.
We can be found in our discussion board or slack (#tekton
).
Contributing
We ❤ contributions.
This task 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.
Previous Versions
For support of previous Platform APIs use a previous version of this task.
Be sure to also supply a compatible builder image (
BUILDER_IMAGE
input) when running the task (i.e. one that has a lifecycle that supports the platform API).
Version | Platform API |
---|---|
0.2 | 0.3 |