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
Use ko instead of buildpacks for the custom builder
Since buildpacks are natively supported, it’s better
to use another example for the custom build script.
Signed-off-by: David Gageot <[email protected]>
This tutorial will be based on the [buildpacks example](https://github.com/GoogleContainerTools/skaffold/tree/master/examples/buildpacks) in our repository.
18
+
This tutorial will be based on the [custom example](https://github.com/GoogleContainerTools/skaffold/tree/master/examples/custom) in our repository.
37
19
38
20
39
21
## Adding a Custom Builder to Your Skaffold Project
40
22
41
-
We'll need to configure your Skaffold config to build artifacts with this custom builder.
23
+
We'll need to configure your Skaffold config to build artifacts with [ko](https://github.com/google/ko).
42
24
To do this, we will take advantage of the [custom builder]({{<relref "/docs/pipeline-stages/builders/custom" >}}) in Skaffold.
43
25
44
26
First, add a `build.sh` file which Skaffold will call to build artifacts:
Copy file name to clipboardExpand all lines: examples/custom/README.md
+16-15
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
-
### Example: use the custom builder with Cloud Native Buildpacks
1
+
### Example: use the custom builder with ko
2
2
3
3
This example shows how the custom builder can be used to
4
-
build artifacts with Cloud Native Buildpacks.
4
+
build artifacts with [ko](https://github.com/google/ko).
5
5
6
-
***building** a single Go file app with buildpacks
6
+
***building** a single Go file app with ko
7
7
***tagging** using the default tagPolicy (`gitCommit`)
8
8
***deploying** a single container pod using `kubectl`
9
9
@@ -12,31 +12,32 @@ build artifacts with Cloud Native Buildpacks.
12
12
For this tutorial to work, you will need to have Skaffold and a Kubernetes cluster set up.
13
13
To learn more about how to set up Skaffold and a Kubernetes cluster, see the [getting started docs](https://skaffold.dev/docs/getting-started).
14
14
15
-
To use buildpacks with Skaffold, please install the following additional tools:
16
-
17
-
*[pack](https://buildpacks.io/docs/install-pack/)
18
-
*[docker](https://docs.docker.com/install/)
19
-
20
15
#### Tutorial
21
16
22
-
This tutorial will demonstrate how Skaffold can build a simple Hello World Go application with buildpacks and deploy it to a Kubernetes cluster.
17
+
This tutorial will demonstrate how Skaffold can build a simple Hello World Go application with ko and deploy it to a Kubernetes cluster.
23
18
24
-
First, clone the Skaffold [repo](https://github.com/GoogleContainerTools/skaffold) and navigate to the [buildpacks example](https://github.com/GoogleContainerTools/skaffold/tree/master/examples/buildpacks) for sample code:
19
+
First, clone the Skaffold [repo](https://github.com/GoogleContainerTools/skaffold) and navigate to the [custom example](https://github.com/GoogleContainerTools/skaffold/tree/master/examples/custom) for sample code:
Copy file name to clipboardExpand all lines: integration/examples/custom/README.md
+16-15
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
-
### Example: use the custom builder with Cloud Native Buildpacks
1
+
### Example: use the custom builder with ko
2
2
3
3
This example shows how the custom builder can be used to
4
-
build artifacts with Cloud Native Buildpacks.
4
+
build artifacts with [ko](https://github.com/google/ko).
5
5
6
-
***building** a single Go file app with buildpacks
6
+
***building** a single Go file app with ko
7
7
***tagging** using the default tagPolicy (`gitCommit`)
8
8
***deploying** a single container pod using `kubectl`
9
9
@@ -12,31 +12,32 @@ build artifacts with Cloud Native Buildpacks.
12
12
For this tutorial to work, you will need to have Skaffold and a Kubernetes cluster set up.
13
13
To learn more about how to set up Skaffold and a Kubernetes cluster, see the [getting started docs](https://skaffold.dev/docs/getting-started).
14
14
15
-
To use buildpacks with Skaffold, please install the following additional tools:
16
-
17
-
*[pack](https://buildpacks.io/docs/install-pack/)
18
-
*[docker](https://docs.docker.com/install/)
19
-
20
15
#### Tutorial
21
16
22
-
This tutorial will demonstrate how Skaffold can build a simple Hello World Go application with buildpacks and deploy it to a Kubernetes cluster.
17
+
This tutorial will demonstrate how Skaffold can build a simple Hello World Go application with ko and deploy it to a Kubernetes cluster.
23
18
24
-
First, clone the Skaffold [repo](https://github.com/GoogleContainerTools/skaffold) and navigate to the [buildpacks example](https://github.com/GoogleContainerTools/skaffold/tree/master/examples/buildpacks) for sample code:
19
+
First, clone the Skaffold [repo](https://github.com/GoogleContainerTools/skaffold) and navigate to the [custom example](https://github.com/GoogleContainerTools/skaffold/tree/master/examples/custom) for sample code:
0 commit comments