Skip to content

Commit

Permalink
Merge branch 'master' into youri/monitor-issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dingmeng-xue authored Sep 28, 2020
2 parents eeb9a70 + c32ab4c commit 26a70d2
Show file tree
Hide file tree
Showing 1,405 changed files with 199,298 additions and 42,709 deletions.
178 changes: 178 additions & 0 deletions .azure-pipelines/release-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
pr: none
trigger: none

strategy:
matrix:
Windows PS 5.1.14:
Image_Name: 'vs2017-win2016'
PSVersion: '5.1.14'

Windows PS 6.2.4:
Image_Name: 'vs2017-win2016'
PSVersion: '6.2.4'

Windows PS 7.0.3:
Image_Name: 'vs2017-win2016'
PSVersion: '7.0.3'

Linux PS 6.2.4:
Image_Name: 'ubuntu-18.04'
PSVersion: '6.2.4'

Linux PS 7.0.3:
Image_Name: 'ubuntu-18.04'
PSVersion: '7.0.3'

MacOS PS 6.2.4:
Image_Name: 'macOS-10.15'
PSVersion: '6.2.4'

MacOS PS 7.0.3:
Image_Name: 'macOS-10.15'
PSVersion: '7.0.3'

pool:
vmImage: $(Image_Name)

steps:
- task: PowerShell@2
displayName: Prepare Powershell $(PSVersion)
inputs:
filePath: 'tools/Test/SmokeTest/PrepareRequiredPowershell.ps1'
arguments: '-RequiredPsVersion $(PSVersion)'

- task: DownloadPipelineArtifact@2
condition: and(succeeded(), eq(variables['GalleryName'], 'LocalRepo'))
displayName: Download Artifacts from Build Pipeline
inputs:
buildType: specific
project: $(ProjectToDownloadArtifacts)
definition: $(BuildPipelineName)
buildVersionToDownload: latestFromBranch
branchName: $(BranchName)
artifactName: $(ArtifactName)
targetPath: $(Pipeline.Workspace)

- task: PowerShell@2
condition: and(succeeded(), eq(variables['GalleryName'], 'LocalRepo'))
displayName: Copy Artifacts to LocalRepo
inputs:
targetType: 'inline'
script: |
New-Item -Path "$(Pipeline.Workspace)" -Name "LocalRepo" -ItemType "directory"
Copy-Item -Path "$(Pipeline.Workspace)\\*.nupkg" -Destination "$(Pipeline.Workspace)\\LocalRepo\\"
Write-Host "List artifacts..."
Get-ChildItem "$(Pipeline.Workspace)\\LocalRepo\\"
- task: NuGetCommand@2
condition: and(succeeded(), eq(variables['GalleryName'], 'LocalRepo'))
displayName: 'Download Previous Release .nupkg Files'
inputs:
command: custom
arguments: 'install Az -directdownload -packagesavemode nupkg -source https://www.powershellgallery.com/api/v2 -OutputDirectory packages'

- task: PowerShell@2
condition: and(succeeded(), eq(variables['GalleryName'], 'LocalRepo'))
displayName: 'Copy Previous Release .nupkg files to LocalRepo'
inputs:
targetType: 'inline'
script: |
Get-ChildItem $(System.DefaultWorkingDirectory)/packages -Recurse -Include *.nupkg | Copy-Item -Destination "$(Pipeline.Workspace)\\LocalRepo\\" -Force
Write-Host "List localRepo..."
Get-ChildItem "$(Pipeline.Workspace)\\LocalRepo\\"
- task: PowerShell@2
displayName: Install Az Modules from $(GalleryName)
inputs:
filePath: 'tools/Test/SmokeTest/ScriptsCaller.ps1'
arguments: '-RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/InstallAzModules.ps1 -Gallery $(GalleryName) -LocalRepoLocation $(LocalRepoLocation)"'

- task: PowerShell@2
displayName: Connect AzAccount
inputs:
filePath: 'tools/Test/SmokeTest/ScriptsCaller.ps1'
arguments: '-RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/ConnectAzAccount.ps1 $(Password) $(ServicePrincipal) $(TenantId)"'

- task: PowerShell@2
displayName: Run Smoke Test
inputs:
filePath: 'tools/Test/SmokeTest/ScriptsCaller.ps1'
arguments: '-RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/RmCoreSmokeTests.ps1"'

- task: PowerShell@2
displayName: 'Run Smoke Test Reversely'
inputs:
filePath: 'tools/Test/SmokeTest/ScriptsCaller.ps1'
arguments: '-RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/RmCoreSmokeTests.ps1 -Reverse"'

- task: PowerShell@2
displayName: Clean Az Modules
inputs:
filePath: 'tools/Test/SmokeTest/ScriptsCaller.ps1'
arguments: '-RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/CleanAzModules.ps1"'

