Skip to content

Commit

Permalink
Merge branch 'main' into autorest
Browse files Browse the repository at this point in the history
  • Loading branch information
ariklin authored May 1, 2022
2 parents 2deb3a9 + aa62d5f commit 1340f58
Show file tree
Hide file tree
Showing 3,341 changed files with 390,867 additions and 219,439 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
18 changes: 4 additions & 14 deletions .azure-pipelines/powershell-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ variables:
IsGenerateBased: $[eq(variables['system.pullRequest.targetBranch'], 'generation')]
BuildTimeoutInMinutes: 120
AnalysisTimeoutInMinutes: 120
TestTimeoutInMinutes: 180

trigger: none

Expand All @@ -32,21 +33,15 @@ jobs:
windows:
OSName: ${{ variables.WindowsName }}
ImageName: ${{ variables.WindowsImage }}
linux:
OSName: ${{ variables.LinuxName }}
ImageName: ${{ variables.LinuxImage }}
macOS:
OSName: ${{ variables.MacOSName }}
ImageName: ${{ variables.MacOSImage }}
pool:
vmImage: $(ImageName)

steps:
- template: util/build-steps.yml
parameters:
osName: $(OSName)
testFramework: ${{ variables.TestFramework }}
configuration: ${{ variables.Configuration }}
testFramework: ${{ variables.TestFramework }}

- job: Analyze
displayName: Analyze
Expand All @@ -58,12 +53,6 @@ jobs:
windows:
OSName: ${{ variables.WindowsName }}
ImageName: ${{ variables.WindowsImage }}
linux:
OSName: ${{ variables.LinuxName }}
ImageName: ${{ variables.LinuxImage }}
macOS:
OSName: ${{ variables.MacOSName }}
ImageName: ${{ variables.MacOSImage }}
pool:
vmImage: $(ImageName)

Expand All @@ -72,12 +61,13 @@ jobs:
parameters:
osName: $(OSName)
configuration: ${{ variables.Configuration }}
testFramework: ${{ variables.TestFramework }}

- job: Test
displayName: Test
dependsOn: Build
condition: succeeded()
timeoutInMinutes: 180
timeoutInMinutes: ${{ variables.TestTimeoutInMinutes }}
strategy:
matrix:
windows:
Expand Down
19 changes: 10 additions & 9 deletions .azure-pipelines/sign-tool-predictor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,29 @@ pool:

steps:
- task: PowerShell@2
displayName: Install PS 7.2
displayName: Install PowerShell
inputs:
targetType: 'inline'
script: |
$url = "https://github.com/PowerShell/PowerShell/releases/download/v7.2.0-preview.3/PowerShell-7.2.0-preview.3-win-x64.zip"
$output = Join-Path -Path $(Pipeline.Workspace) -ChildPath "./PowerShell-7.2.0-preview.3-win-x64.zip"
$url = "https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/PowerShell-7.2.0-win-x64.zip"
$output = Join-Path -Path $(Pipeline.Workspace) -ChildPath "./PowerShell-7.2.0-win-x64.zip"
(New-Object System.Net.WebClient).DownloadFile($url, $output)
$pwshPath= Join-Path -Path $(Pipeline.Workspace) -ChildPath "./PowerShell-7.2.0-preview.3/"
$pwshPath= Join-Path -Path $(Pipeline.Workspace) -ChildPath "./PowerShell/"
Expand-Archive -Path $output -DestinationPath $pwshPath
$pwshFullPath = Convert-Path $pwshPath
Write-Host $pwshFullPath
- task: PowerShell@2
displayName: 'Install platyPS, PowerShellGet, Az 3.0.0'
displayName: 'Install Dependent Modules'
inputs:
targetType: inline
script: |
$pwshPath= Join-Path -Path $(Pipeline.Workspace) -ChildPath "./PowerShell-7.2.0-preview.3/pwsh.exe"
$pwshPath= Join-Path -Path $(Pipeline.Workspace) -ChildPath "./PowerShell/pwsh.exe"
$command = "`$PSVersionTable `
Install-Module platyPS -Force -Confirm:`$false -Scope CurrentUser `
Install-Module PowerShellGet -Force -Confirm:`$false -Scope CurrentUser -SkipPublisherCheck `
Install-Module Az -Repository PSGallery -RequiredVersion 3.0.0 -Confirm:`$false -Scope CurrentUser -AllowClobber -Force"
Install-Module PSReadLine -Force -Confirm:`$false -Scope CurrentUser `
Install-Module Az.Accounts -Repository PSGallery -Confirm:`$false -Scope CurrentUser -AllowClobber -Force"
Invoke-Command -ScriptBlock { param ($pwshPath, $command) & $pwshPath -Command $command } -ArgumentList $pwshPath, $command
- task: UseDotNet@2
Expand All @@ -41,7 +42,7 @@ steps:
inputs:
command: custom
custom: msbuild
arguments: 'tools\Az.Tools.Predictor\build.proj /target:"Clean;Build;GenerateHelp" /p:Configuration=Release /p:PowerShellCoreCommandPrefix="$(Pipeline.Workspace)\\PowerShell-7.2.0-preview.3\\pwsh.exe -NonInteractive -NoLogo -NoProfile -Command"'
arguments: 'tools\Az.Tools.Predictor\build.proj /target:"Clean;Build;GenerateHelp" /p:Configuration=Release /p:PowerShellCoreCommandPrefix="$(Pipeline.Workspace)\\PowerShell\\pwsh.exe -NonInteractive -NoLogo -NoProfile -Command"'

