Skip to content

Remove primary vertical concept from JoinVerticals #47338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Mar 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
65e4475
Remove primary vertical concept from JoinVerticals
jkoritzinsky Mar 7, 2025
f9ba8d1
Merge dotnet/main into rid-specific-publish
jkoritzinsky Mar 7, 2025
7dcb882
Restore disabled IBC (disabled due to MSBuild failures)
jkoritzinsky Mar 7, 2025
7e42c98
Forward isSourceOnlyBuild down
jkoritzinsky Mar 7, 2025
2df41a5
Change our handling of EnableDefaultRidSpecificArtifacts and DefaultA…
jkoritzinsky Mar 7, 2025
1cfe7d2
Remove dead code
jkoritzinsky Mar 7, 2025
1f64d96
Allow an empty sign list for repos that don't have RID-specific artif…
jkoritzinsky Mar 7, 2025
ece002c
Add backport for nuget change
jkoritzinsky Mar 7, 2025
61048cc
Update 0001-support-rid-agnostic-publishing.patch
jkoritzinsky Mar 8, 2025
bbf24bf
Update Publishing.props
jkoritzinsky Mar 11, 2025
be6b487
Merge branch 'main' of https://github.com/dotnet/sdk into rid-specifi…
jkoritzinsky Mar 13, 2025
70c62d5
Join in non-source-only even in PR.
jkoritzinsky Mar 13, 2025
7febe6c
Cleanup patches
jkoritzinsky Mar 13, 2025
0bac6e3
Remove guard on AllowEmptySignList
jkoritzinsky Mar 13, 2025
98cbc42
Merge branch 'main' of https://github.com/dotnet/sdk into rid-specifi…
jkoritzinsky Mar 14, 2025
92f9f69
Include the variables template in the final join stage
jkoritzinsky Mar 15, 2025
9e50d17
Fix path for join-verticals script in sdk.
jkoritzinsky Mar 15, 2025
baa945c
Clone and sync the vmr in the join job when building it from sdk
jkoritzinsky Mar 16, 2025
5d6a5cd
Try different approach for the vmr branch and adjust the artifacts name
jkoritzinsky Mar 16, 2025
02c0196
Move variables up a scope
jkoritzinsky Mar 17, 2025
5ce08e6
Try fetching the path differently
jkoritzinsky Mar 17, 2025
4b7fa8e
Add download steps for the public build
jkoritzinsky Mar 18, 2025
e3d0e4c
Merge branch 'main' of github.com:dotnet/sdk into rid-specific-publish
jkoritzinsky Mar 18, 2025
28c6c5b
Add parameter for forwarding
jkoritzinsky Mar 18, 2025
172bbce
Inline always-true if body
jkoritzinsky Mar 18, 2025
a96232f
Make unmatched assets an error
jkoritzinsky Mar 18, 2025
3d66265
Log unmatched assets only when there are any
jkoritzinsky Mar 18, 2025
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
11 changes: 9 additions & 2 deletions eng/Publishing.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,18 @@
<PropertyGroup Condition="'$(EnableDefaultArtifacts)' == 'true'">
<FSharpCorePath Condition="'$(DotNetFinalVersionKind)' != 'release'">Shipping</FSharpCorePath>
<FSharpCorePath Condition="'$(DotNetFinalVersionKind)' == 'release'">Release</FSharpCorePath>
<!--
We only want to publish the FSharp assets externally when we're publishing all artifacts, not only RID-specific ones.
Add these packages as "Vertical" visibility when we're only publishing RID-specific packages so we don't publish this one.
-->
<FSharpArtifactVisibility Condition="'$(EnableDefaultRidSpecificArtifacts)' == 'true'">Vertical</FSharpArtifactVisibility>
<FSharpArtifactVisibility Condition="'$(FSharpArtifactVisibility)' == ''">External</FSharpArtifactVisibility>
</PropertyGroup>
<ItemGroup Condition="'$(EnableDefaultArtifacts)' == 'true'">
<Artifact Include="$(NuGetPackageRoot)\microsoft.fsharp.compiler\$(MicrosoftFSharpCompilerPackageVersion)\contentFiles\$(FSharpCorePath)\FSharp.Core.*.nupkg;
$(NuGetPackageRoot)\microsoft.fsharp.compiler\$(MicrosoftFSharpCompilerPackageVersion)\contentFiles\$(FSharpCorePath)\FSharp.Compiler.Service.*.nupkg"
Kind="Package" />
Kind="Package"
Visibility="$(FSharpArtifactVisibility)" />
</ItemGroup>

<!-- The PGO sdk should always have External visibility, even if someone changes the default artifact visibility -->
Expand Down Expand Up @@ -53,7 +60,7 @@
<MSBuild Projects="$(RepositoryEngineeringDir)Badge.proj" Targets="GenerateVersionBadge">
<Output TaskParameter="TargetOutputs" ItemName="VersionBadge" />
</MSBuild>

<ItemGroup>
<Artifact Include="@(VersionBadge)" Kind="Blob" />
</ItemGroup>
Expand Down
174 changes: 174 additions & 0 deletions eng/pipelines/templates/stages/vmr-build-with-join.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
parameters:
# Stages that build individual verticals
- name: verticalsStages
type: stageList
# Stages that need to run after the final artifacts are determined after joining all verticals.
- name: postJoinStages
type: stageList
default: []
# When we should run the final join stage and the stages that depend on it.
- name: finalJoinCondition
type: boolean

#### sdk parameters ####
- name: isBuiltFromVmr
displayName: True when build is running from dotnet/dotnet directly
type: boolean

- name: vmrBranch
displayName: dotnet/dotnet branch to use
type: string

# These are not expected to be passed it but rather just object variables reused below
- name: pool_Linux
type: object
default:
name: $(defaultPoolName)
image: $(poolImage_Linux)
demands: ImageOverride -equals $(poolImage_Linux)
os: linux

- name: pool_Windows
type: object
default:
name: $(defaultPoolName)
image: $(poolImage_Windows)
demands: ImageOverride -equals $(poolImage_Windows)
os: windows

- name: pool_LinuxArm64
type: object
default:
name: $(poolName_LinuxArm64)
image: $(poolImage_LinuxArm64)
demands: ImageOverride -equals $(poolImage_LinuxArm64)
hostArchitecture: Arm64
os: linux

- name: pool_Mac
type: object
default:
name: Azure Pipelines
vmImage: $(poolImage_Mac)
os: macOS


- name: pool_Linux_Shortstack
type: object
default:
name: $(shortStackPoolName)
image: $(poolImage_Linux)
demands: ImageOverride -equals $(poolImage_Linux)
os: linux

stages:
# Insert all stages that build verticals
# and publish artifacts for each vertical
- ${{ each stage in parameters.verticalsStages }}:
- ${{ insert }}: ${{ stage }}
- ${{ if parameters.finalJoinCondition }}:
# This stage should contain all jobs that take inputs from all verticals and determine the exact final outputs.
- stage: VMR_Final_Join
displayName: 'VMR Final Join'
dependsOn:
- ${{ each stage in parameters.verticalsStages }}:
- ${{ if ne(stage.templateContext.validationOnly, 'true') }}:
- ${{ stage.stage }}
variables:
- ${{ if parameters.isBuiltFromVmr }}:
- name: vmrPath
value: $(Build.SourcesDirectory)
- ${{ else }}:
- name: vmrPath
value: $(Agent.BuildDirectory)/vmr
- template: ../variables/vmr-build.yml
parameters:
vmrBranch: ${{ parameters.vmrBranch }}
jobs:
- job: FinalJoin
displayName: Final Build Pass
pool: ${{ parameters.pool_Windows }}
timeoutInMinutes: 240
templateContext:
outputParentDirectory: $(Build.ArtifactStagingDirectory)/artifacts
inputs:
# Download the artifacts from every job in every vertical stage under VerticalArtifacts
- ${{ each stage in parameters.verticalsStages }}:
- ${{ if ne(stage.templateContext.validationOnly, 'true') }}:
- ${{ each vertical in stage.jobs }}:
- input: pipelineArtifact
path: $(Build.ArtifactStagingDirectory)/VerticalArtifacts/${{ vertical.job }}
artifactName: ${{ vertical.job }}_Artifacts
- input: pipelineArtifact
path: $(Build.ArtifactStagingDirectory)/VerticalManifests
artifactName: VerticalManifests
outputs:
- output: pipelineArtifact
path: $(Build.ArtifactStagingDirectory)/artifacts/MergedManifest.xml
artifact: AssetManifests
displayName: Publish Merged Manifest
sbomEnabled: false
- output: buildArtifacts
PathtoPublish: $(Build.ArtifactStagingDirectory)/artifacts/assets
ArtifactName: BlobArtifacts
displayName: Publish Blob Artifacts
sbomEnabled: false
- output: buildArtifacts
PathtoPublish: $(Build.ArtifactStagingDirectory)/artifacts/packages
ArtifactName: PackageArtifacts
displayName: Publish Package Artifacts
sbomEnabled: false
- output: pipelineArtifact
path: $(Build.ArtifactStagingDirectory)/artifacts/log
artifact: JoinVerticals_BuildLogs_Attempt$(System.JobAttempt)
displayName: Publish Build Logs
sbomEnabled: false
condition: succeededOrFailed()
steps:
- ${{ if ne(variables['System.TeamProject'], 'internal') }}:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only under non-internal?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In internal, we use the 1ES PT inputs above.

I'd love to use those everywhere, but 1ES hasn't responded to my feature request for an "OSS 1ES PT with only the syntax niceties and no internal product validation"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could consider adding some basic inputs/outputs support to an Arcade template so we could at least unify the many places Arcade and other repos have to write the different styles.

- task: DownloadPipelineArtifact@2
displayName: Download asset manifests
inputs:
path: $(Build.ArtifactStagingDirectory)/VerticalManifests
artifactName: VerticalManifests
# Download the artifacts from every job in every vertical stage under VerticalArtifacts
- ${{ each stage in parameters.verticalsStages }}:
- ${{ if ne(stage.templateContext.validationOnly, 'true') }}:
- ${{ each vertical in stage.jobs }}:
- task: DownloadPipelineArtifact@2
displayName: Download Artifacts for ${{ vertical.job }}
inputs:
path: $(Build.ArtifactStagingDirectory)/VerticalArtifacts/${{ vertical.job }}
artifactName: ${{ vertical.job }}_Artifacts
- ${{ if not(parameters.isBuiltFromVmr) }}:
- template: ../steps/vmr-prepare.yml@self
parameters:
${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
vmrBranch: $(System.PullRequest.TargetBranch)
${{ else }}:
vmrBranch: ${{ variables.VmrBranch }}

- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
- template: ../steps/vmr-pull-updates.yml@self
parameters:
vmrPath: ${{ variables.vmrPath }}
vmrBranch: ${{ variables.VmrBranch }}
targetRef: $(Build.SourceVersion) # Synchronize the current sdk commit
- template: ../steps/vmr-join-verticals.yml
parameters:
dotNetBuildPass: final
vmrPath: $(vmrPath)
outputFolder: $(Build.ArtifactStagingDirectory)/artifacts
# Insert all of the post-join stages.
- ${{ each postJoinStage in parameters.postJoinStages }}:
- stage: ${{ postJoinStage.stage }}
${{ each pair in postJoinStage }}:
${{ if notIn(pair.key, 'dependsOn', 'stage') }}:
${{ pair.key }}: ${{ pair.value }}
dependsOn:
# Inject a dependency on the final join stage
- VMR_Final_Join
# add any dependencies provided via root yaml
- ${{ if ne(postJoinStage.dependsOn, '') }}:
- ${{ each dependency in postJoinStage.dependsOn }}:
- ${{ dependency }}
Loading
Loading