- task: PowerShell@2
displayName: Update Az Modules
inputs:
filePath: 'tools/Test/SmokeTest/ScriptsCaller.ps1'
arguments: '-RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/UpdateAzModules.ps1 -Gallery $(GalleryName)"'

- task: PowerShell@2
displayName: Run Smoke Test
inputs:
filePath: 'tools/Test/SmokeTest/ScriptsCaller.ps1'
arguments: '-RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/RmCoreSmokeTests.ps1"'

- task: PowerShell@2
displayName: 'Run Smoke Test Reversely'
inputs:
filePath: 'tools/Test/SmokeTest/ScriptsCaller.ps1'
arguments: '-RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/RmCoreSmokeTests.ps1 -Reverse"'

- task: PowerShell@2
displayName: Clean Az Modules
inputs:
filePath: 'tools/Test/SmokeTest/ScriptsCaller.ps1'
arguments: '-RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/CleanAzModules.ps1"'

- task: PowerShell@2
displayName: Install an individual module
inputs:
filePath: 'tools/Test/SmokeTest/ScriptsCaller.ps1'
arguments: '-RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/InstallAnIndividualModule.ps1 -Gallery $(GalleryName)"'

- task: PowerShell@2
displayName: Clean Az Modules
inputs:
filePath: 'tools/Test/SmokeTest/ScriptsCaller.ps1'
arguments: '-RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/CleanAzModules.ps1"'

- task: PowerShell@2
displayName: Update an individual module
inputs:
filePath: 'tools/Test/SmokeTest/ScriptsCaller.ps1'
arguments: '-RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/UpdateAnIndividualModule.ps1 -Gallery $(GalleryName)"'

- task: PowerShell@2
displayName: Clean Az Modules
inputs:
filePath: 'tools/Test/SmokeTest/ScriptsCaller.ps1'
arguments: '-RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/CleanAzModules.ps1"'

- task: PowerShell@2
displayName: Install Az on top of an individual module
inputs:
filePath: 'tools/Test/SmokeTest/ScriptsCaller.ps1'
arguments: '-RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/InstallAzOnTopOfAnIndividualModule.ps1 -Gallery $(GalleryName)"'

- task: PowerShell@2
displayName: Clean Az Modules
inputs:
filePath: 'tools/Test/SmokeTest/ScriptsCaller.ps1'
arguments: '-RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/CleanAzModules.ps1"'

- task: PowerShell@2
displayName: Install an individual module on top of Az
inputs:
filePath: 'tools/Test/SmokeTest/ScriptsCaller.ps1'
arguments: '-RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/InstallAnIndividualModuleOnTopOfAz.ps1 -Gallery $(GalleryName)"'
2 changes: 1 addition & 1 deletion docker/Dockerfile-alpine-3.10
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LABEL maintainer="Azure PowerShell Team <[email protected]>" \

# install azure-powershell from PSGallery
RUN pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Repository ${REPOSITORY} && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Scope AllUsers -Repository ${REPOSITORY} && \
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Untrusted

# create AzureRmContextSettings.json before it was generated
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile-centos-7
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LABEL maintainer="Azure PowerShell Team <[email protected]>" \

# install azure-powershell from PSGallery
RUN pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Repository ${REPOSITORY} && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Scope AllUsers -Repository ${REPOSITORY} && \
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Untrusted

# create AzureRmContextSettings.json before it was generated
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile-debian-9
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LABEL maintainer="Azure PowerShell Team <[email protected]>" \

# install azure-powershell from PSGallery
RUN pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Repository ${REPOSITORY} && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Scope AllUsers -Repository ${REPOSITORY} && \
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Untrusted

# create AzureRmContextSettings.json before it was generated
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile-ubuntu-18.04
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LABEL maintainer="Azure PowerShell Team <[email protected]>" \

# install azure-powershell from PSGallery
RUN pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Repository ${REPOSITORY} && \
pwsh -Command Install-Module -Name ${MODULE} -RequiredVersion ${VERSION} -Scope AllUsers -Repository ${REPOSITORY} && \
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Untrusted