- task: UseDotNet@2
displayName: 'Install DotNet 2.1 Runtime for Signing'
Expand Down Expand Up @@ -90,7 +91,7 @@ steps:
inputs:
command: custom
custom: msbuild
arguments: 'tools\Az.Tools.Predictor\build.proj /target:"Package" /p:Configuration=Release /p:PowerShellCoreCommandPrefix="$(Pipeline.Workspace)\\PowerShell-7.2.0-preview.3\\pwsh.exe -NonInteractive -NoLogo -NoProfile -Command" '
arguments: 'tools\Az.Tools.Predictor\build.proj /target:"Package" /p:Configuration=Release /p:PowerShellCoreCommandPrefix="$(Pipeline.Workspace)\\PowerShell\\pwsh.exe -NonInteractive -NoLogo -NoProfile -Command" '

- task: PublishPipelineArtifact@0
displayName: 'Save artifacts'
Expand Down
5 changes: 3 additions & 2 deletions .azure-pipelines/util/analyze-steps.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
parameters:
osName: ''
configuration: ''
testFramework: ''

steps:
- template: download-build-steps.yml
parameters:
osName: ${{ parameters.osName }}
artifactName: build-${{ parameters.testFramework }}
- task: NodeTool@0
condition: eq(variables.IsGenerateBased, true)
displayName: Install autorest
Expand Down Expand Up @@ -47,4 +48,4 @@ steps:

- template: publish-artifacts-steps.yml
parameters:
artifactName: analyze-${{ parameters.osName }}
artifactName: analyze-${{ parameters.testFramework }}
8 changes: 4 additions & 4 deletions .azure-pipelines/util/build-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ parameters:
steps:
- task: NodeTool@0
condition: eq(variables.IsGenerateBased, true)
displayName: Install autorest
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
displayName: Setup environment for Autorest
inputs:
targetType: inline
script: "$env:NODE_OPTIONS=\"--max-old-space-size=65536\""
pwsh: true
- task: PowerShell@2
displayName: 'Check Ingored File'
displayName: 'Check Ignored File'
inputs:
filePath: tools/CheckIgnoredFile.ps1

Expand All @@ -39,4 +39,4 @@ steps:

- template: publish-artifacts-steps.yml
parameters:
artifactName: build-${{ parameters.osName }}
artifactName: build-${{ parameters.testFramework }}
6 changes: 3 additions & 3 deletions .azure-pipelines/util/download-build-steps.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
parameters:
osName: ''
artifactName: ''

