.get(); int originalHash = features.hashCode(); features.setChaos(chaos != null ? chaos : features.isChaos()); features.setJobs(jobs != null ? jobs : features.isJobs()); features.setPipelineTemplates(pipelineTemplates != null ? pipelineTemplates : features.getPipelineTemplates()); features.setArtifacts(artifacts != null ? artifacts : features.getArtifacts()); features.setMineCanary(mineCanary != null ? mineCanary : features.getMineCanary()); features.setInfrastructureStages(infrastructureStages != null ? infrastructureStages : features.getInfrastructureStages()); features.setAppengineContainerImageUrlDeployments(appengineContainerImageUrlDeployments != null ? appengineContainerImageUrlDeployments : features.getAppengineContainerImageUrlDeployments()); features.setTravis(travis != null ? travis : features.getTravis()); features.setWercker(wercker != null ? wercker : features.getWercker()); if (originalHash == features.hashCode()) { AnsiUi.failure("No changes supplied."); return;
public Features getFeatures(String deploymentName) { NodeFilter filter = new NodeFilter().setDeployment(deploymentName).setFeatures(); List<Features> matching = lookupService.getMatchingNodesOfType(filter, Features.class); switch (matching.size()) { case 0: Features features = new Features(); setFeatures(deploymentName, features); return features; case 1: return matching.get(0); default: throw new RuntimeException("It shouldn't be possible to have multiple features nodes. This is a bug."); } }
bindings.put("features.auth", Boolean.toString(features.isAuth(deploymentConfiguration))); bindings.put("features.chaos", Boolean.toString(features.isChaos())); bindings.put("features.jobs", Boolean.toString(features.isJobs())); bindings.put("features.fiat", Boolean.toString(deploymentConfiguration.getSecurity().getAuthz().isEnabled())); bindings.put("features.pipelineTemplates", Boolean.toString(features.getPipelineTemplates() != null ? features.getPipelineTemplates() : false)); bindings.put("features.artifacts", Boolean.toString(features.getArtifacts() != null ? features.getArtifacts() : false)); bindings.put("features.mineCanary", Boolean.toString(features.getMineCanary() != null ? features.getMineCanary() : false)); bindings.put("features.appengineContainerImageUrlDeployments", Boolean.toString(features.getAppengineContainerImageUrlDeployments() != null ? features.getAppengineContainerImageUrlDeployments() : false)); bindings.put("features.travis", Boolean.toString(features.getTravis() != null ? features.getTravis() : false)); bindings.put("features.wercker", Boolean.toString(features.getWercker() != null ? features.getWercker() : false));
@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); } }
bindings.put("features.auth", Boolean.toString(features.isAuth(deploymentConfiguration))); bindings.put("features.chaos", Boolean.toString(features.isChaos())); bindings.put("features.jobs", Boolean.toString(features.isJobs())); bindings.put("features.fiat", Boolean.toString(deploymentConfiguration.getSecurity().getAuthz().isEnabled())); bindings.put("features.pipelineTemplates", Boolean.toString(features.getPipelineTemplates() != null ? features.getPipelineTemplates() : false)); bindings.put("features.artifacts", Boolean.toString(features.getArtifacts() != null ? features.getArtifacts() : false)); bindings.put("features.mineCanary", Boolean.toString(features.getMineCanary() != null ? features.getMineCanary() : false)); bindings.put("features.appengineContainerImageUrlDeployments", Boolean.toString(features.getAppengineContainerImageUrlDeployments() != null ? features.getAppengineContainerImageUrlDeployments() : false)); bindings.put("features.travis", Boolean.toString(features.getTravis() != null ? features.getTravis() : false)); bindings.put("features.wercker", Boolean.toString(features.getWercker() != null ? features.getWercker() : false));
@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); }
.get(); int originalHash = features.hashCode(); features.setChaos(chaos != null ? chaos : features.isChaos()); features.setJobs(jobs != null ? jobs : features.isJobs()); features.setPipelineTemplates(pipelineTemplates != null ? pipelineTemplates : features.getPipelineTemplates()); features.setArtifacts(artifacts != null ? artifacts : features.getArtifacts()); features.setMineCanary(mineCanary != null ? mineCanary : features.getMineCanary()); features.setInfrastructureStages(infrastructureStages != null ? infrastructureStages : features.getInfrastructureStages()); features.setAppengineContainerImageUrlDeployments(appengineContainerImageUrlDeployments != null ? appengineContainerImageUrlDeployments : features.getAppengineContainerImageUrlDeployments()); features.setTravis(travis != null ? travis : features.getTravis()); features.setWercker(wercker != null ? wercker : features.getWercker()); if (originalHash == features.hashCode()) { AnsiUi.failure("No changes supplied."); return;
public Features getFeatures(String deploymentName) { NodeFilter filter = new NodeFilter().setDeployment(deploymentName).setFeatures(); List<Features> matching = lookupService.getMatchingNodesOfType(filter, Features.class); switch (matching.size()) { case 0: Features features = new Features(); setFeatures(deploymentName, features); return features; case 1: return matching.get(0); default: throw new RuntimeException("It shouldn't be possible to have multiple features nodes. This is a bug."); } }