fission/builder image, log collection improvement in builder (#397)
Create a container image with the buidler, so we can avoid copying the builder binary into the env container during the env container build. Gather both stdout and stderr of a build into the logs. * Add Dockerfile for builder + update release scripts * Improve logging of buildermgr and builder * Add support for environment-scoped buildcmd * Fix fork/exec wd when package is a file * Update tests to also include builder image * Add logging to builder's fork/exec
This commit is contained in:
committed by
Soam Vasani
parent
da820186f0
commit
b2678783b6
@@ -46,8 +46,9 @@ import (
|
||||
func buildPackage(fissionClient *crd.FissionClient, kubernetesClient *kubernetes.Clientset,
|
||||
builderNamespace string, storageSvcUrl string, buildReq BuildRequest) (buildLogs string, err error) {
|
||||
|
||||
pkg, err := fissionClient.Packages(
|
||||
buildReq.Package.Namespace).Get(buildReq.Package.Name)
|
||||
pkg, err := fissionClient.
|
||||
Packages(buildReq.Package.Namespace).
|
||||
Get(buildReq.Package.Name)
|
||||
if err != nil {
|
||||
e := fmt.Sprintf("Error getting function CRD info: %v", err)
|
||||
log.Println(e)
|
||||
@@ -107,9 +108,14 @@ func buildPackage(fissionClient *crd.FissionClient, kubernetesClient *kubernetes
|
||||
return e, fission.MakeError(500, e)
|
||||
}
|
||||
|
||||
buildCmd := pkg.Spec.BuildCommand
|
||||
if len(buildCmd) == 0 {
|
||||
buildCmd = env.Spec.Builder.Command
|
||||
}
|
||||
|
||||
pkgBuildReq := &builder.PackageBuildRequest{
|
||||
SrcPkgFilename: srcPkgFilename,
|
||||
BuildCommand: pkg.Spec.BuildCommand,
|
||||
BuildCommand: buildCmd,
|
||||
}
|
||||
|
||||
log.Printf("Start building with source package: %v", srcPkgFilename)
|
||||
|
||||
Reference in New Issue
Block a user