Skip to content

Commit

Permalink
fix(triggers): verify a trigger is a Jenkins trigger before trying to…
Browse files Browse the repository at this point in the history
… pull buildInfo
  • Loading branch information
robfletcher committed Feb 7, 2018
1 parent 61932bf commit c4cb854
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import com.netflix.spinnaker.orca.mine.MineService
import com.netflix.spinnaker.orca.pipeline.StageDefinitionBuilder
import com.netflix.spinnaker.orca.pipeline.TaskNode
import com.netflix.spinnaker.orca.pipeline.model.Execution
import com.netflix.spinnaker.orca.pipeline.model.JenkinsTrigger
import com.netflix.spinnaker.orca.pipeline.model.Stage
import groovy.transform.CompileDynamic
import groovy.transform.CompileStatic
Expand Down Expand Up @@ -185,7 +186,7 @@ class DeployCanaryStage extends ParallelDeployStage implements CloudProviderAwar
}

cluster.amiName = ami?.ami
cluster.buildUrl = createBuildUrl(ami) ?: stage.execution.trigger?.buildInfo?.url
cluster.buildUrl = createBuildUrl(ami) ?: (stage.execution.trigger instanceof JenkinsTrigger ? stage.execution.trigger.buildInfo?.url : null)
}

def accountDetails = mortService.getAccountDetails(cluster.account)
Expand Down

0 comments on commit c4cb854

Please sign in to comment.