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
63 changes: 62 additions & 1 deletion .pipelines/MSIXBundle-vPack-Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,26 @@ parameters: # parameters are shown up in ADO UI in a build queue time
- R1
- Netlock
default: "R1"
- name: IsEarlyAccess
type: boolean
default: false
- name: EarlyAccessFeed
displayName: Early Access Feed
type: string
default: 'net11'
values:
- 'net8'
- 'net9'
- 'net10'
- 'net11'
- name: DOTNET_RUNTIME_VERSION
displayName: Runtime version of early access build
type: string
default: ' '
- name: DOTNET_SDK_VERSION
displayName: SDK version of early access build
type: string
default: ' '

name: msixbundle_vPack_$(Build.SourceBranchName)_Prod.True_Create.${{ parameters.createVPack }}_$(date:yyyyMMdd).$(rev:rr)

Expand All @@ -48,9 +68,19 @@ variables:
value: ${{ parameters.ReleaseTagVar }}
- name: netiso
value: ${{ parameters.netiso }}
- name: IsEarlyAccess
value: ${{ parameters.IsEarlyAccess }}
- name: EARLY_ACCESS_FEED
value: ${{ parameters.EarlyAccessFeed }}
- name: DOTNET_RUNTIME_VERSION
value: ${{ parameters.DOTNET_RUNTIME_VERSION }}
- name: DOTNET_SDK_VERSION
value: ${{ parameters.DOTNET_SDK_VERSION }}
- group: certificate_logical_to_actual # used within signing task
- group: MSIXSigningProfile
- group: msixTools
- ${{ if eq(parameters.IsEarlyAccess, true) }}:
- group: DotNetPrivateBuildAccess
- group: mscodehub-feed-read-general
- group: mscodehub-feed-read-akv

Expand Down Expand Up @@ -95,9 +125,33 @@ extends:
tsaOptionsFile: .config/tsaoptions.json

stages:
- stage: prep
displayName: 'Prepare early access .NET'
dependsOn: []
jobs:
- ${{ if eq(parameters.IsEarlyAccess, true) }}:
- template: /.pipelines/templates/downloadDotnetEarlyAccess.yml@self
parameters:
DotnetRuntimeVersion: ${{ parameters.DOTNET_RUNTIME_VERSION }}
DotnetSdkVersion: ${{ parameters.DOTNET_SDK_VERSION }}
Comment thread
jshigetomi marked this conversation as resolved.
- ${{ else }}:
- job: skip_download_dotnet_early_access
displayName: 'Skip early access .NET download'
pool:
type: windows
variables:
- name: ob_outputDirectory
value: '$(Build.ArtifactStagingDirectory)/ONEBRANCH_ARTIFACT'
- name: ob_signing_setup_enabled
value: false
- name: ob_sdl_codeSignValidation_enabled
value: false
steps:
- pwsh: Write-Host 'IsEarlyAccess is false; skipping early access .NET download.'

- stage: Build_MSIX_Package
displayName: 'Build and create MSIX packages'
dependsOn: []
dependsOn: [prep]
jobs:
- job: Build
pool:
Expand All @@ -114,6 +168,10 @@ extends:
ArtifactPlatform: 'windows'
ob_outputDirectory: '$(BUILD.SOURCESDIRECTORY)\out'
ob_artifactBaseName: drop_build_$(Architecture)
IsEarlyAccess: ${{ parameters.IsEarlyAccess }}
EARLY_ACCESS_FEED: ${{ parameters.EarlyAccessFeed }}
DOTNET_RUNTIME_VERSION: ${{ parameters.DOTNET_RUNTIME_VERSION }}
DOTNET_SDK_VERSION: ${{ parameters.DOTNET_SDK_VERSION }}

steps:
- checkout: self
Expand Down Expand Up @@ -210,6 +268,9 @@ extends:
Write-Verbose -Verbose "Completed building PowerShell for '$env:BuildConfiguration' configuration"
displayName: 'Build Windows Universal - $(Architecture)-$(BuildConfiguration) Symbols folder'
env:
${{ if eq(parameters.IsEarlyAccess, true) }}:
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
VSS_NUGET_EXTERNAL_FEED_ENDPOINTS: $(VSS_NUGET_EXTERNAL_FEED_ENDPOINTS)
ob_restore_phase: true # Set ob_restore_phase to run this step before '🔒 Setup Signing' step.

