Skip to content

Commit

Permalink
Merge pull request #11989 from bparees/fix_image_test
Browse files Browse the repository at this point in the history
Merged by openshift-bot
  • Loading branch information
OpenShift Bot authored Nov 23, 2016
2 parents 9996b77 + 4b1ca98 commit 00ec8d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkg/build/generator/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ func (g *BuildGenerator) generateBuildFromConfig(ctx kapi.Context, bc *buildapi.
var sourceImageSpec string
// if the imagesource matches the strategy from, and we have a trigger for the strategy from,
// use the imageid from the trigger rather than resolving it.
if strategyFrom := buildutil.GetInputReference(bc.Spec.Strategy); reflect.DeepEqual(sourceImage.From, *strategyFrom) &&
if strategyFrom := buildutil.GetInputReference(bc.Spec.Strategy); strategyFrom != nil && reflect.DeepEqual(sourceImage.From, *strategyFrom) &&
strategyImageChangeTrigger != nil {
sourceImageSpec = strategyImageChangeTrigger.LastTriggeredImageID
} else {
Expand Down
7 changes: 1 addition & 6 deletions test/extended/testdata/test-imagesource-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,7 @@ items:
- destinationDir: injected/dir
sourcePath: /usr/lib/jenkins/jenkins.war
strategy:
sourceStrategy:
forcePull: true
from:
kind: ImageStreamTag
name: ruby:latest
namespace: openshift
dockerStrategy: {}
- apiVersion: v1
kind: ImageStream
metadata:
Expand Down

0 comments on commit 00ec8d2

Please sign in to comment.