# create AzureRmContextSettings.json before it was generated
Expand Down
11 changes: 9 additions & 2 deletions documentation/azure-powershell-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Data Lake Analytics | `Az.DataLakeAnalytics`
Data Lake Store | `Az.DataLakeStore` | [![DataLakeStore]][DataLakeStoreGallery]
Data Migration | `Az.DataMigration` | [![DataMigration]][DataMigrationGallery]
Data Share | `Az.DataShare` | [![DataShare]][DataShareGallery]
Dedicated HSM | `Az.DedicatedHsm` | [![DedicatedHsm]][DedicatedHsmGallery]
Deployment Manager | `Az.DeploymentManager` | [![DeploymentManager]][DeploymentManagerGallery]
Windows Virtual Desktop | `Az.DesktopVirtualization` | [![DesktopVirtualization]][DesktopVirtualizationGallery]
Device Provisioning Services | `Az.DeviceProvisioningServices` | [![DeviceProvisioningServices]][DeviceProvisioningServicesGallery]
Expand Down Expand Up @@ -113,8 +114,10 @@ Support | `Az.Support`
Synapse Analytics | `Az.Synapse` | [![Synapse]][SynapseGallery]
Time Series Insights | `Az.TimeSeriesInsights` | [![TimeSeriesInsights]][TimeSeriesInsightsGallery]
Traffic Manager | `Az.TrafficManager` | [![TrafficManager]][TrafficManagerGallery]
VMWare Virtual Stream | `Az.VMWare` | [![VMWare]][VMWareGallery]
Web App Service | `Az.Websites` | [![Websites]][WebsitesGallery]


<!-- References -->

<!-- Shields -->
Expand All @@ -141,7 +144,7 @@ Web App Service | `Az.Websites`
[ContainerInstance]: https://img.shields.io/powershellgallery/v/Az.ContainerInstance.svg?style=flat-square&label=Az.ContainerInstance
[ContainerRegistry]: https://img.shields.io/powershellgallery/v/Az.ContainerRegistry.svg?style=flat-square&label=Az.ContainerRegistry
[CosmosDB]: https://img.shields.io/powershellgallery/v/Az.CosmosDB.svg?style=flat-square&label=Az.CosmosDB
[CustomProviders]: https://img.shields.io/powershellgallery/v/Az.CustomProviders.svg?style=flat-square&label=Az.CustomProviders
[CustomProviders]: https://img.shields.io/powershellgallery/v/Az.CustomProviders.svg?style=flat-square&label=Az.CustomProviders
[DataBox]: https://img.shields.io/powershellgallery/v/Az.DataBox.svg?style=flat-square&label=Az.DataBox
[DataBoxEdge]: https://img.shields.io/powershellgallery/v/Az.DataBoxEdge.svg?style=flat-square&label=Az.DataBoxEdge
[Databricks]: https://img.shields.io/powershellgallery/v/Az.Databricks.svg?style=flat-square&label=Az.Databricks
Expand All @@ -150,6 +153,7 @@ Web App Service | `Az.Websites`
[DataLakeStore]: https://img.shields.io/powershellgallery/v/Az.DataLakeStore.svg?style=flat-square&label=Az.DataLakeStore
[DataMigration]: https://img.shields.io/powershellgallery/v/Az.DataMigration.svg?style=flat-square&label=Az.DataMigration
[DataShare]: https://img.shields.io/powershellgallery/v/Az.DataShare.svg?style=flat-square&label=Az.DataShare
[DedicatedHsm]: https://img.shields.io/powershellgallery/v/Az.DedicatedHsm.svg?style=flat-square&label=Az.DedicatedHsm
[DeploymentManager]: https://img.shields.io/powershellgallery/v/Az.DeploymentManager.svg?style=flat-square&label=Az.DeploymentManager
[DesktopVirtualization]: https://img.shields.io/powershellgallery/v/Az.DesktopVirtualization.svg?style=flat-square&label=Az.DesktopVirtualization
[DeviceProvisioningServices]: https://img.shields.io/powershellgallery/v/Az.DeviceProvisioningServices.svg?style=flat-square&label=Az.DeviceProvisioningServices
Expand Down Expand Up @@ -222,6 +226,7 @@ Web App Service | `Az.Websites`
[Synapse]: https://img.shields.io/powershellgallery/v/Az.Synapse.svg?style=flat-square&label=Az.Synapse
[TimeSeriesInsights]: https://img.shields.io/powershellgallery/v/Az.TimeSeriesInsights.svg?style=flat-square&label=Az.TimeSeriesInsights
[TrafficManager]: https://img.shields.io/powershellgallery/v/Az.TrafficManager.svg?style=flat-square&label=Az.TrafficManager
[VMWare]: https://img.shields.io/powershellgallery/v/Az.VMWare.svg?style=flat-square&label=Az.VMWare
[Websites]: https://img.shields.io/powershellgallery/v/Az.Websites.svg?style=flat-square&label=Az.Websites

