pull the image before looking for assemble user metadata
@@ -29,24 +29,24 @@ func Strategy(client docker.Client, config *api.Config, overrides build.Override
startTime := time.Now()
- if config.AssembleUser, err = docker.GetAssembleUser(client, config); err != nil {
+ image, err := docker.GetBuilderImage(client, config)
+ buildInfo.Stages = api.RecordStageAndStepInfo(buildInfo.Stages, api.StagePullImages, api.StepPullBuilderImage, startTime, time.Now())
+ if err != nil {
buildInfo.FailureReason = utilstatus.NewFailureReason(
utilstatus.ReasonPullBuilderImageFailed,
utilstatus.ReasonMessagePullBuilderImageFailed,
)
return nil, buildInfo, err
}
+ config.HasOnBuild = image.OnBuild
- image, err := docker.GetBuilderImage(client, config)
- buildInfo.Stages = api.RecordStageAndStepInfo(buildInfo.Stages, api.StagePullImages, api.StepPullBuilderImage, startTime, time.Now())
- if err != nil {
+ if config.AssembleUser, err = docker.GetAssembleUser(client, config); err != nil {
buildInfo.FailureReason = utilstatus.NewFailureReason(
utilstatus.ReasonPullBuilderImageFailed,
utilstatus.ReasonMessagePullBuilderImageFailed,
)
return nil, buildInfo, err
}
- config.HasOnBuild = image.OnBuild
// if we're blocking onbuild, just do a normal s2i build flow
// which won't do a docker build and invoke the onbuild commands
