Skip to content
A library of build templates.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bazel Use revision instead of branch (#31) Jul 21, 2018
buildah buildah: gophers and yams 🥔 (#96) Feb 26, 2019
buildkit add BuildKit build template (#70) Oct 17, 2018
buildpacks Adds template for Cloud Native Buildpacks (#67) Mar 6, 2019
ecr_helper Unset IFS to avoid quoting issues (#81) Jan 29, 2019
gcr_helper Use openssl base64 for gcr_helper (#40) Jul 21, 2018
hack Update the vendored test-infra dir (#80) Nov 30, 2018
jib
kaniko Explicitly set DOCKER_CONFIG in the kaniko build template. (#87) Jan 22, 2019
makisu Add BuildTemplate for makisu (#90) Mar 6, 2019
test Adds template for Cloud Native Buildpacks (#67) Mar 6, 2019
vendor/github.com/knative/test-infra update deps:test-infra for fixing release.yaml not found error (#91) Feb 13, 2019
CONTRIBUTING.md
Gopkg.lock update deps:test-infra for fixing release.yaml not found error (#91) Feb 13, 2019
Gopkg.toml
LICENSE
OWNERS
README.md

README.md

Knative Build Templates

This repository contains a library of BuildTemplate resources which are designed to be reusable by many applications.

Each build template is in a separate directory along with a README.md and a Kubernetes manifest, so you can choose which build templates to install on your cluster.

Build Templates Kinds

There are two kinds of build templates:

  1. ClusterBuildTemplates with a Cluster scope
  2. BuildTemplates with a Namespace scope

A default kind of BuildTemplate is used if the field kind is not set.

Using Build Templates

First, install a build template onto your cluster:

$ kubectl apply -f buildpack.yaml
buildtemplate "buildpack" created

You can see which build templates are installed using kubectl as well:

$ kubectl get buildtemplates
NAME       AGE
buildpack  3s

OR

$ kubectl get clusterbuildtemplates
NAME        AGE
buildpack   9s

With the build template installed, you can define a build that uses that template, being sure to provide values for required parameters:

apiVersion: build.knative.dev/v1alpha1
kind: Build
metadata:
  name: buildpack-build
spec:
  source:
    git:
      url: https://github.com/my-user/my-repo
      revision: master
  template:
    name: buildpack
    kind: BuildTemplate # (or ClusterBuildTemplate)
    arguments:
    - name: IMAGE
      value: us.gcr.io/my-project/my-app

Next, create the build you defined:

$ kubectl apply -f build.yaml
build "buildpack-build" created

You can check the status of the build using kubectl:

$ kubectl get build buildpack-build -oyaml

Contributing and Support

If you want to contribute to this repository, please see our contributing guidelines.

If you are looking for support, enter an issue or join our Slack workspace

You can’t perform that action at this time.