<!-- PS Gallery -->
Expand All @@ -244,7 +249,7 @@ Web App Service | `Az.Websites`
[CognitiveServicesGallery]: https://www.powershellgallery.com/packages/Az.CognitiveServices/
[ComputeGallery]: https://www.powershellgallery.com/packages/Az.Compute/
[ConnectedKubernetesGallery]: https://www.powershellgallery.com/packages/Az.ConnectedKubernetes/
[ConnectedMachine]: https://www.powershellgallery.com/packages/Az.ConnectedMachine/
[ConnectedMachineGallery]: https://www.powershellgallery.com/packages/Az.ConnectedMachine/
[ContainerInstanceGallery]: https://www.powershellgallery.com/packages/Az.ContainerInstance/
[ContainerRegistryGallery]: https://www.powershellgallery.com/packages/Az.ContainerRegistry/
[CosmosDBGallery]: https://www.powershellgallery.com/packages/Az.CosmosDB/
Expand All @@ -257,6 +262,7 @@ Web App Service | `Az.Websites`
[DataLakeStoreGallery]: https://www.powershellgallery.com/packages/Az.DataLakeStore/
[DataMigrationGallery]: https://www.powershellgallery.com/packages/Az.DataMigration/
[DataShareGallery]: https://www.powershellgallery.com/packages/Az.DataShare/
[DedicatedHsmGallery]: https://www.powershellgallery.com/packages/Az.DedicatedHsm/
[DeploymentManagerGallery]: https://www.powershellgallery.com/packages/Az.DeploymentManager/
[DesktopVirtualizationGallery]: https://www.powershellgallery.com/packages/Az.DesktopVirtualization/
[DeviceProvisioningServicesGallery]: https://www.powershellgallery.com/packages/Az.DeviceProvisioningServices/
Expand Down Expand Up @@ -329,4 +335,5 @@ Web App Service | `Az.Websites`
[SynapseGallery]: https://www.powershellgallery.com/packages/Az.Synapse/
[TimeSeriesInsightsGallery]: https://www.powershellgallery.com/packages/Az.TimeSeriesInsights/
[TrafficManagerGallery]: https://www.powershellgallery.com/packages/Az.TrafficManager/
[VMWareGallery]: https://www.powershellgallery.com/packages/Az.VMWare/
[WebsitesGallery]: https://www.powershellgallery.com/packages/Az.Websites/
1 change: 1 addition & 0 deletions src/Accounts/Accounts/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Additional information about change #1
-->
## Upcoming Release
Fix DateTime parse issue in common repo [#13045]

## Version 1.9.4
* Formatted the upcoming breaking change messages
Expand Down
9 changes: 9 additions & 0 deletions src/Cdn/Cdn/help/New-AzCdnProfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ The **New-AzCdnProfile** cmdlet creates an Azure Content Delivery Network (CDN)

## EXAMPLES

### Example 1

Creates a CDN profile. (autogenerated)

<!-- Aladdin Generated Example -->
```powershell
New-AzCdnProfile -Location westus -ProfileName <String> -ResourceGroupName myresourcegroup -Sku Standard_Verizon
```

## PARAMETERS

### -DefaultProfile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,5 +226,12 @@ public void TestCapabilities()
{
TestController.NewInstance.RunPsTest(traceInterceptor, "Test-Capabilities");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestApiProperties()
{
TestController.NewInstance.RunPsTest(traceInterceptor, "Test-ApiProperties");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1303,4 +1303,41 @@ function Test-Capabilities
# Cleanup
Clean-ResourceGroup $rgname
}
}

<#
.SYNOPSIS
Test ApiProperties
#>
function Test-ApiProperties
{
# Setup
$rgname = Get-CognitiveServicesManagementTestResourceName;

try
{
# Test
$accountname = 'csa' + $rgname;
$skuname = 'S0';
$accounttype = 'QnAMaker';
$loc = "West US";

New-AzResourceGroup -Name $rgname -Location $loc;
$apiProperties = New-AzCognitiveServicesAccountApiProperty
$apiProperties.QnaRuntimeEndpoint = "https://sdk-test-qna-maker.azurewebsites.net"
$createdAccount = New-AzCognitiveServicesAccount -ResourceGroupName $rgname -Name $accountname -Type $accounttype -SkuName $skuname -Location $loc -CustomSubdomainName $accountname -ApiProperty $apiProperties -Force;
Assert-NotNull $createdAccount;
Assert-True {$createdAccount.ApiProperties.QnaRuntimeEndpoint -eq "https://sdk-test-qna-maker.azurewebsites.net"}

$apiProperties.QnaRuntimeEndpoint = "https://qnamaker.azurewebsites.net"

$updatedAccount = Set-AzCognitiveServicesAccount -ResourceGroupName $rgname -Name $accountname -ApiProperty $apiProperties -Force;
Assert-NotNull $updatedAccount;
Assert-True {$updatedAccount.ApiProperties.QnaRuntimeEndpoint -eq "https://qnamaker.azurewebsites.net"}
}
finally
{
# Cleanup
Clean-ResourceGroup $rgname
}
}
Loading

0 comments on commit 26a70d2

Please sign in to comment.