mirror of https://github.com/knative/docs.git
describe ClusterBuildTemplate and its use within a Build (#604)
This commit is contained in:
parent
43bea1b3d5
commit
4a61b75ce6
|
@ -7,8 +7,12 @@ A set of curated and supported build templates is available in the
|
|||
|
||||
## What is a Build Template?
|
||||
|
||||
A `BuildTemplate` encapsulates a shareable [build](./builds.md) process with
|
||||
some limited parameterization capabilities.
|
||||
A `BuildTemplate` and `ClusterBuildTemplate` encapsulates a shareable [build](./builds.md)
|
||||
process with some limited parameterization capabilities.
|
||||
|
||||
A `BuildTemplate` is available within a namespace, and `ClusterBuildTemplate` is available across entire Kubernetes cluster.
|
||||
|
||||
A `BuildTemplate` functions exactly like a `ClusterBuildTemplate`, and as such all references to `BuildTemplate` below are also describing `ClusterBuildTemplate`.
|
||||
|
||||
### Example template
|
||||
|
||||
|
@ -95,6 +99,7 @@ spec:
|
|||
revision: master
|
||||
template:
|
||||
name: dockerfile-build-and-push
|
||||
kind: BuildTemplate
|
||||
arguments:
|
||||
- name: IMAGE
|
||||
value: gcr.io/my-project/rester-tester
|
||||
|
@ -110,6 +115,7 @@ spec:
|
|||
revision: master
|
||||
template:
|
||||
name: dockerfile-build-and-push
|
||||
kind: BuildTemplate
|
||||
arguments:
|
||||
- name: IMAGE
|
||||
value: gcr.io/my-project/wget
|
||||
|
@ -128,6 +134,7 @@ spec:
|
|||
revision: master
|
||||
template:
|
||||
name: dockerfile-build-and-push
|
||||
kind: BuildTemplate
|
||||
arguments:
|
||||
- name: IMAGE
|
||||
value: gcr.io/my-project/docker
|
||||
|
@ -138,6 +145,8 @@ spec:
|
|||
value: Dockerfile-17.06.1
|
||||
```
|
||||
|
||||
The `spec.template.kind` is optional and defaults to `BuildTemplate`. Alternately it could have value `ClusterBuildTemplate`.
|
||||
|
||||
---
|
||||
|
||||
Except as otherwise noted, the content of this page is licensed under the
|
||||
|
|
Loading…
Reference in New Issue