Skip to content
Closed
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
9 changes: 9 additions & 0 deletions eng/pipelines/templates/Build_and_UnitTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,15 @@ steps:
msbuildArguments: "/t:EnsurePackagesExist /p:ExcludeTestProjects=$(BuildRTM)"
condition: and(succeeded(), or(eq(variables['IsOfficialBuild'], 'true'), eq(variables['BuildRTM'], 'true'))) #skip this task for nonRTM in private build

# The list of nupkgs in the script might change, so we publish it as artifact, in order to make sure release pipeline check the right list.
- task: PublishBuildArtifacts@1
displayName: "Publish EnsureAllPackagesExist script"
inputs:
PathtoPublish: "$(Build.Repository.LocalPath)\\scripts\\utils\\EnsureAllPackagesExist.ps1"
ArtifactName: "Scripts"
ArtifactType: "Container"
condition: "and(succeeded(),eq(variables['BuildRTM'], 'false'))"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
condition: "and(succeeded(),eq(variables['BuildRTM'], 'false'))"
condition: "and(succeeded(), eq(variables['BuildRTM'], 'false'))"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for reviewing!
I investigated the other way of getting script from a specific commit hash and it should be workable.
We can either get commit hash from the variable you mentioned above, or from the buildinfo.json
Then according to getting-permanent-links-to-files, we can reference it like: https://github.com/NuGet/NuGet.Client/blob/18863da5be3dc8c7315f4416df1bc9ef96cb7446/scripts/utils/EnsureAllPackagesExist.ps1

Comparing the two ways, there is no difference for future builds.
For servicing old branches without the script EnsureAllPackagesExist.ps1, it looks like it's a difference of cherry-picking one commit or two commits. Any thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

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

I lean towards using commit hash to read EnsureAllPackagesExist.ps1 file instead of publishing the script as a build artifact.


- task: MSBuild@1
displayName: "Pack VSIX"
inputs:
Expand Down