From 73d91f1a0c08b3f319832fc97b248f1d4cf68c7f Mon Sep 17 00:00:00 2001 From: David Gageot Date: Thu, 7 Nov 2019 10:23:10 +0100 Subject: [PATCH] [Doc] Buildpacks More documentation. Signed-off-by: David Gageot --- docs/content/en/docs/_index.md | 1 + docs/content/en/docs/design/_index.md | 1 + .../docs/pipeline-stages/builders/_index.md | 2 +- .../pipeline-stages/builders/buildpacks.md | 55 ++++++++++++++----- docs/data/maturity.json | 4 +- 5 files changed, 46 insertions(+), 17 deletions(-) diff --git a/docs/content/en/docs/_index.md b/docs/content/en/docs/_index.md index 1d967d85cd5..181012be8a9 100755 --- a/docs/content/en/docs/_index.md +++ b/docs/content/en/docs/_index.md @@ -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 %}} diff --git a/docs/content/en/docs/design/_index.md b/docs/content/en/docs/design/_index.md index dd3a503d2c5..dd89ce0600a 100644 --- a/docs/content/en/docs/design/_index.md +++ b/docs/content/en/docs/design/_index.md @@ -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) diff --git a/docs/content/en/docs/pipeline-stages/builders/_index.md b/docs/content/en/docs/pipeline-stages/builders/_index.md index 4c92afa51c3..ac71ac85e92 100755 --- a/docs/content/en/docs/pipeline-stages/builders/_index.md +++ b/docs/content/en/docs/pipeline-stages/builders/_index.md @@ -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]({{}}) and - [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 diff --git a/docs/content/en/docs/pipeline-stages/builders/buildpacks.md b/docs/content/en/docs/pipeline-stages/builders/buildpacks.md index 57bc83c40c5..22c0769509e 100644 --- a/docs/content/en/docs/pipeline-stages/builders/buildpacks.md +++ b/docs/content/en/docs/pipeline-stages/builders/buildpacks.md @@ -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/** +``` \ No newline at end of file diff --git a/docs/data/maturity.json b/docs/data/maturity.json index 91b78e8b968..dc1f0e21742 100644 --- a/docs/data/maturity.json +++ b/docs/data/maturity.json @@ -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",