Skip to content

Commit

Permalink
fix(deploy): Set default bake account in orca (#530)
Browse files Browse the repository at this point in the history
  • Loading branch information
lwander authored and jtk54 committed Jun 5, 2017
1 parent d325bad commit d9c2c25
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package com.netflix.spinnaker.halyard.deploy.spinnaker.v1.profile;

import com.netflix.spinnaker.halyard.config.model.v1.node.DeploymentConfiguration;
import com.netflix.spinnaker.halyard.config.model.v1.providers.aws.AwsProvider;
import com.netflix.spinnaker.halyard.deploy.spinnaker.v1.SpinnakerArtifact;
import com.netflix.spinnaker.halyard.deploy.spinnaker.v1.SpinnakerRuntimeSettings;
import org.springframework.stereotype.Component;
Expand All @@ -32,5 +33,10 @@ public SpinnakerArtifact getArtifact() {
protected void setProfile(Profile profile, DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) {
super.setProfile(profile, deploymentConfiguration, endpoints);
profile.appendContents(profile.getBaseContents());

AwsProvider awsProvider = deploymentConfiguration.getProviders().getAws();
if (awsProvider.isEnabled()) {
profile.appendContents("default.bake.account: " + awsProvider.getPrimaryAccount());
}
}
}

0 comments on commit d9c2c25

Please sign in to comment.