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

Include Helix Docker image for test reporting #7584

Closed
wants to merge 3 commits into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ public void VerifyNonEncodedFowardSlashIsConverted()
public void FailOnceThenPass()
{
var target = Path.Combine(Path.GetTempPath(), "my-test-file-123456.snt");

// If we're inside a Helix Docker work item, GetTempPath() is cleaned every execution,
// but the work item's own directory is not (and is writeable from inside Docker), so use it.
if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DOCKER_ENTRYPOINT")))
{
target = Path.Combine(Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD"), "my-test-file-123456.snt");
}

bool exists = File.Exists(target);
if (!exists)
{
Expand Down
2 changes: 2 additions & 0 deletions tests/UnitTests.proj
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
<HelixTargetQueue Include="Debian.9.Amd64"/>
<HelixTargetQueue Include="RedHat.7.Amd64"/>
<HelixTargetQueue Include="Windows.10.Amd64"/>
<HelixTargetQueue Include="(Debian.10.Amd64)ubuntu.1804.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-10-helix-amd64-20210304164434-56c6673"/>
</ItemGroup>

<PropertyGroup Condition=" '$(HelixAccessToken)' == '' ">
Expand All @@ -73,6 +74,7 @@
<HelixTargetQueue Include="Debian.9.Amd64.Open"/>
<HelixTargetQueue Include="RedHat.7.Amd64.Open"/>
<HelixTargetQueue Include="Windows.10.Amd64.Open"/>
<HelixTargetQueue Include="(Debian.10.Amd64.Open)ubuntu.1804.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-10-helix-amd64-20210304164434-56c6673"/>
</ItemGroup>

<PropertyGroup Condition="!$(HelixTargetQueue.StartsWith('Windows'))">
Expand Down