# Add CodeQL Finalize task right after your 'Build' step.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ parameters:
- 'net8'
- 'net9'
- 'net10'
- 'net11'
- name: ReleaseTagVar
displayName: Release Tag
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ parameters: # parameters are shown up in ADO UI in a build queue time
- 'net8'
- 'net9'
- 'net10'
- 'net11'
- name: DOTNET_RUNTIME_VERSION
displayName: Runtime version of early access build
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ parameters: # parameters are shown up in ADO UI in a build queue time
- 'net8'
- 'net9'
- 'net10'
- 'net11'
- name: IsEarlyAccess
type: boolean
default: false
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/PowerShell-Coordinated_Packages-Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ parameters:
- 'net8'
- 'net9'
- 'net10'
- 'net11'
- name: DOTNET_RUNTIME_VERSION
displayName: Runtime version of early access build
type: string
Expand Down Expand Up @@ -121,4 +122,3 @@ extends:
DOTNET_SDK_VERSION: ${{ parameters.DOTNET_SDK_VERSION }}
EarlyAccessFeed: ${{ parameters.EarlyAccessFeed }}
IsEarlyAccess: ${{ parameters.IsEarlyAccess }}

2 changes: 1 addition & 1 deletion .pipelines/PowerShell-Packages-Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ parameters: # parameters are shown up in ADO UI in a build queue time
- 'net8'
- 'net9'
- 'net10'
- 'net11'
- name: DOTNET_RUNTIME_VERSION
displayName: Runtime version of early access build
type: string
Expand Down Expand Up @@ -120,4 +121,3 @@ extends:
DOTNET_RUNTIME_VERSION: ${{ parameters.DOTNET_RUNTIME_VERSION }}
DOTNET_SDK_VERSION: ${{ parameters.DOTNET_SDK_VERSION }}
EarlyAccessFeed: ${{ parameters.EarlyAccessFeed }}

1 change: 1 addition & 0 deletions .pipelines/PowerShell-Release-Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ parameters: # parameters are shown up in ADO UI in a build queue time
- 'net8'
- 'net9'
- 'net10'
- 'net11'
- name: IsEarlyAccess
type: boolean
default: false
Expand Down
28 changes: 28 additions & 0 deletions .pipelines/PowerShell-vPack-Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,26 @@ parameters: # parameters are shown up in ADO UI in a build queue time
- R1
- Netlock
default: "R1"
- name: IsEarlyAccess
type: boolean
default: false
- name: EarlyAccessFeed
displayName: Early Access Feed
type: string
default: 'net11'
values:
- 'net8'
- 'net9'
- 'net10'
- 'net11'
- name: DOTNET_RUNTIME_VERSION
displayName: Runtime version of early access build
type: string
default: ' '
- name: DOTNET_SDK_VERSION
displayName: SDK version of early access build
type: string
default: ' '

name: vPack_$(Build.SourceBranchName)_Prod_Create.${{ parameters.createVPack }}_Name.${{ parameters.vPackName}}_$(date:yyyyMMdd).$(rev:rr)

Expand All @@ -38,6 +58,10 @@ variables:
debug: ${{ parameters.debug }}
ReleaseTagVar: ${{ parameters.ReleaseTagVar }}
netiso: ${{ parameters.netiso }}
IsEarlyAccess: ${{ parameters.IsEarlyAccess }}
EarlyAccessFeed: ${{ parameters.EarlyAccessFeed }}
DOTNET_RUNTIME_VERSION: ${{ parameters.DOTNET_RUNTIME_VERSION }}
DOTNET_SDK_VERSION: ${{ parameters.DOTNET_SDK_VERSION }}

