Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): replace artifacts commands #1645

Merged
merged 1 commit into from
Apr 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -6354,6 +6354,8 @@ hal config features edit [parameters]
```

#### Parameters
* `--artifacts`: Enable artifact support. Read more at [https://spinnaker.io/reference/artifacts/](https://spinnaker.io/reference/artifacts/)
* `--artifacts-rewrite`: Enable new artifact support. Read more at [https://www.spinnaker.io/reference/artifacts-with-artifactsrewrite/](https://www.spinnaker.io/reference/artifacts-with-artifactsrewrite/)
* `--chaos`: Enable Chaos Monkey support. For this to work, you'll need a running Chaos Monkey deployment. Currently, Halyard doesn't configure Chaos Monkey for you; read more instructions here [https://github.com/Netflix/chaosmonkey/wiki](https://github.com/Netflix/chaosmonkey/wiki).
* `--deployment`: If supplied, use this Halyard deployment. This will _not_ create a new deployment.
* `--managed-pipeline-templates-v2-ui`: Enable managed pipeline templates v2 UI support.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,20 @@ public class EditFeaturesCommand extends AbstractConfigCommand {
arity = 1)
private Boolean pipelineTemplates = null;

@Parameter(
names = "--artifacts",
description =
"Enable artifact support. Read more at https://spinnaker.io/reference/artifacts/",
arity = 1)
private Boolean artifacts = null;

@Parameter(
names = "--artifacts-rewrite",
description =
"Enable new artifact support. Read more at https://www.spinnaker.io/reference/artifacts-with-artifactsrewrite/",
arity = 1)
private Boolean artifactsRewrite = null;

@Parameter(
names = "--mine-canary",
description =
Expand Down Expand Up @@ -78,6 +92,9 @@ protected void executeThis() {
features.setChaos(chaos != null ? chaos : features.isChaos());
features.setPipelineTemplates(
pipelineTemplates != null ? pipelineTemplates : features.getPipelineTemplates());
features.setArtifacts(artifacts != null ? artifacts : features.getArtifacts());
features.setArtifactsRewrite(
artifactsRewrite != null ? artifactsRewrite : features.getArtifactsRewrite());
features.setMineCanary(mineCanary != null ? mineCanary : features.getMineCanary());
features.setManagedPipelineTemplatesV2UI(
managedPipelineTemplatesV2UI != null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ protected void setProfile(
"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.artifactsRewrite",
Boolean.toString(
features.getArtifactsRewrite() != null ? features.getArtifactsRewrite() : false));
bindings.put(
"features.mineCanary",
Boolean.toString(features.getMineCanary() != null ? features.getMineCanary() : false));
Expand Down