File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import (
13
13
14
14
"github.com/openshift/origin/pkg/build/api"
15
15
"github.com/openshift/origin/pkg/build/api/validation"
16
+ buildutil "github.com/openshift/origin/pkg/build/util"
16
17
)
17
18
18
19
// strategy implements behavior for Build objects
@@ -94,7 +95,13 @@ type detailsStrategy struct {
94
95
func (detailsStrategy ) PrepareForUpdate (ctx kapi.Context , obj , old runtime.Object ) {
95
96
newBuild := obj .(* api.Build )
96
97
oldBuild := old .(* api.Build )
97
- phase := newBuild .Status .Phase
98
+
99
+ // ignore phase updates unless the caller is updating the build to
100
+ // a completed phase.
101
+ phase := oldBuild .Status .Phase
102
+ if buildutil .IsBuildComplete (newBuild ) {
103
+ phase = newBuild .Status .Phase
104
+ }
98
105
revision := newBuild .Spec .Revision
99
106
message := newBuild .Status .Message
100
107
reason := newBuild .Status .Reason
You can’t perform that action at this time.
0 commit comments