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
8 changes: 7 additions & 1 deletion .config/tsaoptions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{
"instanceUrl": "https://msazure.visualstudio.com",
"projectName": "One",
"areaPath": "One\\MGMT\\Compute\\Powershell\\Powershell\\PowerShell Core"
"areaPath": "One\\MGMT\\Compute\\Powershell\\Powershell\\PowerShell Core",
"notificationAliases": [
"adityap@microsoft.com",
"dongbow@microsoft.com",
"pmeinecke@microsoft.com",
"tplunk@microsoft.com"
]
}
13 changes: 2 additions & 11 deletions .pipelines/PowerShell-Coordinated_Packages-Official.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
name: UnifiedPackageBuild-$(Build.BuildId)
trigger:
branches:
include:
- master
- release*
pr:
branches:
include:
- master
- release*
trigger: none

parameters:
- name: ForceAzureBlobDelete
Expand Down Expand Up @@ -194,7 +185,7 @@ extends:
parameters:
Architecture: x64
BuildConfiguration: minSize
JobName: build_windows_x64_minSize
JobName: build_windows_x64_minSize_release
- template: /.pipelines/templates/windows-hosted-build.yml@self
parameters:
Architecture: x86
Expand Down
4 changes: 2 additions & 2 deletions .pipelines/templates/insert-nuget-config-azfeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ steps:
- pwsh: |
$configPath = "${env:NugetConfigDir}/nuget.config"
Import-Module ${{ parameters.repoRoot }}/build.psm1 -Force
New-NugetConfigFile -NugetFeedUrl $(AzDevOpsFeed) -UserName $(AzDevOpsFeedUserName) -ClearTextPAT $(AzDevOpsFeedPAT2) -FeedName AzDevOpsFeed -Destination "${env:NugetConfigDir}"
New-NugetConfigFile -NugetFeedUrl $(PowerShellCore_PublicPackages) -UserName $(AzDevOpsFeedUserName) -ClearTextPAT $(AzDevOpsFeedUserName) -FeedName AzDevOpsFeed -Destination "${env:NugetConfigDir}"
if(-not (Test-Path $configPath))
{
throw "nuget.config is not created"
Expand All @@ -20,7 +20,7 @@ steps:
- pwsh: |
$configPath = "${env:NugetConfigDir}/nuget.config"
Import-Module ${{ parameters.repoRoot }}/build.psm1 -Force
New-NugetConfigFile -NugetFeedUrl $(PSInternalNugetFeed) -UserName $(PSInternalNugetFeedUserName) -ClearTextPAT $(PSInternalNugetFeedPAT) -FeedName AzDevOpsFeed -Destination "${env:NugetConfigDir}"
New-NugetConfigFile -NugetFeedUrl $(PowerShellCore_PublicPackages) -UserName $(AzDevOpsFeedUserName) -ClearTextPAT $(AzDevOpsFeedUserName) -FeedName AzDevOpsFeed -Destination "${env:NugetConfigDir}"
if(-not (Test-Path $configPath))
{
throw "nuget.config is not created"
Expand Down
12 changes: 9 additions & 3 deletions .pipelines/templates/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
value: $(Build.SourcesDirectory)\PowerShell\.config\tsaoptions.json
- name: ob_sdl_credscan_suppressionsFile
value: $(Build.SourcesDirectory)\PowerShell\.config\suppress.json
- name: BuildConfiguration
- name: BUILDCONFIGURATION
value: ${{ parameters.BuildConfiguration }}
- name: Runtime
value: ${{ parameters.Runtime }}
Expand Down Expand Up @@ -66,7 +66,8 @@ jobs:
$runtime = $env:RUNTIME

$params = @{}
if ($env:BuildConfiguration -eq 'minSize') {
if ($env:BUILDCONFIGURATION -eq 'minSize') {
Write-Verbose -Message "Building for minimal size"
$params['ForMinimalSize'] = $true
}

Expand All @@ -78,6 +79,11 @@ jobs:
$null = New-Item -ItemType Directory -Path $buildWithSymbolsPath -Force -Verbose
Start-PSBuild -Runtime $runtime -Configuration Release -Output $buildWithSymbolsPath @params -Clean -PSModuleRestore

$outputPath = Join-Path '$(ob_outputDirectory)' 'psoptions'
$null = New-Item -ItemType Directory -Path $outputPath -Force
$psOptPath = "$outputPath/psoptions.json"
Save-PSOptions -PSOptionsPath $psOptPath

Write-Verbose -Verbose "Verifying pdbs exist in build folder"
$pdbs = Get-ChildItem -Path $buildWithSymbolsPath -Recurse -Filter *.pdb
if ($pdbs.Count -eq 0) {
Expand All @@ -90,7 +96,7 @@ jobs:
}
}

Write-Verbose -Verbose "Completed building PowerShell for '$env:BuildConfiguration' configuration"
Write-Verbose -Verbose "Completed building PowerShell for '$env:BUILDCONFIGURATION' configuration"
displayName: 'Build Linux - $(Runtime)'
env:
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
Expand Down
23 changes: 14 additions & 9 deletions .pipelines/templates/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,17 @@ jobs:
$env:AzDevOpsFeedPAT2 = '$(AzDevOpsFeedPAT2)'
# Add -SkipReleaseChecks as a mitigation to unblock release.
# macos-10.15 does not allow creating a folder under root. Hence, moving the folder.
$(Build.SourcesDirectory)/tools/releaseBuild/macOS/PowerShellPackageVsts.ps1 -ReleaseTag $(ReleaseTagVar) -Destination $(System.ArtifactsDirectory) -Symbols -location $(PowerShellRoot) -Build -ArtifactName macosBinResults -Runtime 'osx-${{ parameters.buildArchitecture }}' -SkipReleaseChecks

Import-Module ./build.psm1 -Force
Start-PSBuild -Runtime 'osx-${{ parameters.buildArchitecture }}' -Configuration Release -PSModuleRestore -Clean -Output $(OB_OUTPUTDIRECTORY)
$artifactName = "macosBinResults-${{ parameters.buildArchitecture }}"

$psOptPath = "$(OB_OUTPUTDIRECTORY)/psoptions.json"
Save-PSOptions -PSOptionsPath $psOptPath

# Since we are using custom pool for macOS, we need to use artifact.upload to publish the artifacts
Write-Host "##vso[artifact.upload containerfolder=$artifactName;artifactname=$artifactName]$(OB_OUTPUTDIRECTORY)"

$env:AzDevOpsFeedPAT2 = $null
displayName: 'Build'
env:
Expand Down Expand Up @@ -84,7 +94,7 @@ jobs:
- name: ob_sdl_codeql_compiled_enabled
value: false
- name: ob_sdl_sbom_packageName
value: 'Microsoft.Powershell.Windows.${{parameters.buildArchitecture}}'
value: 'Microsoft.Powershell.MacOS.${{parameters.buildArchitecture}}'

steps:
- checkout: self
Expand All @@ -100,7 +110,7 @@ jobs:

- task: DownloadPipelineArtifact@2
inputs:
artifact: 'macosBinResults'
artifact: 'macosBinResults-$(BuildArchitecture)'
path: '$(Pipeline.Workspace)\Symbols'
displayName: Download build

Expand All @@ -115,12 +125,7 @@ jobs:
Write-Host "sending.. vso[task.setvariable variable=Runtime]$runtime"
Write-Host "##vso[task.setvariable variable=Runtime]$runtime"

$zipPath = Get-Item '$(Pipeline.Workspace)\Symbols\*symbol*${{ parameters.buildArchitecture }}*.zip' -Verbose
Write-Verbose -Verbose "Zip Path: $zipPath"

$expandedFolder = $zipPath.BaseName
Expand-Archive -Path $zipPath -Destination "$(Pipeline.Workspace)\$expandedFolder" -Force
$rootPath = "$(Pipeline.Workspace)\$expandedFolder"
$rootPath = "$(Pipeline.Workspace)\Symbols"
Write-Verbose -Verbose "Setting vso[task.setvariable variable=DropRootPath]$rootPath"
Write-Host "##vso[task.setvariable variable=DropRootPath]$rootPath"
displayName: Expand symbols zip
Expand Down
5 changes: 5 additions & 0 deletions .pipelines/templates/windows-hosted-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ jobs:
$null = New-Item -ItemType Directory -Path $buildWithSymbolsPath -Force -Verbose
Start-PSBuild -Runtime $runtime -Configuration Release -Output $buildWithSymbolsPath -Clean -PSModuleRestore @params

$outputPath = Join-Path '$(ob_outputDirectory)' 'psoptions'
$null = New-Item -ItemType Directory -Path $outputPath -Force
$psOptPath = "$outputPath/psoptions.json"
Save-PSOptions -PSOptionsPath $psOptPath

Write-Verbose -Verbose "Verifying pdbs exist in build folder"
$pdbs = Get-ChildItem -Path $buildWithSymbolsPath -Recurse -Filter *.pdb
if ($pdbs.Count -eq 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.9.2" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0-beta1.24154.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0-beta1.24122.1" PrivateAssets="all" />
</ItemGroup>
</Project>