Add builder manager support (#308)
This change orchestrates function builds. Environments (in v2) define a builder image, just like they do a runtime image. The builder image contains a build script that's invoked with source and deployment paths (as env vars). The buildermgr watches for environments with build images defined, and creates build deployments and services. Functions can define source and deployment. Buildermgr watches for functions with source code (and build status == pending) and invokes the environment's builder when appropriate. It captures logs from the build and sets the build status (success/failure) and build lots into the PackageStatus.
This commit is contained in:
committed by
Soam Vasani
parent
a720377f3c
commit
e587eca08f
@@ -65,9 +65,10 @@ type (
|
||||
BuildStatus string
|
||||
|
||||
PackageSpec struct {
|
||||
Environment EnvironmentReference `json:"environment"`
|
||||
Source Archive `json:"source"`
|
||||
Deployment Archive `json:"deployment"`
|
||||
Environment EnvironmentReference `json:"environment"`
|
||||
Source Archive `json:"source"`
|
||||
Deployment Archive `json:"deployment"`
|
||||
BuildCommand string `json:"buildcmd"`
|
||||
// In the future, we can have a debug build here too
|
||||
}
|
||||
PackageStatus struct {
|
||||
@@ -220,11 +221,11 @@ type (
|
||||
// env-specific. Optional.
|
||||
FilePath string `json:"filepath"`
|
||||
|
||||
// Entrypoint has an environment-specific meaning;
|
||||
// FunctionName has an environment-specific meaning;
|
||||
// usually, it defines a function within a module
|
||||
// containing multiple functions. Optional; default is
|
||||
// environment-specific.
|
||||
EntryPoint string `json:"entrypoint"`
|
||||
FunctionName string `json:"functionName"`
|
||||
|
||||
// URL to expose this function at. Optional; defaults
|
||||
// to "/".
|
||||
|
||||
Reference in New Issue
Block a user