Skip to content
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

Add support for additional DotNetRuntime #7158

Merged
merged 10 commits into from
Mar 31, 2021
Merged
Show file tree
Hide file tree
Changes from 7 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
17 changes: 17 additions & 0 deletions src/Microsoft.DotNet.Helix/Sdk/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,23 @@ Given a local folder `$(TestFolder)` containing `runtests.cmd`, this will run `r
<HelixPostCommands>$(HelixPostCommands);echo 'One Pepperoni Pizza'</HelixPostCommands>
</PropertyGroup>

<!--
Copy link
Member Author

Choose a reason for hiding this comment

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

@MattGal want to review the doc update too?

Copy link
Member

Choose a reason for hiding this comment

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

Looks good, some suggestions:

  • Including additional dotnet correlation payloads -> could be more verbose, e.g. "Optional additional dotnet runtimes or SDKs for correlation payloads"
  • Where your examples say "the specified" it couldn't hurt to have (version that's actually in the example) for clarity.
  • I would put parenthesis around defaults (e.g. "PackageType (defaults to runtime)")

Including additional dotnet correlation payloads
PackageType defaults to runtime
Channel defaults to Current
-->
<ItemGroup>
<!-- Includes the specified dotnet package version/packagetype/channel, using the DotNetCliRuntime -->
<AdditionalDotNetPackage Include="6.0.0-preview.4.21178.6">
<!-- 'sdk', 'runtime' or 'aspnetcore-runtime' -->
<PackageType>runtime</PackageType>
<!-- 'Current' or 'LTS', determines what channel 'latest' version pulls from -->
<Channel>Current</Channel>
</AdditionalDotNetPackage>
<!-- Includes the specified version, using the default runtime packageType, DotNetCliRuntime, and Current channel -->
<AdditionalDotNetPackage Include="6.0.0-preview.4.21175.1" />
</ItemGroup>

<!--
XUnit Runner
Enabling this will create one work item for each xunit test project specified.
Expand Down
23 changes: 23 additions & 0 deletions src/Microsoft.DotNet.Helix/Sdk/tools/dotnet-cli/DotNetCli.targets
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,27 @@
<HelixPreCommands Condition="!$(IsPosixShell)">$(HelixPreCommands);set DOTNET_ROOT=%HELIX_CORRELATION_PAYLOAD%\$(DotNetCliDestination);set DOTNET_CLI_TELEMETRY_OPTOUT=1</HelixPreCommands>
</PropertyGroup>
</Target>

<Target Name="AddAdditionalRuntimes"
Condition="@(AdditionalDotNetPackage->Count()) != 0"
AfterTargets="Build"
Outputs="%(AdditionalDotNetPackage.Identity)">
<PropertyGroup>
<_channel>%(AdditionalDotNetPackage.Channel)</_channel>
<_channel Condition=" '$(_channel)' == '' ">Current</_channel>
<_packageType>%(AdditionalDotNetPackage.PackageType)</_packageType>
<_packageType Condition=" '$(_packageType)' == '' ">runtime</_packageType>
</PropertyGroup>

<Message Text = "Adding correlation payload for additional .NET Core package: Version: '%(AdditionalDotNetPackage.Identity)' Runtime: '$(DotNetCliRuntime)' PackageType: '$(_packageType)' Channel: '$(_channel)' "/>
<FindDotNetCliPackage Version="%(AdditionalDotNetPackage.Identity)" Runtime="$(DotNetCliRuntime)" PackageType="$(_packageType)" Channel="$(_channel)">
<Output TaskParameter="PackageUri" PropertyName="DotNetCliPackageUri"/>
</FindDotNetCliPackage>
<ItemGroup>
<HelixCorrelationPayload Include="dotnet-additional">
<Uri>$(DotNetCliPackageUri)</Uri>
<Destination>$(DotNetCliDestination)</Destination>
</HelixCorrelationPayload>
</ItemGroup>
</Target>
</Project>