Skip to content

Commit 21161d1

Browse files
authored
Merge pull request Azure#5592 from panchagnula/sisirap-mergedPreviewWithWebsitesPreview
Pull in the latest from preview into websites-preview
2 parents 84e226e + 132cb06 commit 21161d1

File tree

825 files changed

+538294
-550778
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

825 files changed

+538294
-550778
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,4 +212,8 @@ FakesAssemblies/
212212
*.GhostDoc.xml
213213
pingme.txt
214214
groupMapping*.json
215-
.vscode/
215+
.vscode/
216+
/tools/AutomationTestFramework/RunBooks
217+
/tools/AutomationTestFramework/TestHelpers/TestHelpers.zip
218+
Results
219+
Package

ChangeLog.md

Lines changed: 241 additions & 2 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,10 @@ If you use both mechanisms on the same subscription, Microsoft Azure Active Dire
132132

133133
```powershell
134134
# Interactive login - you will get a dialog box asking for your Azure credentials
135-
Add-AzureRmAccount
135+
Connect-AzureRmAccount
136136
137137
# Non-interactive login - use service principals
138-
Add-AzureRmAccount -ServicePrincipal -ApplicationId "http://my-app" -Credential $pscredential -TenantId $tenantid
138+
Connect-AzureRmAccount -ServicePrincipal -ApplicationId "http://my-app" -Credential $pscredential -TenantId $tenantid
139139
140140
# Use the cmdlets to manage your services/applications
141141
New-AzureRmResourceGroup -Name myresourceGroup -Location "West US"
@@ -144,7 +144,7 @@ New-AzureRmResourceGroup -Name myresourceGroup -Location "West US"
144144
### Microsoft Azure China
145145

146146
```powershell
147-
Add-AzureRmAccount -EnvironmentName AzureChinaCloud
147+
Connect-AzureRmAccount -EnvironmentName AzureChinaCloud
148148
149149
# Use the cmdlets to manage your services/applications
150150
New-AzureRmResourceGroup -Name myresourceGroup -Location "China East"
@@ -153,7 +153,7 @@ New-AzureRmResourceGroup -Name myresourceGroup -Location "China East"
153153
### Microsoft Azure US Government
154154

155155
```powershell
156-
Add-AzureRmAccount -EnvironmentName AzureUSGovernment
156+
Connect-AzureRmAccount -EnvironmentName AzureUSGovernment
157157
158158
# Use the cmdlets to manage your services/applications
159159
New-AzureRmResourceGroup -Name myresourceGroup -Location "US Gov Virginia"
@@ -162,7 +162,7 @@ New-AzureRmResourceGroup -Name myresourceGroup -Location "US Gov Virginia"
162162
### Microsoft Azure Germany
163163

164164
```powershell
165-
Add-AzureRmAccount -EnvironmentName AzureGermanCloud
165+
Connect-AzureRmAccount -EnvironmentName AzureGermanCloud
166166
167167
# Use the cmdlets to manage your services/applications
168168
New-AzureRmResourceGroup -Name myresourceGroup -Location "Germany Central"

TestMappings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,4 @@
184184
"src/ResourceManager/ApplicationInsights/": [
185185
".\\src\\ResourceManager\\ApplicationInsights\\Commands.ApplicationInsights.Test\\bin\\Debug\\Microsoft.Azure.Commands.ApplicationInsights.Test.dll"
186186
]
187-
}
187+
}

build.proj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,11 @@
509509
<Message Importance="high" Text="Running Dependency Analysis..." />
510510
<Exec Command="$(MSBuildProjectDirectory)\src\Package\StaticAnalysis.exe $(MSBuildProjectDirectory)\src\Package\$(Configuration) $(MSBuildProjectDirectory)\src\Package true $(SkipHelp)" Condition="'$(Latest)' == 'true'"/>
511511
<Exec Command="$(MSBuildProjectDirectory)\src\Package\StaticAnalysis.exe $(MSBuildProjectDirectory)\src\Stack\$(Configuration) $(MSBuildProjectDirectory)\src\Stack" Condition="'$(Stack)' == 'true'" ContinueOnError="True"/>
512+
<OnError ExecuteTargets="StaticAnalysisErrorMessage"/>
513+
</Target>
514+
515+
<Target Name="StaticAnalysisErrorMessage">
516+
<Error Text="StaticAnalysis has failed. Please follow the instructions on this doc: https://github.com/Azure/azure-powershell/blob/preview/documentation/Debugging-StaticAnalysis-Errors.md"/>
512517
</Target>
513518

