Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/knative/build-templates
A library of build templates.
https://github.com/knative/build-templates
build containers kubernetes template
Last synced: about 1 month ago
JSON representation
A library of build templates.
- Host: GitHub
- URL: https://github.com/knative/build-templates
- Owner: knative
- License: apache-2.0
- Archived: true
- Created: 2018-04-20T18:11:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-09-05T22:36:54.000Z (over 5 years ago)
- Last Synced: 2024-07-31T07:18:54.808Z (4 months ago)
- Topics: build, containers, kubernetes, template
- Language: Shell
- Size: 211 KB
- Stars: 184
- Watchers: 27
- Forks: 68
- Open Issues: 26
-
Metadata Files:
- Readme: README-old.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome - build-templates - A library of build templates. (Shell)
README
# Knative Build Templates
:rotating_light: **NOTE: Knative Build is
[deprecated](https://github.com/knative/build/issues/614) in favor of [Tekton
Pipelines](https://github.com/tektoncd/pipeline). There are no plans to
produce future releases of this component.** :rotating_light:**This version of README.md is provided for historical purposes.**
This repository contains a library of
`BuildTemplate` [resources](https://github.com/knative/docs/blob/master/build/build-templates.md) 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
1. `BuildTemplates` with a Namespace scopeA 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 -o yaml
```## Contributing and Support
If you want to contribute to this repository, please see our [contributing](./CONTRIBUTING.md) guidelines.
If you are looking for support, enter an [issue](https://github.com/knative/build-templates/issues/new) or join our [Slack workspace](https://knative.slack.com/)