resources:
repositories:
Expand Down Expand Up @@ -85,3 +109,7 @@ extends:
parameters:
createVPack: ${{ parameters.createVPack }}
vPackName: ${{ parameters.vPackName }}
IsEarlyAccess: ${{ parameters.IsEarlyAccess }}
EarlyAccessFeed: ${{ parameters.EarlyAccessFeed }}
DOTNET_RUNTIME_VERSION: ${{ parameters.DOTNET_RUNTIME_VERSION }}
DOTNET_SDK_VERSION: ${{ parameters.DOTNET_SDK_VERSION }}
1 change: 1 addition & 0 deletions .pipelines/apiscan-gen-notice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ parameters:
- 'net8'
- 'net9'
- 'net10'
- 'net11'
- name: DOTNET_RUNTIME_VERSION
displayName: Runtime version of early access build
type: string
Expand Down
1 change: 1 addition & 0 deletions .pipelines/templates/insert-nuget-config-azfeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ steps:
'net8' { 'https://pkgs.dev.azure.com/powershell-rel/PowerShell/_packaging/powershell-net-8-early-access/nuget/v3/index.json' }
'net9' { 'https://pkgs.dev.azure.com/powershell-rel/PowerShell/_packaging/powershell-net-9-early-access/nuget/v3/index.json' }
'net10' { 'https://pkgs.dev.azure.com/powershell-rel/PowerShell/_packaging/powershell-net-10-early-access/nuget/v3/index.json' }
'net11' { 'https://pkgs.dev.azure.com/powershell-rel/PowerShell/_packaging/powershell-net-11-early-access/nuget/v3/index.json' }
default { throw "Unknown early access feed URL: $earlyAccessFeed" }
}
$powerShellRepoUri = 'https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/PowerShell/nuget/v3/index.json'
Expand Down
1 change: 1 addition & 0 deletions .pipelines/templates/release-validate-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ jobs:
'net8' { 'https://pkgs.dev.azure.com/powershell-rel/PowerShell/_packaging/powershell-net-8-early-access/nuget/v3/index.json' }
'net9' { 'https://pkgs.dev.azure.com/powershell-rel/PowerShell/_packaging/powershell-net-9-early-access/nuget/v3/index.json' }
'net10' { 'https://pkgs.dev.azure.com/powershell-rel/PowerShell/_packaging/powershell-net-10-early-access/nuget/v3/index.json' }
'net11' { 'https://pkgs.dev.azure.com/powershell-rel/PowerShell/_packaging/powershell-net-11-early-access/nuget/v3/index.json' }
default { throw "Unknown early access feed URL: $earlyAccessFeed" }
}
}
Expand Down
2 changes: 2 additions & 0 deletions .pipelines/templates/stages/PowerShell-Release-Stages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ stages:
IsEarlyAccess: ${{ parameters.IsEarlyAccess }}
DOTNET_RUNTIME_VERSION: ${{ parameters.DOTNET_RUNTIME_VERSION }}
DOTNET_SDK_VERSION: ${{ parameters.DOTNET_SDK_VERSION }}
EarlyAccessFeed: ${{ parameters.EarlyAccessFeed }}
dotnetArch: 'osx-x64'

- template: /.pipelines/templates/release-validate-sdk.yml@self
Expand All @@ -82,6 +83,7 @@ stages:
IsEarlyAccess: ${{ parameters.IsEarlyAccess }}
DOTNET_RUNTIME_VERSION: ${{ parameters.DOTNET_RUNTIME_VERSION }}
DOTNET_SDK_VERSION: ${{ parameters.DOTNET_SDK_VERSION }}
EarlyAccessFeed: ${{ parameters.EarlyAccessFeed }}
dotnetArch: 'linux-x64'

- stage: gbltool
Expand Down
61 changes: 54 additions & 7 deletions .pipelines/templates/stages/PowerShell-vPack-Stages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,45 @@ parameters:
type: boolean
- name: vPackName
type: string
- name: IsEarlyAccess
type: boolean
default: false
- name: EarlyAccessFeed
type: string
default: 'net11'
- name: DOTNET_RUNTIME_VERSION
type: string
default: ' '
- name: DOTNET_SDK_VERSION
type: string
default: ' '

stages:
- stage: prep
displayName: 'Prepare early access .NET'
jobs:
- ${{ if eq(parameters.IsEarlyAccess, true) }}:
- template: /.pipelines/templates/downloadDotnetEarlyAccess.yml@self
parameters:
DotnetRuntimeVersion: ${{ parameters.DOTNET_RUNTIME_VERSION }}
DotnetSdkVersion: ${{ parameters.DOTNET_SDK_VERSION }}
Comment thread
jshigetomi marked this conversation as resolved.
- ${{ else }}:
- job: skip_download_dotnet_early_access
displayName: 'Skip early access .NET download'
pool:
type: windows
variables:
- name: ob_outputDirectory
value: '$(Build.ArtifactStagingDirectory)/ONEBRANCH_ARTIFACT'
- name: ob_signing_setup_enabled
value: false
- name: ob_sdl_codeSignValidation_enabled
value: false
steps:
- pwsh: Write-Host 'IsEarlyAccess is false; skipping early access .NET download.'

