Skip to content

Commit ff1e364

Browse files
committed
allowing on cluster build for go runtime
1 parent 4a4392d commit ff1e364

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

docs/building-functions/on_cluster_build.md

+11-7
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,16 @@ git remote add origin git@github.com:my-repo/my-function.git
4949
```
5050
4. Update the Function configuration in `func.yaml` to enable on cluster builds for the Git repository:
5151
```yaml
52-
build: git # required, specify `git` build type
53-
git:
54-
url: https://github.com/my-repo/my-function.git # required, git repository with the function source code
55-
revision: main # optional, git revision to be used (branch, tag, commit)
56-
# contextDir: myfunction # optional, needed only if the function is not located
57-
# in the repository root folder
52+
build:
53+
git:
54+
url: https://github.com/my-repo/my-function.git # required, git repository with the function source code
55+
revision: main # optional, git revision to be used (branch, tag, commit)
56+
# contextDir: myfunction # optional, needed only if the function is not located in the repository root folder
57+
# builderImages: # optional, needed only if the runtime is golang
58+
# pack: ghcr.io/boson-project/go-function-builder:tip
59+
buildpacks: []
60+
builder: ""
61+
buildEnvs: []
5862
```
5963
5. Implement the business logic of your Function, then commit and push changes
6064
```bash
@@ -64,7 +68,7 @@ git push origin main
6468
```
6569
6. Deploy your Function
6670
```bash
67-
kn func deploy
71+
kn func deploy --remote --registry docker.io/my-repo --git-url https://github.com/my-repo/my-function.git
6872
```
6973
If you are not logged in the container registry referenced in your function configuration,
7074
you will prompted to provide credentials for the remote container registry that hosts the Function image. You should see output similar to the following:

pipelines/tekton/validate.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func validatePipeline(f fn.Function) error {
3030
return ErrRuntimeRequired
3131
}
3232

33-
if f.Runtime == "go" || f.Runtime == "rust" {
33+
if f.Runtime == "rust" {
3434
return ErrRuntimeNotSupported{f.Runtime}
3535
}
3636

0 commit comments

Comments
 (0)