Skip to content

Commit ec8fafc

Browse files
authored
Merge pull request #155 from siemens/Develop_3_18_24
Release v6.2.0
2 parents 8caa02c + 5df5f67 commit ec8fafc

File tree

8 files changed

+255520
-63448
lines changed

8 files changed

+255520
-63448
lines changed

ReadmeOSS_continuous-clearing_DockerImage.html

+242,932-57,908
Large diffs are not rendered by default.

ReadmeOSS_continuous-clearing_nupkg.html

+12,571-5,521
Large diffs are not rendered by default.

src/ArtifactoryUploader/PackageUploadHelper.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ private static void DisplayErrorForJfrogFoundPackages(List<ComponentsToArtifacto
173173

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

179179
if (jfrogFoundPackage.ResponseMessage.ReasonPhrase == ApiConstant.ErrorInUpload)

src/ArtifactoryUploader/PackageUploader.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,11 @@ public static async Task UploadPackageToArtifactory(CommonAppSettings appSetting
6161
fileOperations.WriteContentToFile(m_ComponentsInBOM, bomGenerationPath, FileConstant.BomFileName, appSettings.SW360ProjectName);
6262

6363
// write kpi info to console table
64-
PackageUploadHelper.WriteCreatorKpiDataToConsole(uploaderKpiData);
6564
if (Program.UploaderStopWatch != null)
6665
uploaderKpiData.TimeTakenByComponentCreator =
6766
TimeSpan.FromMilliseconds(Program.UploaderStopWatch.ElapsedMilliseconds).TotalSeconds;
67+
PackageUploadHelper.WriteCreatorKpiDataToConsole(uploaderKpiData);
68+
6869
Logger.Debug($"UploadPackageToArtifactory():End");
6970

7071
// set the error code

src/ArtifactoryUploader/Program.cs

+3-6
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,10 @@ static async Task Main(string[] args)
5353
else
5454
Logger.Logger.Log(null, Level.Alert, $"Artifactory Uploader is running in dry-run mode, no packages will be moved \n", null);
5555

56-
57-
5856
Logger.Logger.Log(null, Level.Info, $"Input Parameters used in Artifactory Uploader:\n\t", null);
59-
Logger.Logger.Log(null, Level.Notice, $"\tBomFilePath:\t\t {appSettings.BomFilePath}\n\t" +
57+
Logger.Logger.Log(null, Level.Notice, $"\tBomFilePath:\t\t {appSettings.BomFilePath}\n\t" +
6058
$"JFrogUrl:\t\t {appSettings.JFrogApi}\n\t" +
6159
$"Artifactory User:\t {appSettings.ArtifactoryUploadUser}\n\t" +
62-
$"Artifactory Token:\t {appSettings.ArtifactoryUploadApiKey}\n\t" +
6360
$"Release:\t\t {appSettings.Release}\n\t" +
6461
$"LogFolderPath:\t\t {Path.GetFullPath(FolderPath)}\n", null);
6562

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

7673
//Uploading Package to artifactory
7774
PackageUploadHelper.jFrogService = GetJfrogService(appSettings);
7875
await PackageUploader.UploadPackageToArtifactory(appSettings);
79-
76+
8077

8178
Logger.Logger.Log(null, Level.Notice, $"End of Artifactory Uploader execution : {DateTime.Now}\n", null);
8279
}

src/LCT.PackageIdentifier/Scanner.cs

+7
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ public static List<string> FileScanner(string rootPath, Config config)
6262
}
6363
}
6464
}
65+
66+
if (allFoundConfigFiles.Count == 0)
67+
{
68+
Logger.Error("Provided package file path do not contain valid input files.");
69+
Environment.Exit(-1);
70+
}
71+
6572
Logger.Logger.Log(null, Level.Notice, $"\n----------------------------------------------------", null);
6673
return allFoundConfigFiles;
6774

src/LCT.SW360PackageCreator/Program.cs

-4
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@ static async Task Main(string[] args)
5555

5656
Logger.Logger.Log(null, Level.Notice, $"\n====================<<<<< Package creator >>>>>====================", null);
5757
Logger.Logger.Log(null, Level.Notice, $"\nStart of Package creator execution : {DateTime.Now}", null);
58-
if (appSettings.ProjectType?.ToUpperInvariant() == "ALPINE")
59-
{
60-
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.");
61-
}
6258

6359
if (appSettings.IsTestMode)
6460
Logger.Logger.Log(null, Level.Alert, $"Package creator is running in TEST mode \n", null);

src/LCT.Services/Sw360Service.cs

+4-7
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,9 @@ public async Task<List<Components>> GetAvailableReleasesInSw360(List<Components>
5959
{
6060
Sw360ServiceStopWatch.Start();
6161
string responseBody = await m_SW360ApiCommunicationFacade.GetReleases();
62-
63-
if(string.IsNullOrWhiteSpace(responseBody))
62+
if (string.IsNullOrWhiteSpace(responseBody))
6463
{
65-
Logger.Debug($"GetAvailableReleasesInSw360():");
66-
Logger.Error("SW360 server is not accessible,Please wait for sometime and re run the pipeline again");
67-
Environment.ExitCode = -1;
64+
Logger.Warn("Available release list found empty from the SW360 Server!");
6865
}
6966

7067
Sw360ServiceStopWatch.Stop();
@@ -82,13 +79,13 @@ public async Task<List<Components>> GetAvailableReleasesInSw360(List<Components>
8279
{
8380
Logger.Debug($"GetAvailableReleasesInSw360():", ex);
8481
Logger.Error("SW360 server is not accessible,Please wait for sometime and re run the pipeline again");
85-
Environment.ExitCode = -1;
82+
Environment.Exit(-1);
8683
}
8784
catch (InvalidOperationException ex)
8885
{
8986
Logger.Debug($"GetAvailableReleasesInSw360():", ex);
9087
Logger.Error("SW360 server is not accessible,Please wait for sometime and re run the pipeline again");
91-
Environment.ExitCode = -1;
88+
Environment.Exit(-1);
9289
}
9390

9491
return availableComponentsList;

0 commit comments

Comments
 (0)