- stage: BuildStage
dependsOn: [prep]
jobs:
- job: BuildJob
pool:
Expand Down Expand Up @@ -41,6 +77,10 @@ stages:
ob_createvpack_verbose: true
ob_createvpack_packagename: '${{ parameters.vPackName }}.$(architecture)'
ob_createvpack_description: PowerShell $(architecture) $(version)
IsEarlyAccess: ${{ parameters.IsEarlyAccess }}
EARLY_ACCESS_FEED: ${{ parameters.EarlyAccessFeed }}
DOTNET_RUNTIME_VERSION: ${{ parameters.DOTNET_RUNTIME_VERSION }}
DOTNET_SDK_VERSION: ${{ parameters.DOTNET_SDK_VERSION }}
# Some official-build adapters force the injected validator on despite templateContext.
# Exclude this payload from that validator; it is validated below with the tools-only policy.
ob_sdl_codeSignValidation_excludes: '-|**\*.ps1;-|**\*.psm1;-|**\*.ps1xml;-|**\*.psd1;-|**\*.exe;-|**\*.dll'
Expand Down Expand Up @@ -147,13 +187,18 @@ stages:
AnalyzeInPipeline: false # Do not upload results
Language: csharp

- task: UseDotNet@2
displayName: 'Install .NET based on global.json'
inputs:
useGlobalJson: true
workingDirectory: $(repoRoot)
env:
ob_restore_phase: true
- ${{ if eq(parameters.IsEarlyAccess, true) }}:
- template: /.pipelines/templates/install-dotnet.yml@self
parameters:
architecture: win-x64
- ${{ else }}:
- task: UseDotNet@2
displayName: 'Install .NET based on global.json'
inputs:
useGlobalJson: true
workingDirectory: $(repoRoot)
env:
ob_restore_phase: true

- pwsh: |
# Need to set PowerShellRoot variable for obp-file-signing template
Expand Down Expand Up @@ -204,6 +249,8 @@ stages:
displayName: Build Windows Universal - $(Architecture) -$(BuildConfiguration) Symbols folder
env:
__DOTNET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY)
${{ if eq(parameters.IsEarlyAccess, true) }}:
VSS_NUGET_EXTERNAL_FEED_ENDPOINTS: $(VSS_NUGET_EXTERNAL_FEED_ENDPOINTS)
ob_restore_phase: true # Set ob_restore_phase to run this step before '🔒 Setup Signing' step.

- task: CodeQL3000Finalize@0 # Add CodeQL Finalize task right after your 'Build' step.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ parameters:
- 'net8'
- 'net9'
- 'net10'
- 'net11'
- name: ReleaseTagVar
type: string
default: 'fromBranch'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ parameters:
- 'net8'
- 'net9'
- 'net10'
- 'net11'
- name: IsEarlyAccess
type: boolean
default: false
Expand Down
25 changes: 25 additions & 0 deletions .pipelines/templates/variables/PowerShell-vPack-Variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,23 @@ parameters:
- name: netiso
type: string
default: 'R1'
- name: IsEarlyAccess
type: boolean
default: false
- name: EarlyAccessFeed
type: string
default: 'net11'
values:
- 'net8'
- 'net9'
- 'net10'
- 'net11'
- name: DOTNET_RUNTIME_VERSION
type: string
default: ' '
- name: DOTNET_SDK_VERSION
type: string
default: ' '

variables:
- name: CDP_DEFINITION_BUILD_COUNT
Expand All @@ -30,6 +47,14 @@ variables:
value: none
- name: ReleaseTagVar
value: ${{ parameters.ReleaseTagVar }}
- name: IsEarlyAccess
value: ${{ parameters.IsEarlyAccess }}
- name: EARLY_ACCESS_FEED
value: ${{ parameters.EarlyAccessFeed }}
- name: DOTNET_RUNTIME_VERSION
value: ${{ parameters.DOTNET_RUNTIME_VERSION }}
- name: DOTNET_SDK_VERSION
value: ${{ parameters.DOTNET_SDK_VERSION }}
- group: Azure Blob variable group
- group: certificate_logical_to_actual # used within signing task
- group: DotNetPrivateBuildAccess
Expand Down
Loading
Loading