Skip to content

Commit 41de679

Browse files
authored
Merge pull request Azure#3285 from Azure/release-3.3.0
[Release 3.3.0] Merge release-3.3.0 --> master
2 parents d9bca06 + 4ff7f26 commit 41de679

File tree

1,416 files changed

+419164
-171923
lines changed

Some content is hidden

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

1,416 files changed

+419164
-171923
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If applicable, reference the bug/issue that this pull request fixes here.
1212
This checklist is used to make sure that common guidelines for a pull request are followed. You can find a more complete discussion of PowerShell cmdlet best practices [here](https://msdn.microsoft.com/en-us/library/dd878270(v=vs.85).aspx).
1313

1414
- [ ] **I have read the [contribution guidelines](https://github.com/Azure/azure-powershell/blob/dev/CONTRIBUTING.md).**
15-
- [ ] **If changes were made to any cmdlet, the XML help was regenerated using the [platyPSHelp module](https://github.com/Azure/azure-powershell/blob/dev/documentation/platyps-help.md).**
15+
- [ ] **If changes were made to any cmdlet, the XML help was regenerated using the [platyPSHelp module](https://github.com/Azure/azure-powershell/blob/dev/documentation/platyPSHelp-documentation.md).**
1616
- [ ] **If any large changes are made to a service, they are reflected in the respective [change log](https://github.com/Azure/azure-powershell/blob/dev/CONTRIBUTING.md#updating-the-change-log).**
1717

1818
### [General Guidelines](https://github.com/Azure/azure-powershell/blob/dev/CONTRIBUTING.md#general-guidelines)

AzurePowershell.Test.targets

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
<XUnitTests Include=".\src\ResourceManager\Dns\Commands.Dns.Test\bin\Debug\Microsoft.Azure.Commands.Dns.Test.dll"/>
8686
<XUnitTests Include=".\src\ResourceManager\HDInsight\Commands.HDInsight.Test\bin\Debug\Commands.HDInsight.Test.dll"/>
8787
<XUnitTests Include=".\src\ResourceManager\Insights\Commands.Insights.Test\bin\Debug\Microsoft.Azure.Commands.Insights.Test.dll"/>
88+
<XUnitTests Include=".\src\ResourceManager\IotHub\Commands.IotHub.Test\bin\Debug\Microsoft.Azure.Commands.IotHub.Test.dll"/>
8889
<XUnitTests Include=".\src\ResourceManager\KeyVault\Commands.KeyVault.Test\bin\Debug\Microsoft.Azure.Commands.KeyVault.Test.dll"/>
8990
<XUnitTests Include=".\src\ResourceManager\LogicApp\Commands.LogicApp.Test\bin\Debug\Microsoft.Azure.Commands.LogicApp.Test.dll"/>
9091
<XUnitTests Include=".\src\ResourceManager\Network\Commands.Network.Test\bin\Debug\Microsoft.Azure.Commands.Network.Test.dll"/>
@@ -106,6 +107,8 @@
106107
<XUnitTests Include=".\src\ResourceManager\UsageAggregates\Commands.UsageAggregates.Test\bin\Debug\Microsoft.Azure.Commands.UsageAggregates.Test.dll"/>
107108
<XUnitTests Include=".\src\ResourceManager\Websites\Commands.Websites.Test\bin\Debug\Microsoft.Azure.Commands.Websites.Test.dll"/>
108109
<XUnitTests Include=".\src\Common\Commands.Common.Authentication.Test\bin\Debug\Microsoft.Azure.Commands.Common.Authentication.Test.dll"/>
110+
<XUnitTests Include=".\src\ResourceManager\ServiceBus\Commands.ServiceBus.Test\bin\Debug\Microsoft.Azure.Commands.ServiceBus.Test.dll"/>
111+
<XUnitTests Include=".\src\ResourceManager\EventHub\Commands.EventHub.Test\bin\Debug\Microsoft.Azure.Commands.EventHubs.Test.dll"/>
109112
<XUnitTests Include="@(AsmXUnitTests)"/>
110113
</ItemGroup>
111114
<ItemGroup Condition=" '$(scope)' == 'ServiceManagement' ">
@@ -526,4 +529,3 @@
526529

527530

528531
</Project>
529-

ChangeLog.md

Lines changed: 248 additions & 1 deletion
Large diffs are not rendered by default.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ For detail descriptions and examples of the cmdlets, type
7272
You can also find the standalone installers for all the versions at [Downloads](https://github.com/Azure/azure-powershell/releases)
7373

7474
### PowerShell Gallery
75-
1. Install [Windows Management Framework 5 with PowerShellGet cmdlets](https://www.powershellgallery.com/GettingStarted?section=Get%20Started)
75+
1. Install [Windows Management Framework 5 with PowerShellGet cmdlets](https://msdn.microsoft.com/en-us/powershell/gallery/psgallery/psgallery_gettingstarted)
7676
2. In an elevated PowerShell session, run ```Install-Module AzureRM```
7777
3. Run ```Install-AzureRm```
7878
4. To install RDFE cmdlets, run ```Install-Module Azure```
7979

8080
### Source Code
8181

8282
1. Download the source code from GitHub repo
83-
2. Follow the [Microsoft Azure PowerShell Developer Guide](https://github.com/Azure/azure-powershell/wiki/Microsoft-Azure-PowerShell-Developer-Guide)
83+
2. Follow the [Azure PowerShell Developer Guide](https://github.com/Azure/azure-powershell/wiki/Azure-Powershell-Developer-Guide)
8484

8585
### Supported PowerShell Versions
8686

appveyor.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
branches:
2+
only:
3+
- master
4+
environment:
5+
github_access_token:
6+
secure: VMFbecLLHzDq/09YDPbcM0VDDSwwgY57vr5GXK6cZZ4Ti/Xs5RZoylzV8MMr1350
7+
8+
build_script:
9+
- ps: |
10+
$ErrorActionPreference = "Stop"
11+
$response = Invoke-WebRequest ("https://api.github.com/repos/" + $env:APPVEYOR_REPO_NAME + "/releases/tags/" + $env:APPVEYOR_REPO_TAG_NAME) -Timeout 10
12+
if($response -ne $null -and $response.StatusCode -ne 200)
13+
{
14+
$host.SetShouldExit(1)
15+
}
16+
17+
$unzip_path = "C:\projects\azure-powershell-release"
18+
$unzip_file = $unzip_path + "zip"
19+
Invoke-WebRequest ($response.Content | ConvertFrom-Json).zipball_url -OutFile $unzip_file
20+
7z x $unzip_file -o"$unzip_path"
21+
$src = Join-Path (ls $unzip_path -dir | select -First 1 | % { $_.FullName }) "src"
22+
$global:output = Join-Path $unzip_path "output"
23+
ni $global:output -type dir
24+
$pattern = "\d(.\d)*"
25+
26+
foreach($folder in (ls $src -dir))
27+
{
28+
foreach($module in (ls $folder.FullName -dir | % { $_.FullName }))
29+
{
30+
# find out docs in help folder and version in .psd1 file
31+
$help = ls $module -dir -Recurse | ? { $_.Name -eq "help" } | select -First 1 | % { $_.FullName }
32+
if($help -eq $null)
33+
{
34+
continue
35+
}
36+
$psd1= ls $module | ? { $_.extension -eq ".psd1" } | select -First 1 | % { $_.FullName }
37+
if($psd1 -eq $null)
38+
{
39+
continue
40+
}
41+
if((gc $psd1 | Out-String) -notmatch "ModuleVersion\s*=\s*$pattern")
42+
{
43+
continue
44+
}
45+
robocopy $help "*.md" (Join-Path $global:output $folder | Join-Path -ChildPath (gi $psd1).BaseName | Join-Path -ChildPath ("v" + ($matches[0] -match $pattern)))
46+
}
47+
}
48+
test: off
49+
shallow_clone: true
50+
on_success:
51+
- git clone -q --branch=%target_branch% %content_repo% %TEMP%\Azure
52+
- cd %TEMP%\Azure
53+
- ps: ls $global:output -dir | % { copy $_.FullName (ls -dir | select -First 1) -Recurse -Force }
54+
- git config --global credential.helper store
55+
- ps: ac "$env:USERPROFILE\.git-credentials" "https://$($env:github_access_token):[email protected]`n"
56+
- git config --global user.email %email%
57+
- git config --global user.name %name%
58+
- git add -A
59+
- git diff --quiet --exit-code --cached || git commit -m "Sync docs from source code repo to content repo." && git push origin %target_branch% && appveyor AddMessage "Content Updated"

documentation/Repo-Tasks-Module.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
###### Usage:
44

5-
1. Start PS-VSPrompt.lnk (shortcut), this will start VS Dev Prompt in powershell
6-
2. Import-Module ./Repo-Tasks.psm1
5+
1. Start .\tools\PS-VSPrompt.lnk (shortcut), this will start VS Dev Prompt in powershell
6+
2. Import-Module .\tools\Repo-Tasks.psd1
77
1. During import, we allow to load additional functions that users might want to use it in their session.
88
2. If you have any userPreference.ps1 file under %userprofile%/psFiles directory, the module will try to load it by dot sourcing it.
99
2. It will also honor environment variable $env:psuserpreferences and load .ps1 files from the location that is pointed by $env:psuserpreferences
@@ -20,4 +20,4 @@
2020
1. Will build and run existing tests.
2121

2222
###Note:
23-
If you do not start your powershell session using PS-VSPrompt shortcut, you will not have access to all the environment variables that are set as part of VS Dev Command prompt.
23+
If you do not start your powershell session using PS-VSPrompt shortcut, you will not have access to all the environment variables that are set as part of VS Dev Command prompt.

documentation/breaking-changes/upcoming-breaking-changes.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@
2525
https://github.com/Azure/azure-powershell/blob/dev/documentation/breaking-changes/breaking-change-template.md
2626
-->
2727

28-
# Upcoming Breaking Changes
28+
# Upcoming Breaking Changes
29+

documentation/cleaning-up-commits.md

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,28 @@ It can be difficult to follow the changes in a pull request when the number of c
1717

1818
### Rebasing
1919

20-
Sometimes a pull request can be based on a much earlier commit in the branch that you are trying to merge into it, causing a large amount of commits and file changes to litter the pull request. In this case, it would be better to **rebase** (move branches around by changing the commit that they are based on). After rebasing, you will want to close the pull request and open a new one, which will now have fewer commits.
20+
Sometimes a pull request can be based on a much earlier commit in the branch that you are trying to merge into it, causing a large amount of commits and file changes to litter the pull request. In this case, it would be better to **rebase** (move branches around by changing the commit that they are based on).
2121

22-
For example, if you're working from the branch **feature** and are trying to rebase with **master**, you may run one of the following commands:
23-
> `git rebase master`
24-
> `git rebase master feature`
22+
For example, if you're working from the branch **feature** and are trying to rebase with **dev**, you'll first want to pull the latest changes from **dev**:
2523

26-
You can also rebase with the following command:
27-
> `git pull --rebase`
24+
```
25+
git pull upstream dev
26+
```
2827

29-
A normal `git pull` is equivalent to `git fetch` followed by `git merge FETCH_HEAD`, but when you run `git pull --rebase`, it runs `git rebase` instead of `git merge`.
28+
Next, you'll want to "uncommit" all of the changes in **feature** that differ from **dev**:
29+
30+
```
31+
git reset --soft upstream/dev
32+
```
33+
34+
Finally, make a small number of commits with the changes you have made and push them to your fork:
35+
36+
```
37+
< commit changes >
38+
git push origin feature -f
39+
```
40+
41+
**Note**: the `-f` must be included when pushing to your fork for the rebase to be successful
3042

3143
For more information on rebasing, click [here](https://git-scm.com/docs/git-rebase).
3244

@@ -35,7 +47,10 @@ For more information on rebasing, click [here](https://git-scm.com/docs/git-reba
3547
When your pull request has a group of commits that can be condensed into one, logical commit, use **squashing**. This will clean up the number of commits your pull request has while also grouping together common commits.
3648

3749
For example, if you wanted to squash the last three commits into one, you may run the following command:
38-
> `git rebase -i HEAD~3`
50+
51+
```
52+
git rebase -i HEAD~3
53+
```
3954

4055
This will bring up an editor showing your last three commits. Pick a commit to keep (as the message), and squash the other two into it.
4156

@@ -46,13 +61,19 @@ For more information on squashing, click [here](https://git-scm.com/book/en/v2/G
4661
If you want to merge specific commits from another branch into the current one you are working from, use **cherry-picking**.
4762

4863
For example, if you're working on the **master** branch and want to pull commit X (the commit-hash) from the **feature** branch, you may run the following commands:
49-
> `git checkout master`
50-
> `git cherry-pick X -n`
64+
65+
```
66+
git checkout master
67+
git cherry-pick X -n
68+
```
5169

5270
The `-n`, or `--no-commit`, is recommended for cherry-picking because it won't automatically create a commit for the cherry-picked change; this will allow you to view the changes first and make sure that you want to add all everything from the cherry-picked commit.
5371

5472
Now, if you want to cherry-pick a range of commits, say X through Y, from the **feature** branch, you may run the following commands:
55-
> `git checkout -b temp-branch X`
56-
> `git rebase --onto master Y^`
73+
74+
```
75+
git checkout -b temp-branch X
76+
git rebase --onto master Y^
77+
```
5778

5879
For more information on cherry-picking, click [here](https://git-scm.com/docs/git-cherry-pick).

documentation/platyps-help.md renamed to documentation/platyPSHelp-documentation.md

Lines changed: 44 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
# PlatyPS Help
22

33
- [Description](#description)
4+
- [Prerequisites](#prerequisites)
5+
- [Install and import platyPS](#install-and-import-platyps)
6+
- [Check for valid paths](#check-for-valid-paths)
47
- [Getting Started](#getting-started)
5-
- [Installing the platyPSHelp Module](#installing-the-platypshelp-module)
8+
- [Installing the platyPSHelp module](#installing-the-platypshelp-module)
69
- [Running the New-ServiceMarkdownHelp cmdlet](#running-the-new-servicemarkdownhelp-cmdlet)
710
- [Running the Validate-ServiceMarkdownHelp cmdlet](#running-the-validate-servicemarkdownhelp-cmdlet)
811
- [Running the Update-ServiceMarkdownHelp cmdlet](#running-the-update-servicemarkdownhelp-cmdlet)
@@ -20,15 +23,44 @@
2023

2124
PlatyPS is used to create PowerShell external help in markdown rather than XML (MAML). Where as XML help (MAML) can be difficult to edit by hand or read, markdown is designed to be human-readable and easy to edit. This will allow service teams to quickly and easily edit any help documentation they have for their cmdlets.
2225

23-
Install (and read more about) platyPS from the README, located [here](https://github.com/PowerShell/platyPS/blob/master/README.md).
26+
You can find the more information on platyPS [here](https://github.com/PowerShell/platyPS/blob/master/README.md).
27+
28+
The platyPSHelp module uses platyPS to allow service teams to achieve the following:
29+
- Create markdown files for each of their cmdlets
30+
- Update the markdown files when changes are made to the cmdlets
31+
- Validate the help content in the markdown files to ensure no sections are missing information
32+
33+
## Prerequisites
34+
35+
### Install and import the platyPS
36+
37+
In order to use the platyPSHelp module, you will first need to install the platyPS module. To do so, run the following commands:
38+
39+
```powershell
40+
Install-Module -Name platyPS -Scope CurrentUser
41+
Import-Module platyPS
42+
```
43+
44+
### Check for valid paths
45+
46+
The platyPSHelp module builds paths to the service module and commands directory using the service name provided, the build target, and if the service is ARM or RDFE.
47+
48+
For ARM services, these paths include:
49+
- Path to module: `src\Package\<Build Target>\ResourceManager\AzureResourceManager\AzureRM.<Service>\AzureRM.<Service>.psd1`
50+
- Path to commands: `src\ResourceManager\<Service>\Commands.<Service>`
51+
- Path to help: `src\ResourceManager\<Service>\Commands.<Service>\help`
52+
53+
TrafficManager, for example, is a service that doesn't follow the format of these paths that are built - the path to their commands folder is `src\ResourceManager\TrafficManager\Commands.TrafficManager2`.
54+
55+
In the case that your service doesn't follow the format of the above paths, you will need to use the "FullPath" parameter set, which allows you to pass in the paths as parameters rather than have them built.
2456

2557
## Getting Started
2658

2759
If your service does not currently have any markdown help, follow the below steps to get started.
2860

2961
**NOTE**: Currently, the platyPSHelp module mentioned below is unable to create markdown help for **ServiceManagement** cmdlets. However, markdown help can be created for these cmdlets when running the regular platyPS cmdlets mentioned in the [How it Works](#how-it-works) section.
3062

31-
### Installing the `platyPSHelp` Module
63+
### Installing the platyPSHelp module
3264

3365
The `platyPSHelp` module contains cmdlets that will help service teams with creating, updating, and validating markdown help for their cmdlets.
3466

@@ -39,15 +71,20 @@ There are three cmdlets contained in this module:
3971

4072
Help documentation has been written for each of these cmdlets, outlining the purpose of each cmdlet, the different parameter sets, and examples.
4173

42-
To use this module, change your directory to the **azure-powershell** repo, and from there, go to `tools\platyPS`. Run the following command to import the module:
74+
To use this module, change your directory to the **azure-powershell** repo, and from there, go to `tools\platyPSHelp`. Run the following command to import the module:
4375

4476
```powershell
4577
Import-Module .\platyPSHelp.psd1
4678
```
4779

4880
After executing this command, you will have access to the above cmdlets.
4981

50-
### Running the `New-ServiceMarkdownHelp` cmdlet
82+
If you are not using the "FullPath" parameter set, you will need the following information to use the cmdlets:
83+
- `Service` - the name of the service
84+
- `BuildTarget` - either Build or Release, the type of build used when building the service project locally
85+
- `ModuleName` - the name of the module corresponding to the service (_i.e._, AzureRM.Profile)
86+
87+
### Running the [New-ServiceMarkdownHelp](https://github.com/Azure/azure-powershell/blob/dev/tools/platyPSHelp/help/New-ServiceMarkdownHelp.md) cmdlet
5188

5289
Once the module is installed, you will need to generate the markdown for your cmdlets; to do so, you will run the `New-ServiceMarkdownHelp` cmdlet.
5390

@@ -61,16 +98,12 @@ There are four possible parameter sets to choose from when creating your cmdlets
6198
- `FullPath`
6299
- This parameter set will be used if there is an issue when using any of the above parameter sets (*e.g.*, the path to the XML help (MAML) or commands folder does not follow what the cmdlet is expecting); in this case, you can provide the full path to the required items
63100

64-
More information about this cmdlet can be found in the [help](https://github.com/Azure/azure-powershell/blob/dev/tools/platyPSHelp/help/New-ServiceMarkdownHelp.md).
65-
66101
Once ran, this cmdlet will create markdown files for each of the cmdlets in your module, and will be placed in the help folder located on the same level as your XML help (MAML). It will also regenerate the XML help (MAML) to ensure that the information in the markdown help is seen when `Get-Help` or `Get-HelpPreview` is ran.
67102

68-
### Running the `Validate-ServiceMarkdownHelp` cmdlet
103+
### Running the [Validate-ServiceMarkdownHelp](https://github.com/Azure/azure-powershell/blob/dev/tools/platyPSHelp/help/Validate-ServiceMarkdownHelp.md) cmdlet
69104

70105
Before checking in this markdown, you will need to check to make sure all of the necessary parts are filled out (*i.e.*, synopsis, description, examples, parameter descriptions, and outputs).
71106

72-
This cmdlet contains the same four parameter sets as the `New-ServiceMarkdownHelp`, and more information about the cmdlet can be found in the [help](https://github.com/Azure/azure-powershell/blob/dev/tools/platyPSHelp/help/Validate-ServiceMarkdownHelp.md).
73-
74107
Once ran, this cmdlet will output a list of errors for each cmdlet in the following format:
75108

76109
```
@@ -87,12 +120,10 @@ File: Some-Cmdlet.md
87120

88121
This will let you know what parts of the markdown help need to be updated. A recommended tool for editing and visualizing markdown is [Dillinger](http://dillinger.io/), which will display your markdown changes in real-time.
89122

90-
### Running the `Update-ServiceMarkdownHelp` cmdlet
123+
### Running the [Update-ServiceMarkdownHelp](https://github.com/Azure/azure-powershell/blob/dev/tools/platyPSHelp/help/Update-ServiceMarkdownHelp.md) cmdlet
91124

92125
Anytime that you make changes to a cmdlet (*e.g.*, add/edit/remove parameter, edit output type, etc.), you will need to make sure that those changes are reflected in the markdown. The `Update-ServiceMarkdownHelp` cmdlet will update your markdown with the changes made to your cmdlets.
93126

94-
This cmdlet contains the same four parameter sets as the other two cmdlets, and more information about the cmdlet can be found in the [help](https://github.com/Azure/azure-powershell/blob/dev/tools/platyPSHelp/help/Update-ServiceMarkdownHelp.md).
95-
96127
In addition to updating the markdown help files, it will also regenerate the XML help (MAML) to ensure that the information in the markdown help is seen when `Get-Help` or `Get-HelpPreview` is ran.
97128

98129
## How it Works

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">
33

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

8-
<?define version="3.1.0" ?>
8+
<?define version="3.3.0" ?>
99

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

0 commit comments

Comments
 (0)