You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: "Building Artifacts with a Custom Build Script"
3
+
linkTitle: "Custom Build Script"
4
+
weight: 100
5
5
---
6
6
7
-
This page describes building Skaffold artifacts with[buildpacks](https://buildpacks.io/).
7
+
This page describes building Skaffold artifacts using a custom build script, which builds images using[buildpacks](https://buildpacks.io/).
8
8
Buildpacks enable building language-based containers from source code, without the need for a Dockerfile.
9
9
10
10
## Before you begin
11
11
First, you will need to have Skaffold and a Kubernetes cluster set up.
12
12
To learn more about how to set up Skaffold and a Kubernetes cluster, see the [quickstart docs]({{< relref "/docs/quickstart" >}}).
13
13
14
-
To use buildpacks with Skaffold, please install the following additional tools:
14
+
For this tutorial, to use buildpacks as a custom builder with Skaffold, please install the following additional tools:
15
15
16
16
*[pack](https://buildpacks.io/docs/install-pack/)
17
17
*[docker](https://docs.docker.com/install/)
18
18
19
-
## Tutorial - Hello World in Go
20
-
21
-
To walk through a buildpacks tutorial, see our [buildpacks example](https://github.com/GoogleContainerTools/skaffold/tree/master/examples/buildpacks).
22
-
23
-
24
-
## Adding Buildpacks to Your Skaffold Project
25
19
26
20
To use buildpacks with your own project, you must choose a buildpack image to build your artifacts.
Now, configure your Skaffold config to build artifacts with buildpacks.
41
-
To do this, we will take advantage of the [custom builder](../builders) in Skaffold.
34
+
## Tutorial - Hello World in Go
35
+
36
+
This tutorial will be based on the [buildpacks example](https://github.com/GoogleContainerTools/skaffold/tree/master/examples/buildpacks) in our repository.
37
+
38
+
39
+
## Adding a Custom Builder to Your Skaffold Project
40
+
41
+
We'll need to configure your Skaffold config to build artifacts with this custom builder.
42
+
To do this, we will take advantage of the [custom builder]({{<relref "docs/pipeline-stages/builders#custom-build-script-run-locally" >}}) in Skaffold.
42
43
43
44
First, add a `build.sh` file which Skaffold will call to build artifacts:
44
45
@@ -50,10 +51,10 @@ Then, configure artifacts in your `skaffold.yaml` to build with `build.sh`:
List the file dependencies for each artifact; in the example above, Skaffold watches all files in the build context.
53
-
For more information about listing dependencies for custom artifacts, see the documentation [here](../builders).
54
+
For more information about listing dependencies for custom artifacts, see the documentation [here]({{<relref "docs/pipeline-stages/builders#getting-dependencies-from-a-command" >}}).
54
55
55
56
56
-
You can check buildpacks are properly configured by running `skaffold build`.
57
+
You can check custom builder is properly configured by running `skaffold build`.
57
58
This command should build the artifacts and exit successfully.
0 commit comments