Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions pkg/functions/function.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,14 @@ type BuildSpec struct {
Image string `yaml:"-"`

// Mounts used in build phase. This is useful in particular for paketo bindings.
Mounts []MountSpec `yaml:"mounts,omitempty"`
Mounts []MountSpec `yaml:"volumes,omitempty"`
}

type MountSpec struct {
Source string `yaml:"source"`
Destination string `yaml:"destination"`
// Path on the local machine
Source string `yaml:"hostPath"`
// Path in the build container
Destination string `yaml:"path"`
}

// RunSpec
Expand Down
16 changes: 9 additions & 7 deletions schema/func_yaml-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"type": "string",
"description": "RemoteStorageClass specifies the storage class to use for the volume used\non-cluster during when built remotely."
},
"mounts": {
"volumes": {
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/MountSpec"
Expand Down Expand Up @@ -279,15 +279,17 @@
},
"MountSpec": {
"required": [
"source",
"destination"
"hostPath",
"path"
],
"properties": {
"source": {
"type": "string"
"hostPath": {
"type": "string",
"description": "Path on the local machine"
},
"destination": {
"type": "string"
"path": {
"type": "string",
"description": "Path in the build container"
}
},
"additionalProperties": false,
Expand Down
Loading