Skip to content

Commit

Permalink
Merge pull request #155 from siemens/Develop_3_18_24
Browse files Browse the repository at this point in the history
Release v6.2.0
  • Loading branch information
karthika-g committed Apr 25, 2024
2 parents 8caa02c + 5df5f67 commit ec8fafc
Show file tree
Hide file tree
Showing 8 changed files with 255,520 additions and 63,448 deletions.
300,840 changes: 242,932 additions & 57,908 deletions ReadmeOSS_continuous-clearing_DockerImage.html

Large diffs are not rendered by default.

18,092 changes: 12,571 additions & 5,521 deletions ReadmeOSS_continuous-clearing_nupkg.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/ArtifactoryUploader/PackageUploadHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ private static void DisplayErrorForJfrogFoundPackages(List<ComponentsToArtifacto

foreach (var jfrogFoundPackage in JfrogFoundPackages)
{
Logger.Info($"Successful{jfrogFoundPackage.DryRunSuffix} {jfrogFoundPackage.OperationType} package {jfrogFoundPackage.PackageName}-{jfrogFoundPackage.Version}" +
Logger.Info($"Successful{jfrogFoundPackage.DryRunSuffix} {jfrogFoundPackage.OperationType} package {jfrogFoundPackage.Name}-{jfrogFoundPackage.Version}" +
$" from {jfrogFoundPackage.SrcRepoName} to {jfrogFoundPackage.DestRepoName}");

if (jfrogFoundPackage.ResponseMessage.ReasonPhrase == ApiConstant.ErrorInUpload)
Expand Down
3 changes: 2 additions & 1 deletion src/ArtifactoryUploader/PackageUploader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@ public static async Task UploadPackageToArtifactory(CommonAppSettings appSetting
fileOperations.WriteContentToFile(m_ComponentsInBOM, bomGenerationPath, FileConstant.BomFileName, appSettings.SW360ProjectName);

// write kpi info to console table
PackageUploadHelper.WriteCreatorKpiDataToConsole(uploaderKpiData);
if (Program.UploaderStopWatch != null)
uploaderKpiData.TimeTakenByComponentCreator =
TimeSpan.FromMilliseconds(Program.UploaderStopWatch.ElapsedMilliseconds).TotalSeconds;
PackageUploadHelper.WriteCreatorKpiDataToConsole(uploaderKpiData);

Logger.Debug($"UploadPackageToArtifactory():End");

// set the error code
Expand Down
9 changes: 3 additions & 6 deletions src/ArtifactoryUploader/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,10 @@ static async Task Main(string[] args)
else
Logger.Logger.Log(null, Level.Alert, $"Artifactory Uploader is running in dry-run mode, no packages will be moved \n", null);



Logger.Logger.Log(null, Level.Info, $"Input Parameters used in Artifactory Uploader:\n\t", null);
Logger.Logger.Log(null, Level.Notice, $"\tBomFilePath:\t\t {appSettings.BomFilePath}\n\t" +
Logger.Logger.Log(null, Level.Notice, $"\tBomFilePath:\t\t {appSettings.BomFilePath}\n\t" +
$"JFrogUrl:\t\t {appSettings.JFrogApi}\n\t" +
$"Artifactory User:\t {appSettings.ArtifactoryUploadUser}\n\t" +
$"Artifactory Token:\t {appSettings.ArtifactoryUploadApiKey}\n\t" +
$"Release:\t\t {appSettings.Release}\n\t" +
$"LogFolderPath:\t\t {Path.GetFullPath(FolderPath)}\n", null);

Expand All @@ -69,14 +66,14 @@ static async Task Main(string[] args)
ApiKey = appSettings.ArtifactoryUploadApiKey,
Email = appSettings.ArtifactoryUploadUser
};
NpmJfrogApiCommunication jfrogCommunication = new NpmJfrogApiCommunication(appSettings.JFrogApi, appSettings.JfrogNpmSrcRepo, artifactoryCredentials,appSettings.TimeOut);
NpmJfrogApiCommunication jfrogCommunication = new NpmJfrogApiCommunication(appSettings.JFrogApi, appSettings.JfrogNpmSrcRepo, artifactoryCredentials, appSettings.TimeOut);
ArtifactoryValidator artifactoryValidator = new(jfrogCommunication);
await artifactoryValidator.ValidateArtifactoryCredentials(appSettings);

//Uploading Package to artifactory
PackageUploadHelper.jFrogService = GetJfrogService(appSettings);
await PackageUploader.UploadPackageToArtifactory(appSettings);


Logger.Logger.Log(null, Level.Notice, $"End of Artifactory Uploader execution : {DateTime.Now}\n", null);
}
Expand Down
7 changes: 7 additions & 0 deletions src/LCT.PackageIdentifier/Scanner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ public static List<string> FileScanner(string rootPath, Config config)
}
}
}

if (allFoundConfigFiles.Count == 0)
{
Logger.Error("Provided package file path do not contain valid input files.");
Environment.Exit(-1);
}

Logger.Logger.Log(null, Level.Notice, $"\n----------------------------------------------------", null);
return allFoundConfigFiles;

Expand Down
4 changes: 0 additions & 4 deletions src/LCT.SW360PackageCreator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ static async Task Main(string[] args)

Logger.Logger.Log(null, Level.Notice, $"\n====================<<<<< Package creator >>>>>====================", null);
Logger.Logger.Log(null, Level.Notice, $"\nStart of Package creator execution : {DateTime.Now}", null);
if (appSettings.ProjectType?.ToUpperInvariant() == "ALPINE")
{
Logger.Error($"\nPlease note that the Alpine feature is currently in preview state. This means it's available for testing and evaluation purposes. While functional, it may not yet include all planned features and could encounter occasional issues. Your feedback during this preview phase is appreciated as we work towards its official release. Thank you for exploring Alpine with us.");
}

if (appSettings.IsTestMode)
Logger.Logger.Log(null, Level.Alert, $"Package creator is running in TEST mode \n", null);
Expand Down
11 changes: 4 additions & 7 deletions src/LCT.Services/Sw360Service.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,9 @@ public async Task<List<Components>> GetAvailableReleasesInSw360(List<Components>
{
Sw360ServiceStopWatch.Start();
string responseBody = await m_SW360ApiCommunicationFacade.GetReleases();

if(string.IsNullOrWhiteSpace(responseBody))
if (string.IsNullOrWhiteSpace(responseBody))
{
Logger.Debug($"GetAvailableReleasesInSw360():");
Logger.Error("SW360 server is not accessible,Please wait for sometime and re run the pipeline again");
Environment.ExitCode = -1;
Logger.Warn("Available release list found empty from the SW360 Server!");
}

Sw360ServiceStopWatch.Stop();
Expand All @@ -82,13 +79,13 @@ public async Task<List<Components>> GetAvailableReleasesInSw360(List<Components>
{
Logger.Debug($"GetAvailableReleasesInSw360():", ex);
Logger.Error("SW360 server is not accessible,Please wait for sometime and re run the pipeline again");
Environment.ExitCode = -1;
Environment.Exit(-1);
}
catch (InvalidOperationException ex)
{
Logger.Debug($"GetAvailableReleasesInSw360():", ex);
Logger.Error("SW360 server is not accessible,Please wait for sometime and re run the pipeline again");
Environment.ExitCode = -1;
Environment.Exit(-1);
}

return availableComponentsList;
Expand Down

0 comments on commit ec8fafc

Please sign in to comment.