diff --git a/docs/commands.md b/docs/commands.md index 6c62c46dbd..85fbd2b83c 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -6340,6 +6340,7 @@ hal config features edit [parameters] * `--deployment`: If supplied, use this Halyard deployment. This will _not_ create a new deployment. * `--gremlin`: Enable Gremlin fault-injection support. * `--infrastructure-stages`: Enable infrastructure stages. Allows for creating Load Balancers as part of pipelines. + * `--managed-pipeline-templates-v2-ui`: Enable managed pipeline templates v2 UI support. * `--mine-canary`: Enable canary support. For this to work, you'll need a canary judge configured. Currently, Halyard does not configure canary judge for you. * `--no-validate`: (*Default*: `false`) Skip validation. * `--pipeline-templates`: Enable pipeline template support. Read more at [https://github.com/spinnaker/dcd-spec](https://github.com/spinnaker/dcd-spec). diff --git a/halyard-cli/src/main/java/com/netflix/spinnaker/halyard/cli/command/v1/config/EditFeaturesCommand.java b/halyard-cli/src/main/java/com/netflix/spinnaker/halyard/cli/command/v1/config/EditFeaturesCommand.java index bd6e707031..b496da5d96 100644 --- a/halyard-cli/src/main/java/com/netflix/spinnaker/halyard/cli/command/v1/config/EditFeaturesCommand.java +++ b/halyard-cli/src/main/java/com/netflix/spinnaker/halyard/cli/command/v1/config/EditFeaturesCommand.java @@ -90,6 +90,12 @@ public class EditFeaturesCommand extends AbstractConfigCommand { @Parameter(names = "--wercker", description = "Enable the Wercker CI stage.", arity = 1) private Boolean wercker = null; + @Parameter( + names = "--managed-pipeline-templates-v2-ui", + description = "Enable managed pipeline templates v2 UI support.", + arity = 1) + private Boolean managedPipelineTemplatesV2UI = null; + @Parameter( names = "--gremlin", description = "Enable Gremlin fault-injection support.", @@ -123,6 +129,10 @@ protected void executeThis() { : features.getAppengineContainerImageUrlDeployments()); features.setTravis(travis != null ? travis : features.getTravis()); features.setWercker(wercker != null ? wercker : features.getWercker()); + features.setManagedPipelineTemplatesV2UI( + managedPipelineTemplatesV2UI != null + ? managedPipelineTemplatesV2UI + : features.getManagedPipelineTemplatesV2UI()); features.setGremlin(gremlin != null ? gremlin : features.getGremlin()); if (originalHash == features.hashCode()) { diff --git a/halyard-config/src/main/java/com/netflix/spinnaker/halyard/config/model/v1/node/Features.java b/halyard-config/src/main/java/com/netflix/spinnaker/halyard/config/model/v1/node/Features.java index 7858dcb01d..8b4a4e17f7 100644 --- a/halyard-config/src/main/java/com/netflix/spinnaker/halyard/config/model/v1/node/Features.java +++ b/halyard-config/src/main/java/com/netflix/spinnaker/halyard/config/model/v1/node/Features.java @@ -22,7 +22,7 @@ @Data @EqualsAndHashCode(callSuper = false) -@JsonIgnoreProperties({"jobs", "managedPipelineTemplatesV2UI"}) +@JsonIgnoreProperties({"jobs"}) public class Features extends Node { @Override public String getNodeName() { @@ -87,6 +87,11 @@ public NodeIterator getChildren() { tooLowMessage = "Wercker stage is not available prior to this release.") private Boolean wercker; + @ValidForSpinnakerVersion( + lowerBound = "1.13.0", + tooLowMessage = "Managed Pipeline Templates v2 UI is not available prior to this release.") + private Boolean managedPipelineTemplatesV2UI; + @ValidForSpinnakerVersion( lowerBound = "1.13.0", tooLowMessage = "Gremlin is not available prior to this release.") diff --git a/halyard-deploy/src/main/java/com/netflix/spinnaker/halyard/deploy/spinnaker/v1/profile/deck/DeckProfileFactory.java b/halyard-deploy/src/main/java/com/netflix/spinnaker/halyard/deploy/spinnaker/v1/profile/deck/DeckProfileFactory.java index 30cd7354fc..8de1385684 100644 --- a/halyard-deploy/src/main/java/com/netflix/spinnaker/halyard/deploy/spinnaker/v1/profile/deck/DeckProfileFactory.java +++ b/halyard-deploy/src/main/java/com/netflix/spinnaker/halyard/deploy/spinnaker/v1/profile/deck/DeckProfileFactory.java @@ -139,6 +139,12 @@ protected void setProfile( bindings.put( "features.wercker", Boolean.toString(features.getWercker() != null ? features.getWercker() : false)); + bindings.put( + "features.managedPipelineTemplatesV2UI", + Boolean.toString( + features.getManagedPipelineTemplatesV2UI() != null + ? features.getManagedPipelineTemplatesV2UI() + : false)); bindings.put( "features.gremlin", Boolean.toString(features.getGremlin() != null ? features.getGremlin() : false));