add missing check to not publish to SIG if config.SharedGalleryDestination.SigDestinationGalleryName is null

This commit is contained in:
Amrita Dutta 2019-06-17 19:13:03 +00:00
parent 6504d3ae5c
commit 540c904fd4
1 changed files with 4 additions and 0 deletions

View File

@ -98,6 +98,10 @@ func (s *StepPublishToSharedImageGallery) publishToSig(ctx context.Context, miSi
}
func (s *StepPublishToSharedImageGallery) Run(ctx context.Context, stateBag multistep.StateBag) multistep.StepAction {
if !s.toSIG() {
return multistep.ActionContinue
}
s.say("Publishing to Shared Image Gallery ...")
var miSigPubSubscription = stateBag.Get(constants.ArmManagedImageSigPublishSubscription).(string)