Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .azure-pipelines/SyncFromMainBranchConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
".ci-config.json",
"tools",
".azure-pipelines",
".github",
"src/lib",
"src/shared",
"build.proj",
Expand Down
1 change: 1 addition & 0 deletions .azure-pipelines/powershell-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
configuration: ${{ variables.Configuration }}
testFramework: ${{ variables.TestFramework }}
powerShellPlatform: ${{ variables.PowerShellPlatform }}
IsGenerateBased: ${{ variables.IsGenerateBased }}

- job: Test
displayName: Test
Expand Down
1 change: 1 addition & 0 deletions .azure-pipelines/sync-tools-folder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ trigger:
paths:
include:
- .azure-pipelines
- .github
- tools
- src/lib

Expand Down
17 changes: 2 additions & 15 deletions .azure-pipelines/util/analyze-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,12 @@ parameters:
configuration: ''
testFramework: ''
powerShellPlatform: ''
IsGenerateBased: ''

steps:
- template: download-build-steps.yml
parameters:
artifactName: build-${{ parameters.testFramework }}
- task: NodeTool@0
condition: eq(variables.IsGenerateBased, true)
displayName: Install autorest
inputs:
versionSpec: '14.17.1'
command: custom
verbose: false
customCommand: install autorest@latest
- task: PowerShell@2
condition: eq(variables.IsGenerateBased, true)
displayName: Setup environment for autorest
inputs:
targetType: inline
script: "$env:NODE_OPTIONS=\"--max-old-space-size=65536\""
pwsh: true

- task: UseDotNet@2
displayName: 'Use .NET Core sdk 6.0.x'
Expand Down Expand Up @@ -61,6 +47,7 @@ steps:
arguments: 'build.proj /t:StaticAnalysis /p:Configuration=${{ parameters.configuration }};PullRequestNumber=$(System.PullRequest.PullRequestNumber)'
env:
OCTOKITPAT: $(OCTOKITPAT)
IsGenerateBased: ${{ parameters.IsGenerateBased }}

- template: publish-artifacts-steps.yml
parameters:
Expand Down
15 changes: 0 additions & 15 deletions .azure-pipelines/util/test-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,6 @@ steps:
- template: download-build-steps.yml
parameters:
artifactName: build-${{ parameters.testFramework }}
- task: NodeTool@0
condition: eq(variables.IsGenerateBased, true)
displayName: Install Autorest
inputs:
versionSpec: '14.17.1'
command: custom
verbose: false
customCommand: install autorest@latest
- task: PowerShell@2
condition: eq(variables.IsGenerateBased, true)
displayName: Setup environment for Autorest
inputs:
targetType: inline
script: "$env:NODE_OPTIONS=\"--max-old-space-size=65536\""
pwsh: true

- task: UseDotNet@2
displayName: 'Use .NET SDK 6 for tests'
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/windows-powershell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ jobs:
configuration: ${{ variables.Configuration }}
testFramework: ${{ variables.TestFramework }}
powerShellPlatform: ${{ variables.PowerShellPlatform }}
IsGenerateBased: ${{ variables.IsGenerateBased }}

- job: Test
displayName: Test
dependsOn: Build
condition: and(eq(variables.IsGenerateBased, false), succeeded())
timeoutInMinutes: 180
pool: ${{ variables.AgentPoolName }}

Expand Down
11 changes: 11 additions & 0 deletions tools/ExecuteCIStep.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,17 @@ If ($Build)
$Template.Build.Details += $BuildDetail

$DependencyStepList = $Template | Get-Member -MemberType NoteProperty | Select-Object -ExpandProperty Name | Where-Object { $_ -Ne "build" }

# In generated based branch, the Accounts is cloned from latest main branch but the environment will be cleaned after build job.
# Also the analysis check and test is not necessary for Az.Accounts in these branches.
If ($Env:IsGenerateBased -eq "true")
{
ForEach ($phase In ($CIPlan | Get-Member -MemberType NoteProperty | Select-Object -ExpandProperty Name | Where-Object { $_ -Ne "build" }))
{
$CIPlan.$phase = $CIPlan.$phase | Where-Object { $_ -Ne "Accounts" }
}
ConvertTo-Json -Depth 10 -InputObject $CIPlan | Out-File -FilePath $CIPlanPath
}

ForEach ($DependencyStep In $DependencyStepList)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ ForEach ($Step In $Steps) {
$Content += "|$ErrorTypeEmoji|$($Issue.Target)|$($Issue.Description)|$($Issue.Remediation)|`n"
}
ElseIf ($PhaseName -Eq "help-example") {
$Content += "|$ErrorTypeEmoji|$($Issue.Target)|$($Issue.Example)|$($Issue.Line)|$($Issue.RuleName)|$($Issue.Description)|$($Issue.Extent)|$($Issue.Remediation)|`n"
$Content += "|$ErrorTypeEmoji|$($Issue.Cmdlet)|$($Issue.Example)|$($Issue.Line)|$($Issue.RuleName)|$($Issue.Description)|$($Issue.Extent)|$($Issue.Remediation)|`n"
}
ElseIf ($PhaseName -Eq "ux") {
$Content += "|$ErrorTypeEmoji|$($Issue.Module)|$($Issue.ResourceType)|$($Issue.SubResourceType)|$($Issue.Command)|$($Issue.Description)|`n"
Expand Down