steps:
- task: DownloadPipelineArtifact@0
displayName: 'Download build-${{ parameters.osName }}'
displayName: 'Download {{ parameters.artifactName }}'
inputs:
artifactName: build-${{ parameters.osName }}
artifactName: ${{ parameters.artifactName }}
targetPath: artifacts
8 changes: 4 additions & 4 deletions .azure-pipelines/util/test-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ parameters:
steps:
- template: download-build-steps.yml
parameters:
osName: ${{ parameters.osName }}
artifactName: build-${{ parameters.testFramework }}
- task: NodeTool@0
condition: eq(variables.IsGenerateBased, true)
displayName: Install autorest
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
displayName: Setup environment for Autorest
inputs:
targetType: inline
script: "$env:NODE_OPTIONS=\"--max-old-space-size=65536\""
Expand Down Expand Up @@ -63,4 +63,4 @@ steps:

- template: publish-artifacts-steps.yml
parameters:
artifactName: test-${{ parameters.osName }}
artifactName: test-${{ parameters.testFramework }}-${{ parameters.osName }}
43 changes: 20 additions & 23 deletions .azure-pipelines/windows-powershell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ variables:
Configuration: Debug
DebugLocalBuildTasks: true
IsGenerateBased: $[eq(variables['system.pullRequest.targetBranch'], 'generation')]
BuildTimeoutInMinutes: 120
AnalysisTimeoutInMinutes: 120

trigger: none

Expand All @@ -20,6 +22,7 @@ jobs:
- job: Build
displayName: Build
condition: and(eq(variables.IsGenerateBased, false), succeeded())
timeoutInMinutes: ${{ variables.BuildTimeoutInMinutes }}
pool:
vmImage: ${{ variables.WindowsImage }}

Expand All @@ -36,46 +39,40 @@ jobs:
- job: Analyze
displayName: Analyze
dependsOn: Build
condition: and(eq(variables.IsGenerateBased, false), succeeded())
timeoutInMinutes: 90
condition: succeeded()
timeoutInMinutes: ${{ variables.AnalysisTimeoutInMinutes }}
strategy:
matrix:
windows:
OSName: ${{ variables.WindowsName }}
ImageName: ${{ variables.WindowsImage }}
pool:
vmImage: ${{ variables.WindowsImage }}
vmImage: $(ImageName)

steps:
- template: util/analyze-steps.yml
parameters:
osName: ${{ variables.WindowsName }}
osName: $(OSName)
configuration: ${{ variables.Configuration }}
- task: PowerShell@2
displayName: 'Cleanup Build'
inputs:
targetType: filePath
filePath: tools/CleanupBuild.ps1
pwsh: true
- task: NuGetCommand@2
displayName: 'Download BinSkim'
inputs:
command: custom
arguments: 'install Microsoft.CodeAnalysis.BinSkim -OutputDirectory $(System.DefaultWorkingDirectory)/tools/SecurityTools -Version 1.7.0'
- task: PowerShell@2
displayName: 'Run BinSkim'
inputs:
targetType: filePath
filePath: tools/SecurityTools/RunBinSkim.ps1
pwsh: true
testFramework: ${{ variables.TestFramework }}

- job: Test
displayName: Test
dependsOn: Build
condition: and(eq(variables.IsGenerateBased, false), succeeded())
timeoutInMinutes: 180
strategy:
matrix:
windows:
OSName: ${{ variables.WindowsName }}
ImageName: ${{ variables.WindowsImage }}
pool:
vmImage: ${{ variables.WindowsImage }}
vmImage: $(ImageName)

steps:
- template: util/test-steps.yml
parameters:
osName: ${{ variables.WindowsName }}
osName: $(OSName)
testFramework: ${{ variables.TestFramework }}
testTarget: ${{ variables.TestTarget }}
configuration: ${{ variables.Configuration }}
Loading

0 comments on commit 1340f58

Please sign in to comment.