Skip to content

Commit

Permalink
fix(flags): Revert "config(core): Remove MPTV2 UI feature flag (#1510)…
Browse files Browse the repository at this point in the history
…" (#1530) (#1531)

This reverts commit 759e988.

Co-authored-by: Louis Jimenez <louisjimenez@google.com>
  • Loading branch information
spinnakerbot and louisjimenez committed Feb 7, 2020
1 parent e5085ba commit 13b8966
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -6153,6 +6153,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).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down Expand Up @@ -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()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

@Data
@EqualsAndHashCode(callSuper = false)
@JsonIgnoreProperties({"jobs", "managedPipelineTemplatesV2UI"})
@JsonIgnoreProperties({"jobs"})
public class Features extends Node {
@Override
public String getNodeName() {
Expand Down Expand Up @@ -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.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,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));
Expand Down

0 comments on commit 13b8966

Please sign in to comment.