Skip to content

Commit

Permalink
allowing on cluster build for go runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
Shashankft9 committed Nov 23, 2022
1 parent 4a4392d commit ff1e364
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
18 changes: 11 additions & 7 deletions docs/building-functions/on_cluster_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,16 @@ git remote add origin git@github.com:my-repo/my-function.git
```
4. Update the Function configuration in `func.yaml` to enable on cluster builds for the Git repository:
```yaml
build: git # required, specify `git` build type
git:
url: https://github.com/my-repo/my-function.git # required, git repository with the function source code
revision: main # optional, git revision to be used (branch, tag, commit)
# contextDir: myfunction # optional, needed only if the function is not located
# in the repository root folder
build:
git:
url: https://github.com/my-repo/my-function.git # required, git repository with the function source code
revision: main # optional, git revision to be used (branch, tag, commit)
# contextDir: myfunction # optional, needed only if the function is not located in the repository root folder
# builderImages: # optional, needed only if the runtime is golang
# pack: ghcr.io/boson-project/go-function-builder:tip
buildpacks: []
builder: ""
buildEnvs: []
```
5. Implement the business logic of your Function, then commit and push changes
```bash
Expand All @@ -64,7 +68,7 @@ git push origin main
```
6. Deploy your Function
```bash
kn func deploy
kn func deploy --remote --registry docker.io/my-repo --git-url https://github.com/my-repo/my-function.git
```
If you are not logged in the container registry referenced in your function configuration,
you will prompted to provide credentials for the remote container registry that hosts the Function image. You should see output similar to the following:
Expand Down
2 changes: 1 addition & 1 deletion pipelines/tekton/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func validatePipeline(f fn.Function) error {
return ErrRuntimeRequired
}

if f.Runtime == "go" || f.Runtime == "rust" {
if f.Runtime == "rust" {
return ErrRuntimeNotSupported{f.Runtime}
}

Expand Down

0 comments on commit ff1e364

Please sign in to comment.