Skip to content
Permalink
Browse files

[Doc] Buildpacks

More documentation.

Signed-off-by: David Gageot <david@gageot.net>
  • Loading branch information...
dgageot committed Nov 7, 2019
1 parent e8817b9 commit 73d91f1a0c08b3f319832fc97b248f1d4cf68c7f
@@ -78,6 +78,7 @@ Skaffold supports the following tools:
- locally
- on cloud with [Google Cloud Build](https://cloud.google.com/cloud-build/docs/)
* [Bazel](https://bazel.build/) locally
* [Cloud Native Buildpacks](https://buildpacks.io/) locally
* Custom script locally
{{% /tab %}}

@@ -15,6 +15,7 @@ provides built-in support for the following tools:
* Dockerfile locally, in-cluster with kaniko or on cloud using Google Cloud Build
* Jib Maven and Jib Gradle locally or on cloud using Google Cloud Build
* Bazel locally
* Cloud Native Buildpacks locally
* Custom script locally
* **Test**
* [container-structure-test](https://github.com/GoogleContainerTools/container-structure-test)
@@ -15,10 +15,10 @@ Skaffold has native support for several different tools for building images:
- [locally]({{< relref "/docs/pipeline-stages/builders/jib#jib-maven-and-gradle-locally" >}})
- on cloud with [Google Cloud Build]({{< relref "/docs/pipeline-stages/builders/jib#remotely-with-google-cloud-build" >}})
* [Bazel]({{< relref "/docs/pipeline-stages/builders/bazel" >}}) locally
* [Cloud Native Buildpacks]({{< relref "/docs/pipeline-stages/builders/buildpacks" >}}) locally
* [Custom script] ({{< relref "/docs/pipeline-stages/builders/custom" >}})
- [locally]({{<relref "/docs/pipeline-stages/builders/custom#custom-build-script-locally" >}}) and
- [in cluster]({{<relref "/docs/pipeline-stages/builders/custom#custom-build-script-in-cluster" >}})
* [CNCF Buildpacks] ({{< relref "/docs/pipeline-stages/builders/buildpacks" >}})

The `build` section in the Skaffold configuration file, `skaffold.yaml`,
controls how artifacts are built. To use a specific tool for building
@@ -1,39 +1,66 @@
---
title: "CNCF Buildpacks"
title: "Cloud Native Buildpacks"
linkTitle: "Buildpacks"
weight: 50
featureId: build.buildpacks
---

[Buildpacks]((https://buildpacks.io/)) enable building language-based containers from source code, without the need for a Dockerfile.
[Cloud Native Buildpacks](https://buildpacks.io/) enable building language-based
containers from source code, without the need for a Dockerfile.

Skaffold supports building with buildpacks natively.

Skaffold buildpacks support, builds the image inside local docker daemon.
It mounts the source dependencies and local artifact cache if caching is enabled
to a container in a docker daemon. These get unmounted once the build process is finished.
Skaffold supports building with Buildpacks natively, without installing
additional software. However, Buildpacks require a local Docker daemon
to be used.

Once all the necessary data is present, Skaffold wil build inside a container in a docker daemon
with image specified in `builderImage` in the `buildpack` config.
Once all the necessary data is present, Skaffold will build inside a container,
with the local Docker daemon, with ther builder image specified in `builder`,
in the `buildpack` config.

On successful build completion, built images will be pushed to the remote registry. You can choose to skip this step.
On successful build completion, built images will be pushed to the remote registry.
You can choose to skip this step.


**Configuration**
### Configuration

To use Buildpacks, add a `buildpack` field to each artifact you specify in the
`artifacts` part of the `build` section. `context` should be a path to
your source.
your sources.

The following options can optionally be configured:

{{< schema root="BuildpackArtifact" >}}

`builder` is *required* and tells Skaffold which
[Builder](https://buildpacks.io/docs/app-developer-guide/build-an-app/) to use.

**Example**

The following `build` section, instructs Skaffold to build a
Docker image `gcr.io/k8s-skaffold/skaffold-buildpacks` with buildpacks:
Docker image with buildpacks:

{{% readfile file="samples/builders/buildpacks.yaml" %}}

### Dependencies

`dependencies` tells the skaffold file watcher which files should be watched to
trigger rebuilds and file syncs. Supported schema for `dependencies` includes:

{{< schema root="BuildpackDependencies" >}}

By default, every file in the artifact's `context` will be watched.

#### Paths and Ignore

`Paths` and `Ignore` are arrays used to list dependencies.
Any paths in `Ignore` will be ignored by the skaffold file watcher, even if they are also specified in `Paths`.
`Ignore` will only work in conjunction with `Paths`, and with none of the other custom artifact dependency types.

```yaml
buildpack:
builder: "heroku/buildpacks"
dependencies:
paths:
- pkg/**
- src/*.go
ignore:
- vendor/**
```
@@ -10,9 +10,9 @@
"build.buildpacks": {
"build": "x",
"area": "Build",
"feature": "native buildpacks support",
"feature": "Cloud Native Buildpacks support",
"maturity": "alpha",
"description": "Skaffold natively support for buildpacks artifact and buildpacks builder "
"description": "Skaffold natively support for artifacts built with Cloud Native Buildpacks"
},
"build.custom": {
"dev": "x",

0 comments on commit 73d91f1

Please sign in to comment.
You can’t perform that action at this time.