514519
<!-- Publish all packages -->
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Debugging StaticAnalysis Errors
2+
3+
Our StaticAnalysis tools help us ensure our modules follow PowerShell guidelines and prevent breaking changes from occurring outside of breaking change releases.
4+
5+
- [How to know if you have a StaticAnalysis Error](#how-to-know-if-you-have-a-staticanalysis-error)
6+
- [Where to find StaticAnalysis reports](#where-to-find-staticanalysis-reports)
7+
- [Types of StaticAnalysis Errors](#types-of-staticanalysis-errors)
8+
- [Breaking Changes](#breaking-changes)
9+
- [Signature Issues](#signature-issues)
10+
- [Help Issues](#help-issues)
11+
12+
## How to know if you have a StaticAnalysis Error
13+
If your build is failing, click on the Jenkins job inside the PR (marked as "Default" within checks). Then check the Console Output within the Jenkins job. If you have this error, then you have failed StaticAnalysis:
14+
```
15+
d:\workspace\powershell\build.proj(511,5): error MSB3073: The command "d:\workspace\powershell\src\Package\StaticAnalysis.exe d:\workspace\powershell\src\Package\Debug d:\workspace\powershell\src\Package true false" exited with code 255.
16+
```
17+
18+
## Where to find StaticAnalysis reports
19+
20+
The StaticAnalysis reports could show up in two different places in the CI build:
21+
- On the status page in Jenkins, under the Build Artifacts: the relevant files are BreakingChangeIssues.csv, SignatureIssues.csv, and/or HelpIssues.csv.
22+
- On the status page in Jenkins, click Build Artifacts then navigate to src/Package. You will see BreakingChangeIssues.csv, SignatureIssues.csv, and/or HelpIssues.csv.
23+
24+
Locally, the StaticAnalysis report will show up under Azure-PowerShell/src/Package. You will see BreakingChangeIssues.csv, SignatureIssues.csv, and/or HelpIssues.csv. You can generate these files by running
25+
```
26+
msbuild build.proj
27+
```
28+
29+
## Types of StaticAnalysis Errors
30+
The three most common Static Analysis errors are breaking changes, signature issues, and help issues. To figure out which type of error is causing the build failure, open each of the relevant .csv files (if the .csv file does not exist, there is no violation detected). Any issue marked with severity 0 or 1 must be resolved in order for the build to pass.
31+
32+
### Breaking Changes
33+
If you make a change that could cause a breaking change, it will be listed in BreakingChangeIssues.csv. Please look at each of these errors, and if they do indeed introduce a breaking change in a non-breaking change release, please revert the change that caused this violation. Sometimes the error listed in the .csv file can be a false positive (for example, if you change a parameter attribute to span all parameter sets rather than individual parameter sets). Please read the error thoroughly and examine the relevant code before deciding that an error is a false positive, and contact the Azure PowerShell team if you have questions. If you are releasing a preview module, are releasing during a breaking change release, or have determined that the error is a false positive, please follow these instructions:
34+
- Copy each of the errors you would like to suppress directly from the BreakingChangeIssues.csv file output in the Jenkins build
35+
- Paste each of these error into the [BreakingChangeIssues.csv file](https://github.com/Azure/azure-powershell/blob/preview/tools/StaticAnalysis/Exceptions/BreakingChangeIssues.csv) in our GitHub repo. Note that you will need to edit this file in a text editor rather than Excel to prevent parsing errors.
36+
- Push the changes to the .csv file and ensure the errors no longer show up in the BreakingChangeIssues.csv file output from the Jenkins build.
37+
38+
We take breaking changes very seriously, so please be mindful about the violations that you suppress in our repo.
39+
40+
### Signature Issues
41+
Signature issues occur when your cmdlets do not follow PowerShell standards. Please check [this page](https://github.com/Azure/azure-powershell/wiki/PowerShell-Cmdlet-Design-Guidelines) to ensure you are following PowerShell guidelines. Issues with severity 0 or 1 must be addressed, while issues with severity 2 are advisory. If you have an issue with severity 0 or 1 that has been approved by the Azure PowerShell team, you can suppress them following these steps:
42+
- Copy each of the errors you would like to suppress directly from the SignatureIssues.csv file output in the Jenkins build
43+
- Paste each of these error into the [SignatureIssues.csv file](https://github.com/Azure/azure-powershell/blob/preview/tools/StaticAnalysis/Exceptions/SignatureIssues.csv) in our GitHub repo. Note that you will need to edit this file in a text editor rather than Excel to prevent parsing errors.
44+
- Push the changes to the .csv file and ensure the errors no longer show up in the SignatureIssues.csv file output from the Jenkins build.
45+
46+
### Help Issues
47+
Most help issues that cause StaticAnalysis to fail occur when help has not been added for a particular cmdlet. If you have not generated help for your new cmdlets, please follow the instructions [here](https://github.com/Azure/azure-powershell/blob/preview/documentation/help-generation.md). If this is not the issue, follow the steps listed under "Remediation" for each violation listed in HelpIssues.csv.

documentation/Using-Azure-TestFramework.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ To use this option, set the following environment variable before starting Visua
144144

145145
## Record or Playback Tests
146146

147-
1. Run the test and make sure that you got a generated .json file that matches the test name in the bin folder under *SessionRecords folder
147+
1. [Run the test](https://github.com/Azure/azure-powershell/wiki/Azure-Powershell-Developer-Guide#running-tests) and make sure that you got a generated .json file that matches the test name in the bin folder under *SessionRecords folder
148148
2. Copy SessionRecords folder inside the test project and add all *.json files in Visual Studio setting "Copy to Output Directory" property to "Copy if newer"
149149
3. To assure that the records work fine, delete the connection string (default mode is Playback mode) OR change HttpRecorderMode within the connection string to "Playback"
150150

documentation/azure-powershell-modules.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Below is a table of modules containing ARM cmdlets found in the [`AzureRM`](http
1717
| ------------------------------------- | --------------------------------------- | ----------------------- |
1818
| Analysis Services | `AzureRM.AnalysisServices` | [![Analysis Services](https://img.shields.io/powershellgallery/v/AzureRM.AnalysisServices.svg?style=flat-square&label=AzureRM.AnalysisServices)](https://www.powershellgallery.com/packages/AzureRM.AnalysisServices/) |
1919
| API Management | `AzureRM.ApiManagement` | [![API Management](https://img.shields.io/powershellgallery/v/AzureRM.ApiManagement.svg?style=flat-square&label=AzureRM.ApiManagement)](https://www.powershellgallery.com/packages/AzureRM.ApiManagement/) |
20+
| Application Insights | `AzureRM.ApplicationInsights` | [![Application Insights](https://img.shields.io/powershellgallery/v/AzureRM.ApplicationInsights.svg?style=flat-square&label=AzureRM.ApplicationInsights)](https://www.powershellgallery.com/packages/AzureRM.ApplicationInsights/) |
2021
| Automation | `AzureRM.Automation` | [![Automation](https://img.shields.io/powershellgallery/v/AzureRM.Automation.svg?style=flat-square&label=AzureRM.Automation)](https://www.powershellgallery.com/packages/AzureRM.Automation/) |
2122
| Backup | `AzureRM.Backup` | [![Backup](https://img.shields.io/powershellgallery/v/AzureRM.Backup.svg?style=flat-square&label=AzureRM.Backup)](https://www.powershellgallery.com/packages/AzureRM.Backup/)
2223
| Batch | `AzureRM.Batch` | [![Batch](https://img.shields.io/powershellgallery/v/AzureRM.Batch.svg?style=flat-square&label=AzureRM.Batch)](https://www.powershellgallery.com/packages/AzureRM.Batch/) |
@@ -31,6 +32,7 @@ Below is a table of modules containing ARM cmdlets found in the [`AzureRM`](http
3132
| Data Factory V2 | `AzureRM.DataFactoryV2` | [![Data Factory V2](https://img.shields.io/powershellgallery/v/AzureRM.DataFactoryV2.svg?style=flat-square&label=AzureRM.DataFactoryV2)](https://www.powershellgallery.com/packages/AzureRM.DataFactoryV2/) |
3233
| Data Lake Analytics | `AzureRM.DataLakeAnalytics` | [![Data Lake Analytics](https://img.shields.io/powershellgallery/v/AzureRM.DataLakeAnalytics.svg?style=flat-square&label=AzureRM.DataLakeAnalytics)](https://www.powershellgallery.com/packages/AzureRM.DataLakeAnalytics/) |
3334
| Data Lake Store | `AzureRM.DataLakeStore` | [![Data Lake Store](https://img.shields.io/powershellgallery/v/AzureRM.DataLakeStore.svg?style=flat-square&label=AzureRM.DataLakeStore)](https://www.powershellgallery.com/packages/AzureRM.DataLakeStore/) |
35+
| Data Migration | `AzureRM.DataMigration` | [![Data Migration](https://img.shields.io/powershellgallery/v/AzureRM.DataMigration.svg?style=flat-square&label=AzureRM.DataMigration)](https://www.powershellgallery.com/packages/AzureRM.DataMigration/) |
3436
| DevTest Labs | `AzureRM.DevTestLabs` | [![DevTest Labs](https://img.shields.io/powershellgallery/v/AzureRM.DevTestLabs.svg?style=flat-square&label=AzureRM.DevTestLabs)](https://www.powershellgallery.com/packages/AzureRM.DevTestLabs/) |
3537
| DNS | `AzureRM.Dns` | [![DNS](https://img.shields.io/powershellgallery/v/AzureRM.Dns.svg?style=flat-square&label=AzureRM.Dns)](https://www.powershellgallery.com/packages/AzureRM.Dns/) |
3638
| Event Grid | `AzureRM.EventGrid` | [![Event Grid](https://img.shields.io/powershellgallery/v/AzureRM.EventGrid.svg?style=flat-square&label=AzureRM.EventGrid)](https://www.powershellgallery.com/packages/AzureRM.EventGrid/) |
@@ -54,6 +56,7 @@ Below is a table of modules containing ARM cmdlets found in the [`AzureRM`](http
5456
| Recovery Services - Site Recovery | `AzureRM.RecoveryServices.SiteRecovery` | [![Recovery Services - Site Recovery](https://img.shields.io/powershellgallery/v/AzureRM.RecoveryServices.SiteRecovery.svg?style=flat-square&label=AzureRM.RecoveryServices.SiteRecovery)](https://www.powershellgallery.com/packages/AzureRM.RecoveryServices.SiteRecovery/) |
5557
| Redis Cache | `AzureRM.RedisCache` | [![Redis Cache](https://img.shields.io/powershellgallery/v/AzureRM.RedisCache.svg?style=flat-square&label=AzureRM.RedisCache)](https://www.powershellgallery.com/packages/AzureRM.RedisCache/) |
5658
| Relay | `AzureRM.Relay` | [![Relay](https://img.shields.io/powershellgallery/v/AzureRM.Relay.svg?style=flat-square&label=AzureRM.Relay)](https://www.powershellgallery.com/packages/AzureRM.Relay/) |
59+
| Reservations | `AzureRM.Reservations` | [![Reservations](https://img.shields.io/powershellgallery/v/AzureRM.Reservations.svg?style=flat-square&label=AzureRM.Reservations)](https://www.powershellgallery.com/packages/AzureRM.Reservations/) |
5760
| Resources | `AzureRM.Resources` | [![Resources](https://img.shields.io/powershellgallery/v/AzureRM.Resources.svg?style=flat-square&label=AzureRM.Resources)](https://www.powershellgallery.com/packages/AzureRM.Resources/) |
5861
| Scheduler | `AzureRM.Scheduler` | [![Scheduler](https://img.shields.io/powershellgallery/v/AzureRM.Scheduler.svg?style=flat-square&label=AzureRM.Scheduler)](https://www.powershellgallery.com/packages/AzureRM.Scheduler/) |
5962
| Server Management | `AzureRM.ServerManagement` | [![Server Management](https://img.shields.io/powershellgallery/v/AzureRM.ServerManagement.svg?style=flat-square&label=AzureRM.ServerManagement)](https://www.powershellgallery.com/packages/AzureRM.ServerManagement/) |

documentation/breaking-changes/breaking-changes-tool-help.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,24 +42,26 @@ Below are descriptions and remediations for each of the errors that can be seen
4242
| 3040 | [Changed Generic Type Argument](#3040---changed-generic-type-argument) |
4343
| 3050 | [Different Generic Type Argument Size](#3050---different-generic-type-argument-size) |
4444

45-
## 1000 - Removed Cmdlet
45+
## 1000 - Removed or Renamed Cmdlet
4646

4747
### Description
4848

4949
_The cmdlet '`<cmdlet>`' has been removed and no alias was found for the original cmdlet name._
5050

51-
When a user can no longer use a cmdlet that was previously available in a module, that is a breaking change. This can occur when the cmdlet is deleted, or the name of the cmdlet was changed with no alias to the original cmdlet name.
51+
When a user can no longer use a cmdlet that was previously available in a module, that is a breaking change. This can occur when the cmdlet is deleted, or when the name of the cmdlet was changed with no alias to the original cmdlet name.
5252

5353
### Remediation
5454

5555
_Add the cmdlet '`<cmdlet>`' back to the module, or add an alias to the original cmdlet name._
5656

5757
To add an alias to the original cmdlet name, use the `Alias` attribute for the cmdlet.
5858

59+
If you need to, you can add multiple aliases for cmdlets that need to be renamed twice.
60+
5961
```cs
60-
[Alias("Login-AzureRmAccount")]
61-
[Cmdlet(VerbsCommon.Add, "AzureRmAccount")]
62-
public class AddAzureRmAccount : Cmdlet
62+
[Cmdlet(VerbsCommunications.Connect, "AzureRmAccount")]
63+
[Alias("Login-AzureRmAccount", "Login-AzAccount", "Add-AzureRmAccount")]
64+
public class ConnectAzureRmAccount : Cmdlet
6365
{
6466
protected override void BeginProcessing()
6567
{
@@ -383,8 +385,8 @@ _Add the parameter '`<parameter>`' back to the cmdlet '`<cmdlet>`', or add an al
383385
To add an alias to the original parameter name, use the `Alias` attribute for the parameter.
384386

385387
```cs
386-
[Cmdlet(VerbsCommon.Add, "AzureRmAccount")]
387-
public class AddAzureRmAccount : Cmdlet
388+
[Cmdlet(VerbsCommunications.Connect, "AzureRmAccount")]
389+
public class ConnectAzureRmAccount : Cmdlet
388390
{
389391
[Alias("Domain")]
390392
[Parameter(ParameterSetName = "...", Mandatory = false)

setup/azurecmd.wxs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
33

4-
<?define productName="Microsoft Azure PowerShell - December 2017" ?>
4+
<?define productName="Microsoft Azure PowerShell - January 2018" ?>
55
<?define sourceDir="$(var.SolutionDir)..\src\Package\$(var.Configuration)" ?>
66
<?define caSourceDir="$(var.SolutionDir)setup\bin\$(var.Configuration)" ?>
77

8-
<?define version="5.1.1" ?>
8+
<?define version="5.2.0" ?>
99

1010
<Product Id="*"
1111
Name="$(var.productName)"

src/Common/Commands.Common.Authentication.Abstractions/AzureAccount.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ public static class AccountType
8484
public const string Certificate = "Certificate",
8585
User = "User",
8686
ServicePrincipal = "ServicePrincipal",
87-
AccessToken = "AccessToken";
87+
AccessToken = "AccessToken",
88+
ManagedService = "ManagedService";
8889
}
8990

9091
/// <summary>
@@ -117,7 +118,12 @@ public static class Property
117118
/// <summary>
118119
/// Thumbprint for associated certificate
119120
/// </summary>
120-
CertificateThumbprint = "CertificateThumbprint";
121+
CertificateThumbprint = "CertificateThumbprint",
122+
123+
/// <summary>
124+
/// Login Uri for Managed Service Login
125+
/// </summary>
126+
MSILoginUri = "MSILoginUri";
121127

122128

123129
}

src/Common/Commands.Common.Authentication.Abstractions/Interfaces/IExtensibleSettings.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using System;
2-
// ----------------------------------------------------------------------------------
1+
// ----------------------------------------------------------------------------------
32
//
43
// Copyright Microsoft Corporation
54
// Licensed under the Apache License, Version 2.0 (the "License");

src/Common/Commands.Common.Authentication.Abstractions/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@
4747
// by using the '*' as shown below:
4848
// [assembly: AssemblyVersion("1.0.*")]
4949
[assembly: AssemblyVersion("1.0.0.0")]
50-
[assembly: AssemblyFileVersion("1.0.0.0")]
50+
[assembly: AssemblyFileVersion("1.1.0.0")]

src/Common/Commands.Common.Authentication.Abstractions/Settings/ClientFactorySettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace Microsoft.Azure.Commands.Common.Authentication.Abstractions
2323
public class ClientFactorySettings : IExtensibleSettings
2424
{
2525
/// <summary>
26-
/// The user agents in the cusrrent client factory
26+
/// The user agents in the current client factory
2727
/// </summary>
2828
public IEnumerable<UserAgentSettings> UserAgents { get; }
2929

0 commit comments

Comments
 (0)