forked from LaconicNetwork/kompose
Fixed typos in openshift buildconfig
- spelling mistake - pass compose file dir instead of compose file to initBuildConfig call - Use as default value for cli --build-branch option - Pass current build branch to buildconfig related functions instead of opt.BuildBranch - Fix printing buildconfig source branch in logs.
This commit is contained in:
parent
4d3347d300
commit
7c959b65d4
@ -88,7 +88,7 @@ func init() {
|
||||
convertCmd.Flags().MarkHidden("deployment-config")
|
||||
convertCmd.Flags().StringVar(&ConvertBuildRepo, "build-repo", "", "Specify source repository for buildconfig (default remote origin)")
|
||||
convertCmd.Flags().MarkHidden("build-repo")
|
||||
convertCmd.Flags().StringVar(&ConvertBuildBranch, "build-branch", "master", "Specify repository branch to use for buildconfig (default master)")
|
||||
convertCmd.Flags().StringVar(&ConvertBuildBranch, "build-branch", "", "Specify repository branch to use for buildconfig (default master)")
|
||||
convertCmd.Flags().MarkHidden("build-branch")
|
||||
|
||||
// Standard between the two
|
||||
|
||||
@ -170,7 +170,7 @@ func (o *OpenShift) initImageStream(name string, service kobject.ServiceConfig)
|
||||
func initBuildConfig(name string, service kobject.ServiceConfig, composeFileDir string, repo string, branch string) *buildapi.BuildConfig {
|
||||
contextDir, err := getAbsBuildContext(service.Build, composeFileDir)
|
||||
if err != nil {
|
||||
logrus.Fatalf("[%s] Buildconfig cannote be created due to error in creating build context.", name)
|
||||
logrus.Fatalf("[%s] Buildconfig cannot be created due to error in creating build context.", name)
|
||||
}
|
||||
|
||||
bc := &buildapi.BuildConfig{
|
||||
@ -356,7 +356,7 @@ func (o *OpenShift) Transform(komposeObject kobject.KomposeObject, opt kobject.C
|
||||
}
|
||||
hasBuild = true
|
||||
}
|
||||
objects = append(objects, initBuildConfig(name, service, opt.InputFile, buildRepo, opt.BuildBranch)) // Openshift BuildConfigs
|
||||
objects = append(objects, initBuildConfig(name, service, composeFileDir, buildRepo, buildBranch)) // Openshift BuildConfigs
|
||||
}
|
||||
|
||||
// If ports not provided in configuration we will not make service
|
||||
@ -375,7 +375,7 @@ func (o *OpenShift) Transform(komposeObject kobject.KomposeObject, opt kobject.C
|
||||
}
|
||||
|
||||
if hasBuild {
|
||||
logrus.Infof("Buildconfig using %s::%s as source.", buildRepo, opt.BuildBranch)
|
||||
logrus.Infof("Buildconfig using %s::%s as source.", buildRepo, buildBranch)
|
||||
}
|
||||
// If docker-compose has a volumes_from directive it will be handled here
|
||||
o.VolumesFrom(&allobjects, komposeObject)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user