Builder manager bugfixes (#367)
This contains a few different builder manager fixes: * Update the zip file structure to avoid an extra subdirectory * Annotate packages with what functions are using them * Only trigger builds when there is no deployment archive * Python environment loadpath bugfixes * Other bugfixes
This commit is contained in:
committed by
Soam Vasani
parent
380b7d1bcd
commit
a63b8b372f
@@ -269,22 +269,32 @@ func (envw *environmentWatcher) createBuilder(env *crd.Environment) (*builderInf
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// there should be only one service in svcList
|
||||
if len(svcList) == 0 {
|
||||
svc, err = envw.createBuilderService(env)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Error creating builder service: %v", err)
|
||||
}
|
||||
} else if len(svcList) == 1 {
|
||||
svc = &svcList[0]
|
||||
} else {
|
||||
return nil, fmt.Errorf("Found more than one builder service for environment %v", env.Metadata.Name)
|
||||
}
|
||||
|
||||
deployList, err := envw.getBuilderDeploymentList(sel)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// there should be only one deploy in deployList
|
||||
if len(deployList) == 0 {
|
||||
deploy, err = envw.createBuilderDeployment(env)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Error creating builder deployment: %v", err)
|
||||
}
|
||||
} else if len(deployList) == 1 {
|
||||
deploy = &deployList[0]
|
||||
} else {
|
||||
return nil, fmt.Errorf("Found more than one builder deployment for environment %v", env.Metadata.Name)
|
||||
}
|
||||
|
||||
return &builderInfo{
|
||||
|
||||
Reference in New Issue
Block a user