bindings.put("aws.default.account", awsProvider.getPrimaryAccount()); if (awsProvider.getPrimaryAccount() != null) { AwsAccount awsAccount = (AwsAccount) accountService.getProviderAccount(deploymentConfiguration.getName(), "aws", awsProvider.getPrimaryAccount()); List<AwsProvider.AwsRegion> regionList = awsAccount.getRegions(); if (!regionList.isEmpty() && regionList.get(0) != null) {
bindings.put("aws.default.account", awsProvider.getPrimaryAccount()); if (awsProvider.getPrimaryAccount() != null) { AwsAccount awsAccount = (AwsAccount) accountService.getProviderAccount(deploymentConfiguration.getName(), "aws", awsProvider.getPrimaryAccount()); AwsProvider.AwsRegion firstRegion = awsAccount.getRegions().get(0); if (firstRegion != null) {
@Override 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()); profile.appendContents("default.securityGroups: "); profile.appendContents("default.vpc.securityGroups: "); } String pipelineTemplates = Boolean.toString(deploymentConfiguration.getFeatures().getPipelineTemplates() != null ? deploymentConfiguration.getFeatures().getPipelineTemplates() : false); profile.appendContents("pipelineTemplates.enabled: " + pipelineTemplates); // For backward compatibility profile.appendContents("pipelineTemplate.enabled: " + pipelineTemplates); } }
@Override 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()); profile.appendContents("default.securityGroups: "); profile.appendContents("default.vpc.securityGroups: "); } Webhook webhook = deploymentConfiguration.getWebhook(); List<String> files = backupRequiredFiles(webhook, deploymentConfiguration.getName()); profile.setRequiredFiles(files); profile.appendContents(yamlToString(new WebhookWrapper(webhook))); String pipelineTemplates = Boolean.toString(deploymentConfiguration.getFeatures().getPipelineTemplates() != null ? deploymentConfiguration.getFeatures().getPipelineTemplates() : false); profile.appendContents("pipelineTemplates.enabled: " + pipelineTemplates); // For backward compatibility profile.appendContents("pipelineTemplate.enabled: " + pipelineTemplates); }