|
...
|
...
|
@@ -136,9 +136,12 @@ func canTrigger(config, decoded *deployapi.DeploymentConfig) (bool, []deployapi.
|
|
136
|
136
|
|
|
137
|
137
|
// We need stronger checks in order to validate that this template
|
|
138
|
138
|
// change is an image change. Look at the deserialized config's
|
|
139
|
|
- // triggers and compare with the present trigger.
|
|
140
|
|
- if !triggeredByDifferentImage(*t.ImageChangeParams, *decoded) {
|
|
141
|
|
- continue
|
|
|
139
|
+ // triggers and compare with the present trigger. Initial deployments
|
|
|
140
|
+ // should always trigger since there is no previous config to compare to.
|
|
|
141
|
+ if config.Status.LatestVersion > 0 {
|
|
|
142
|
+ if !triggeredByDifferentImage(*t.ImageChangeParams, *decoded) {
|
|
|
143
|
+ continue
|
|
|
144
|
+ }
|
|
142
|
145
|
}
|
|
143
|
146
|
|
|
144
|
147
|
canTriggerByImageChange = true
|