Skip to content

Add Rollback option to resource group level resources #7134

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

Merged
merged 5 commits into from
Sep 13, 2018

Conversation

chidmdxx
Copy link
Member

@chidmdxx chidmdxx commented Sep 5, 2018

Description

Checklist

@maddieclayton
Copy link
Contributor

Please either link your review or fill out a new design review from here: https://github.com/Azure/azure-powershell-cmdlet-review-pr

@chidmdxx
Copy link
Member Author

chidmdxx commented Sep 6, 2018

@cormacpayne
Copy link
Member

@chidmdxx Hey Rachid, for some reason, GitHub isn't letting me pull in the latest from the preview branch into your branch, so would you mind doing so to resolve the build error that you're currently seeing?

@chidmdxx
Copy link
Member Author

@cormacpayne rebased the branch with the latest from upstream

Accept pipeline input: False
Accept wildcard characters: False
```

### -TemplateFile
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove any change to AzureRM.psm1 below

@@ -45,6 +46,12 @@ public class NewAzureResourceGroupDeploymentCmdlet : ResourceWithParameterCmdlet
[ValidateSet("RequestContent", "ResponseContent", "All", "None", IgnoreCase = true)]
public string DeploymentDebugLogLevel { get; set; }

[Parameter(Mandatory = false, HelpMessage = "Rollback to the last successful deployment in the resource group, should not be present if -RollBackDeploymentName is used.")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these need to be in separate parameter sets - any parameter that is not in any parameter set is in all parameter sets. I can put a PR into your branch to show how this is done.

@@ -66,6 +73,11 @@ public override void ExecuteCmdlet()
ResourceGroupName,
() =>
{
if (RollbackToLastDeployment && !string.IsNullOrEmpty(RollBackDeploymentName))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead, we shoudl do this with parameter sets,

@@ -35,19 +37,37 @@ public class TestAzureResourceGroupDeploymentCmdlet : ResourceWithParameterCmdle
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The deployment mode.")]
public DeploymentMode Mode { get; set; }

[Parameter(Mandatory = false, HelpMessage = "Rollback to the last successful deployment in the resource group, should not be present if -RollBackDeploymentName is used.")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment

@markcowl markcowl removed their assignment Sep 13, 2018
@markcowl markcowl changed the base branch from preview to release-2018-09-17 September 13, 2018 21:30
@markcowl markcowl merged commit 57925fc into Azure:release-2018-09-17 Sep 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants