-
Notifications
You must be signed in to change notification settings - Fork 756
Build and publish NuGet.Client.EndToEnd.TestData if needed #7459
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
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,10 @@ parameters: | |
| values: | ||
| - Real | ||
| - Test | ||
| - name: PublishEndToEndTestData | ||
| displayName: Publish EndToEnd TestData Package | ||
| type: boolean | ||
| default: false | ||
|
|
||
| stages: | ||
| - stage: Initialize | ||
|
|
@@ -183,11 +187,24 @@ stages: | |
| targetPath: "$(Build.StagingDirectory)/sbom" | ||
| sbomEnabled: false | ||
|
|
||
| # Publishes the generated EndToEnd test data package (and its SBOM) as a pipeline artifact. The | ||
| # NuGet.Client-Release pipeline downloads this artifact and pushes it to the public dnceng nuget-build | ||
| # feed. The package is generated into $(Build.StagingDirectory)\e2etestdata by Build.yml (outside the | ||
| # signed/BAR/product-SBOM artifacts tree). | ||
| - ${{ if eq(parameters.PublishEndToEndTestData, true) }}: | ||
| - output: pipelineArtifact | ||
| displayName: 'Publish EndToEnd TestData package' | ||
| condition: "and(succeeded(), eq(variables['BuildRTM'], 'false'), eq(variables['IsOfficialBuild'], 'true'))" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The runtime |
||
| targetPath: '$(Build.StagingDirectory)\e2etestdata' | ||
| artifactName: 'EndToEndTestData' | ||
| sbomBuildDropPath: '$(Build.StagingDirectory)\e2etestdata' | ||
|
|
||
| steps: | ||
| - template: /eng/pipelines/templates/Build.yml@self | ||
| parameters: | ||
| BuildRTM: false | ||
| SigningType: ${{ parameters.SigningType }} | ||
| PublishEndToEndTestData: ${{ parameters.PublishEndToEndTestData }} | ||
|
|
||
| - stage: Build_For_Publishing | ||
| displayName: Build NuGet published to nuget.org | ||
|
|
@@ -250,6 +267,7 @@ stages: | |
| parameters: | ||
| BuildRTM: true | ||
| SigningType: ${{ parameters.SigningType }} | ||
| PublishEndToEndTestData: ${{ parameters.PublishEndToEndTestData }} | ||
|
|
||
| - ${{ if eq(parameters.isOfficialBuild, true) }}: | ||
| - template: /eng/common/templates-official/post-build/post-build.yml | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
| <package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd"> | ||
| <metadata> | ||
| <id>NuGet.Client.EndToEnd.TestData</id> | ||
| <version>1.0.0</version> | ||
| <version>1.0.3</version> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm trying to understand the publish/consume ordering and could use some help. This PR bumps the central NuGet.Client.EndToEnd.TestData pin to 1.0.3, but as I understand it 1.0.3 only lands in the dnceng nuget-build feed after someone manually queues an official build with PublishEndToEndTestData=true and then runs the companion release pipeline. Meanwhile |
||
| <title>Test data for NuGet.Client EndToEnd tests</title> | ||
| <authors>Microsoft</authors> | ||
| <owners>Microsoft</owners> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <DirectedGraph xmlns="http://schemas.microsoft.com/vs/2009/dgml"> | ||
| <Nodes> | ||
| <Node Id="A:1.0.0" Label="A:1.0.0" /> | ||
| <Node Id="B:1.0.0" Label="B:1.0.0" /> | ||
| </Nodes> | ||
| <Links> | ||
| <Link Source="A:1.0.0" Target="B:1.0.0" /> | ||
| </Links> | ||
| <Properties> | ||
| <Property Id="Label" Label="Label" Description="Displayable label of an Annotatable object" DataType="System.String" /> | ||
| </Properties> | ||
| </DirectedGraph> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, the current design is manually queue an official build, setting the PublishEndToEndTestData parameter to true, then wait for the official build to complete, then run the release pipeline.
It seems to me we could have a single pipeline that both builds and publishes the package, so we don't need to queue two pipelines to perform one outcome.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that would be the easiest way to develop and publish the package. But TBH I don't see us publishing a new package in years, last version is from 2024 and we weren't using it. 1.0.0 is from 2020.
I just don't want to create a new pipeline for something that we might never use, I was thinking maybe Official can do the publishing too, but Official feels more like a build only pipeline.
We were doing something similar when we wanted to publish CommandLine packages, so I was following that.
I think we should choose the way that is easier for the team to maintain and do compliance on the pipeline, either a new one, keep it as two, or maybe even do everything as a new step in release pipeline, maybe we can just build this project and publish.