@@ -330,7 +330,7 @@ func (bc *BuildController) handleBuild(build *buildapi.Build) error {
330
330
331
331
// If pipeline build, handle pruning.
332
332
if build .Spec .Strategy .JenkinsPipelineStrategy != nil {
333
- if buildutil .IsBuildComplete (build ) {
333
+ if buildutil .IsBuildCompleteInternal (build ) {
334
334
if err := common .HandleBuildPruning (buildutil .ConfigNameForBuild (build ), build .Namespace , bc .buildLister , bc .buildConfigGetter , bc .buildDeleter ); err != nil {
335
335
utilruntime .HandleError (fmt .Errorf ("failed to prune builds for %s/%s: %v" , build .Namespace , build .Name , err ))
336
336
}
@@ -363,7 +363,7 @@ func (bc *BuildController) handleBuild(build *buildapi.Build) error {
363
363
case build .Status .Phase == buildapi .BuildPhasePending ,
364
364
build .Status .Phase == buildapi .BuildPhaseRunning :
365
365
update , err = bc .handleActiveBuild (build , pod )
366
- case buildutil .IsBuildComplete (build ):
366
+ case buildutil .IsBuildCompleteInternal (build ):
367
367
update , err = bc .handleCompletedBuild (build , pod )
368
368
}
369
369
if update != nil && ! update .isEmpty () {
@@ -395,7 +395,7 @@ func shouldIgnore(build *buildapi.Build) bool {
395
395
// state and its completion time or logsnippet is not set, then we should at least attempt to set its
396
396
// completion time and logsnippet if possible because the build pod may have put the build in
397
397
// this state and it would have not set the completion timestamp or logsnippet data.
398
- if buildutil .IsBuildComplete (build ) {
398
+ if buildutil .IsBuildCompleteInternal (build ) {
399
399
switch build .Status .Phase {
400
400
case buildapi .BuildPhaseComplete :
401
401
if build .Status .CompletionTimestamp == nil {
@@ -415,7 +415,7 @@ func shouldIgnore(build *buildapi.Build) bool {
415
415
416
416
// shouldCancel returns true if a build is active and its cancellation flag is set
417
417
func shouldCancel (build * buildapi.Build ) bool {
418
- return ! buildutil .IsBuildComplete (build ) && build .Status .Cancelled
418
+ return ! buildutil .IsBuildCompleteInternal (build ) && build .Status .Cancelled
419
419
}
420
420
421
421
// cancelBuild deletes a build pod and returns an update to mark the build as cancelled
@@ -1085,7 +1085,7 @@ func (bc *BuildController) updateBuild(build *buildapi.Build, update *buildUpdat
1085
1085
}
1086
1086
1087
1087
// Update build completion timestamp if transitioning to a terminal phase
1088
- if buildutil .IsTerminalPhase (* update .phase ) {
1088
+ if buildutil .IsTerminalPhaseInternal (* update .phase ) {
1089
1089
setBuildCompletionData (build , pod , update )
1090
1090
}
1091
1091
glog .V (4 ).Infof ("Updating build %s -> %s%s" , buildDesc (build ), * update .phase , reasonText )
@@ -1114,7 +1114,7 @@ func (bc *BuildController) updateBuild(build *buildapi.Build, update *buildUpdat
1114
1114
buildapi .BuildPhaseFailed :
1115
1115
bc .recorder .Eventf (patchedBuild , kapi .EventTypeNormal , buildapi .BuildFailedEventReason , fmt .Sprintf (buildapi .BuildFailedEventMessage , patchedBuild .Namespace , patchedBuild .Name ))
1116
1116
}
1117
- if buildutil .IsTerminalPhase (* update .phase ) {
1117
+ if buildutil .IsTerminalPhaseInternal (* update .phase ) {
1118
1118
bc .handleBuildCompletion (patchedBuild )
1119
1119
}
1120
1120
}
@@ -1270,7 +1270,7 @@ func (bc *BuildController) buildDeleted(obj interface{}) {
1270
1270
}
1271
1271
}
1272
1272
// If the build was not in a complete state, poke the buildconfig to run the next build
1273
- if ! buildutil .IsBuildComplete (build ) {
1273
+ if ! buildutil .IsBuildCompleteInternal (build ) {
1274
1274
bcName := buildutil .ConfigNameForBuild (build )
1275
1275
bc .enqueueBuildConfig (build .Namespace , bcName )
1276
1276
}
@@ -1375,7 +1375,7 @@ func isValidTransition(from, to buildapi.BuildPhase) bool {
1375
1375
}
1376
1376
1377
1377
switch {
1378
- case buildutil .IsTerminalPhase (from ):
1378
+ case buildutil .IsTerminalPhaseInternal (from ):
1379
1379
return false
1380
1380
case from == buildapi .BuildPhasePending :
1381
1381
switch to {
0 commit comments