Skip to content

Commit

Permalink
feat(artifacts): add feature flag to turn on artifactsRewrite (#1398)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jammy Louie authored Aug 21, 2019
1 parent 641c4bd commit 345c0ac
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -5661,6 +5661,7 @@ hal config features edit [parameters]
#### Parameters
* `--appengine-container-image-url-deployments`: Enable appengine deployments using a container image URL from gcr.io.
* `--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.
* `--gremlin`: Enable Gremlin fault-injection support.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ public class EditFeaturesCommand extends AbstractConfigCommand {
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 @@ -119,6 +126,8 @@ protected void executeThis() {
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.setInfrastructureStages(
infrastructureStages != null ? infrastructureStages : features.getInfrastructureStages());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ public NodeIterator getChildren() {
"Artifacts are not configurable prior to this release. Will be stable at a later release.")
private Boolean artifacts;

@ValidForSpinnakerVersion(
lowerBound = "1.15.0",
tooLowMessage =
"Artifacts rewrite is a rewrite of the artifacts ui. Artifacts are not configurable prior to this release. Will be stable at a later release.")
private Boolean artifactsRewrite;

@ValidForSpinnakerVersion(
lowerBound = "1.5.0",
tooLowMessage =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ protected void setProfile(
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

0 comments on commit 345c0ac

Please sign in to comment.