Skip to content

Commit 8490ab2

Browse files
Nickcandyvidai-msftNoriZC
authored
Lnx/sign (#22278)
* Fixed issue in live test and added more error details (#22249) * Fixed the error when source was PSGallery * Added detailed error info to debug a concurrent issue * prevent eol issue (#22259) * suppress static analysis issue (#22260) * Uncommented assertions in gateway test with admin state (#22236) * Update code-oob.yml for Azure Pipelines * Lnx/sign (#22276) * Fixed issue in live test and added more error details (#22249) * Fixed the error when source was PSGallery * Added detailed error info to debug a concurrent issue * prevent eol issue (#22259) * suppress static analysis issue (#22260) * Uncommented assertions in gateway test with admin state (#22236) * Update code-oob.yml for Azure Pipelines --------- Co-authored-by: Vincent Dai <[email protected]> Co-authored-by: NoriZC <[email protected]> * Update code-oob.yml for Azure Pipelines * Update code-oob.yml for Azure Pipelines --------- Co-authored-by: Vincent Dai <[email protected]> Co-authored-by: NoriZC <[email protected]>
1 parent 6a775b9 commit 8490ab2

File tree

8 files changed

+45
-8
lines changed

8 files changed

+45
-8
lines changed

.azure-pipelines/code-oob.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,38 @@ parameters:
77
displayName: Service to OOB release
88
type: string
99
default: Databricks
10+
- name: BumpUpVersion
11+
displayName: Need BumpUpVersion
12+
type: boolean
13+
default: true
14+
- name: PreviewSuffix
15+
displayName: Add "-Preview" Suffix after version number
16+
type: boolean
17+
default: false
1018
- name: Preview
11-
displayName: Is preview version
19+
displayName: Is preview version(Including < 1.0.0)
1220
type: boolean
1321
default: false
1422
stages:
1523
- stage: OOBRelease
1624
displayName: OOBRelease
1725
jobs:
18-
- job: OOBRelease
26+
- job: BumpUpVersion
1927
timeoutInMinutes: 180
2028
pool: pool-windows-2019
29+
condition: and(succeeded(), eq('${{ parameters.BumpUpVersion }}', 'true'))
2130
steps:
2231
- task: DotNetCoreCLI@2
2332
displayName: Build
33+
condition: and(succeeded(), eq('${{ parameters.BumpUpVersion }}', 'true'))
2434
inputs:
2535
command: custom
2636
custom: msbuild
2737
arguments: 'build.proj "/t:Clean;Build" /p:Configuration=Release'
2838
- pwsh: |
2939
.\tools\RunVersionController.ps1 -ModuleName "Az.${{ parameters.ServiceName }}”
3040
displayName: 'Bump up version'
41+
condition: and(succeeded(), eq('${{ parameters.BumpUpVersion }}', 'true'))
3142
- task: AzurePowerShell@5
3243
inputs:
3344
azureSubscription: '$(AzureSubscription)'
@@ -52,6 +63,7 @@ stages:
5263
$Description = "Migrate ${{ parameters.ServiceName }} from oob to ${{parameters.TargetBranch}}"
5364
./tools/Github/CreatePR.ps1 -Title $Title -HeadBranch $HeadBranch -BaseBranch $BaseBranch -BotAccessToken $Token -Description $Description -Draft $true
5465
displayName: Create PR to main branch
66+
condition: and(succeeded(), eq('${{ parameters.BumpUpVersion }}', 'true'))
5567
- task: PowerShell@2
5668
displayName: get changelog info
5769
inputs:
@@ -65,6 +77,9 @@ stages:
6577
$versionNumber = $matches.Groups[1].Value
6678
$versionChanges = $matches.Groups[2].Value.Trim()
6779
}
80+
if ($PreviewSuffix) {
81+
$versionNumber += $PreviewSuffix
82+
}
6883
$jsonData = @{
6984
ModuleName = "${{ parameters.ServiceName }}"
7085
VersionNumber = "$versionNumber"
@@ -98,6 +113,11 @@ stages:
98113
"@
99114
$readmePath = "OOB/README.md"
100115
$content | Out-File -FilePath $readmePath
116+
if (${{ parameters.BumpUpVersion }} -eq $true) {
117+
echo "##vso[task.setvariable variable=BumpUpBranch]codeoob/${{ parameters.ServiceName }}"
118+
} else {
119+
echo "##vso[task.setvariable variable=BumpUpBranch]none"
120+
}
101121
102122
- task: PowerShell@2
103123
displayName: publish oob tools
@@ -116,7 +136,7 @@ stages:
116136
jobs:
117137
- template: ./code-sign.yml
118138
parameters:
119-
OOBBranch: codeoob/${{ parameters.ServiceName }}
139+
OOBBranch: $(BumpUpBranch)
120140
- job: PulishForTest
121141
dependsOn: Release
122142
steps:

src/Network/Network.Test/ScenarioTests/VirtualNetworkGatewayTests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1612,7 +1612,7 @@ function Test-VirtualNetworkExpressRouteGatewayCRUDwithAdminState
16121612
Assert-AreEqual $expected.ResourceGroupName $actual.ResourceGroupName
16131613
Assert-AreEqual $expected.Name $actual.Name
16141614
Assert-AreEqual "ExpressRoute" $expected.GatewayType
1615-
# Assert-AreEqual "Enabled" $expected.AdminState
1615+
Assert-AreEqual "Enabled" $expected.AdminState
16161616

16171617
# Create a second gateway
16181618
$vnet = Get-AzVirtualNetwork -Name $vnetName -ResourceGroupName $rgname
@@ -1625,15 +1625,15 @@ function Test-VirtualNetworkExpressRouteGatewayCRUDwithAdminState
16251625
Assert-AreEqual $expected.ResourceGroupName $actual.ResourceGroupName
16261626
Assert-AreEqual $expected.Name $actual.Name
16271627
Assert-AreEqual "ExpressRoute" $expected.GatewayType
1628-
# Assert-AreEqual "Enabled" $expected.AdminState
1628+
Assert-AreEqual "Enabled" $expected.AdminState
16291629

16301630
# Update second gw to disabled Adminstate
16311631
$vng2 = Get-AzVirtualNetworkGateway -ResourceGroupName $rgname -name $rname2
16321632
$vng2.Adminstate = "Disabled";
16331633
Set-AzVirtualNetworkGateway -VirtualNetworkGateway $vng2
16341634

16351635
$vng2 = Get-AzVirtualNetworkGateway -ResourceGroupName $rgname -name $rname2
1636-
# Assert-AreEqual "Disabled" $vng2.AdminState
1636+
Assert-AreEqual "Disabled" $vng2.AdminState
16371637

16381638
# Delete both virtualNetworkGateways
16391639
$delete = Remove-AzVirtualNetworkGateway -ResourceGroupName $rgname -name $rname -PassThru -Force
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
"Module","Cmdlet","Example","Line","RuleName","ProblemId","Severity","Description","Extent","Remediation"
2+
"Az.App","New-AzContainerAppManagedEnvCert","1","1","Invalid_Cmdlet","5000","1","New-SelfSignedCertificate is not a valid command name.","New-SelfSignedCertificate -DnsName 'www.fabrikam.com', 'www.contoso.com' -CertStoreLocation 'cert:\LocalMachine\My'","Check the spell of New-SelfSignedCertificate."

tools/StaticAnalysis/Exceptions/Az.Cdn/SignatureIssues.csv

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,13 @@
6464
"Az.Cdn","Test-AzCdnNameAvailability","Test-AzCdnNameAvailability","1","8700","Parameter set 'CheckExpanded1', '__AllParameterSets' of cmdlet 'Test-AzCdnNameAvailability' have the same mandatory parameters, and both of them are not default parameter set which may cause confusion.","Merge these parameter sets into one parameter set."
6565
"Az.Cdn","Update-AzCdnEndpoint","Update-AzCdnEndpoint","1","8410","Parameter ContentTypesToCompress of cmdlet Update-AzCdnEndpoint does not follow the enforced naming convention of using a singular noun for a parameter name.","Consider using a singular noun for the parameter name."
6666
"Az.Cdn","Update-AzFrontDoorCdnRoute","Update-AzFrontDoorCdnRoute","1","8410","Parameter CompressionSettingContentTypesToCompress of cmdlet Update-AzFrontDoorCdnRoute does not follow the enforced naming convention of using a singular noun for a parameter name.","Consider using a singular noun for the parameter name."
67+
"Az.Cdn","New-AzCdnDeliveryRuleCacheExpirationActionObject","New-AzCdnDeliveryRuleCacheExpirationActionObject","1","8100","New-AzCdnDeliveryRuleCacheExpirationActionObject Does not support ShouldProcess but the cmdlet verb New indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue"
68+
"Az.Cdn","New-AzCdnDeliveryRuleCacheKeyQueryStringActionObject","New-AzCdnDeliveryRuleCacheKeyQueryStringActionObject","1","8100","New-AzCdnDeliveryRuleCacheKeyQueryStringActionObject Does not support ShouldProcess but the cmdlet verb New indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue"
69+
"Az.Cdn","New-AzCdnLoadParametersObject","New-AzCdnLoadParametersObject","1","8100","New-AzCdnLoadParametersObject Does not support ShouldProcess but the cmdlet verb New indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue"
70+
"Az.Cdn","New-AzCdnOriginGroupOverrideActionObject","New-AzCdnOriginGroupOverrideActionObject","1","8100","New-AzCdnOriginGroupOverrideActionObject Does not support ShouldProcess but the cmdlet verb New indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue"
71+
"Az.Cdn","New-AzCdnPurgeParametersObject","New-AzCdnPurgeParametersObject","1","8100","New-AzCdnPurgeParametersObject Does not support ShouldProcess but the cmdlet verb New indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue"
72+
"Az.Cdn","New-AzFrontDoorCdnMigrationParametersObject","New-AzFrontDoorCdnMigrationParametersObject","1","8100","New-AzFrontDoorCdnMigrationParametersObject Does not support ShouldProcess but the cmdlet verb New indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue"
73+
"Az.Cdn","New-AzFrontDoorCdnMigrationWebApplicationFirewallMappingObject","New-AzFrontDoorCdnMigrationWebApplicationFirewallMappingObject","1","8100","New-AzFrontDoorCdnMigrationWebApplicationFirewallMappingObject Does not support ShouldProcess but the cmdlet verb New indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue"
74+
"Az.Cdn","New-AzFrontDoorCdnProfileChangeSkuWafMappingObject","New-AzFrontDoorCdnProfileChangeSkuWafMappingObject","1","8100","New-AzFrontDoorCdnProfileChangeSkuWafMappingObject Does not support ShouldProcess but the cmdlet verb New indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue"
75+
"Az.Cdn","New-AzFrontDoorCdnProfileUpgradeParametersObject","New-AzFrontDoorCdnProfileUpgradeParametersObject","1","8100","New-AzFrontDoorCdnProfileUpgradeParametersObject Does not support ShouldProcess but the cmdlet verb New indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue"
76+
"Az.Cdn","New-AzFrontDoorCdnPurgeParametersObject","New-AzFrontDoorCdnPurgeParametersObject","1","8100","New-AzFrontDoorCdnPurgeParametersObject Does not support ShouldProcess but the cmdlet verb New indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue"

tools/StaticAnalysis/Exceptions/Az.Databricks/SignatureIssues.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@
1313
"Az.Databricks","Update-AzDatabricksVNetPeering","Update-AzDatabricksVNetPeering","1","8410","Parameter ProxyUseDefaultCredentials of cmdlet Update-AzDatabricksVNetPeering does not follow the enforced naming convention of using a singular noun for a parameter name.","Consider using a singular noun for the parameter name."
1414
"Az.Databricks","Update-AzDatabricksWorkspace","Update-AzDatabricksWorkspace","1","8100","Update-AzDatabricksWorkspace Does not support ShouldProcess but the cmdlet verb Update indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue"
1515
"Az.Databricks","Update-AzDatabricksWorkspace","Update-AzDatabricksWorkspace","1","8410","Parameter ProxyUseDefaultCredentials of cmdlet Update-AzDatabricksWorkspace does not follow the enforced naming convention of using a singular noun for a parameter name.","Consider using a singular noun for the parameter name."
16+
"Az.Databricks","New-AzDatabricksWorkspaceProviderAuthorizationObject","New-AzDatabricksWorkspaceProviderAuthorizationObject","1","8100","New-AzDatabricksWorkspaceProviderAuthorizationObject Does not support ShouldProcess but the cmdlet verb New indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue"

tools/StaticAnalysis/GeneratedSdkAnalyzer/SDKGeneratedCodeVerify.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ try{
7474
Remediation = "Make sure that the ReadMe file of Sdk is loaded."
7575
}
7676
}
77+
# Prevent EOL changes detected
78+
git config --global core.autocrlf false
7779
# See if the code is completely the same as we generated
7880
$changes = git status ".\Generated" --porcelain
7981
if ($changes -ne $null){

tools/TestFx/Live/InstallLiveTestAzModules.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ switch ($Source) {
1111
"PSGallery" {
1212
Set-PSRepository -Name $Source -InstallationPolicy Trusted
1313
}
14-
{ "DailyBuild" -or "Sign" } {
14+
{ $_ -in "DailyBuild", "Sign" } {
1515
Register-PSRepository -Name $Source -SourceLocation $AzPackagesLocation -PackageManagementProvider NuGet -InstallationPolicy Trusted
1616
}
1717
}

tools/TestFx/Live/InvokeLiveTestScenarios.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ while ($queuedJobs.Count -gt 0) {
112112
}
113113

114114
if ("" -ne $liveJobStreams.Error) {
115-
$liveJobStreams.Error
115+
$liveJobStreams.Error | ForEach-Object {
116+
$_ | Format-List * -Force
117+
}
116118
}
117119
}
118120
}

0 commit comments

Comments
 (0)