Skip to content

Commit

Permalink
Publish artifact for docker issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ragavareddychalapala committed Jan 13, 2025
1 parent 11bcece commit 5cf5fb5
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions src/LCT.ArtifactPublisher/Publish.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// --------------------------------------------------------------------------------------------------------------------

using LCT.ArtifactPublisher.Interface;
using System.Runtime.InteropServices;

namespace LCT.ArtifactPublisher
{
Expand Down Expand Up @@ -37,9 +38,17 @@ public Publish(string catoolLogPath, string catoolBomfilePath)
public void UploadLogs()
{
if (!string.IsNullOrEmpty(CatoolLogPath) && File.Exists(CatoolLogPath))
{
{
// Output the artifact upload command
Console.WriteLine($"##vso[artifact.upload containerfolder={LogContainerFolderName};artifactname={LogArtifactFolderName}]{CatoolLogPath}");
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
Console.WriteLine($"##vso[artifact.upload containerfolder={LogContainerFolderName};artifactname={LogArtifactFolderName}]{CatoolLogPath}");
}
else
{
Console.WriteLine($"##vso[artifact.upload containerfolder={LogContainerFolderName};artifactname={LogArtifactFolderName}]{CatoolLogPath}");
}

}
}

Expand All @@ -50,7 +59,15 @@ public void UploadBom()
{
if (!string.IsNullOrEmpty(CatoolBomFilePath) && File.Exists(CatoolBomFilePath))
{
Console.WriteLine($"##vso[artifact.upload containerfolder={BomContainerFolderName};artifactname={BomArtifactFolderName}]{CatoolBomFilePath}");
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
Console.WriteLine($"##vso[artifact.upload containerfolder={BomContainerFolderName};artifactname={BomArtifactFolderName}]{CatoolBomFilePath}");
}
else
{
Console.WriteLine($"##vso[artifact.upload containerfolder={BomContainerFolderName};artifactname={BomArtifactFolderName}]{CatoolBomFilePath}");
}

}
}
}
Expand Down

0 comments on commit 5cf5fb5

Please sign in to comment.