From 49234233fb9075e59060ff0502b884a268d6b3e1 Mon Sep 17 00:00:00 2001 From: Chalapala RaghavendraReddy Date: Wed, 10 Jul 2024 15:34:10 +0530 Subject: [PATCH 1/2] Updated artifactoryuploader files and updated testcases --- .../ArtifactoryUTTestFiles/ComparisonBOM.json | 6 - .../ArtifactoryUTTestFiles/CyclonedxBom.json | 882 +++++++----------- .../PackageUploadHelperTest.cs | 20 +- .../PackageUploaderTest.cs | 12 +- 4 files changed, 356 insertions(+), 564 deletions(-) diff --git a/src/AritfactoryUploader.UTest/ArtifactoryUTTestFiles/ComparisonBOM.json b/src/AritfactoryUploader.UTest/ArtifactoryUTTestFiles/ComparisonBOM.json index 4d4d3c0b..1a00b85f 100644 --- a/src/AritfactoryUploader.UTest/ArtifactoryUTTestFiles/ComparisonBOM.json +++ b/src/AritfactoryUploader.UTest/ArtifactoryUTTestFiles/ComparisonBOM.json @@ -1,9 +1,3 @@ -// -------------------------------------------------------------------------------------------------------------------- -// SPDX-FileCopyrightText: 2024 Siemens AG -// -// SPDX-License-Identifier: MIT - -// -------------------------------------------------------------------------------------------------------------------- { "BomFormat": "CycloneDX", "SpecVersion": 4, diff --git a/src/AritfactoryUploader.UTest/ArtifactoryUTTestFiles/CyclonedxBom.json b/src/AritfactoryUploader.UTest/ArtifactoryUTTestFiles/CyclonedxBom.json index 0c40696c..a333c47e 100644 --- a/src/AritfactoryUploader.UTest/ArtifactoryUTTestFiles/CyclonedxBom.json +++ b/src/AritfactoryUploader.UTest/ArtifactoryUTTestFiles/CyclonedxBom.json @@ -1,648 +1,446 @@ -// -------------------------------------------------------------------------------------------------------------------- -// SPDX-FileCopyrightText: 2024 Siemens AG -// -// SPDX-License-Identifier: MIT - -// -------------------------------------------------------------------------------------------------------------------- { - "BomFormat": "CycloneDX", - "SpecVersion": 4, - "SpecVersionString": "1.4", - "SerialNumber": null, - "Version": null, - "Metadata": { - "Tools": [ + "bomFormat": "CycloneDX", + "specVersion": "1.4", + "serialNumber": "urn:uuid:c4c04a17-1eae-4088-b241-fb02a48524bd", + "version": 1, + "metadata": { + "timestamp": "2024-06-27T17:43:26Z", + "tools": [ { - "Vendor": "Siemens AG", - "Name": "Clearing Automation Tool", - "Version": "1.0.17", - "Hashes": null + "vendor": "Siemens AG", + "name": "Clearing Automation Tool", + "version": "6.1.0", + "externalReferences": [ + { + "url": "https://github.com/siemens/continuous-clearing", + "type": "website" + } + ] + }, + { + "vendor": "Siemens AG", + "name": "Siemens SBOM", + "version": "2.0.0", + "externalReferences": [ + { + "url": "https://sbom.siemens.io/", + "type": "website" + } + ] } ], - "Authors": null, - "Component": null, - "Manufacture": null, - "Supplier": null - }, - "Components": [ - { - "Type": 0, - "MimeType": null, - "BomRef": "pkg:npm/%40angular/animations@11.0.4", - "Supplier": null, - "Author": null, - "Publisher": null, - "Group": "@angular", - "Name": "animations", - "Version": "11.0.4", - "Description": null, - "Scope": null, - "Hashes": null, - "Licenses": null, - "Copyright": null, - "Cpe": null, - "Purl": "pkg:npm/%40angular/animations@11.0.4", - "Swid": null, - "Modified": null, - "Pedigree": null, - "Components": null, - "Properties": [ - { - "Name": "internal:siemens:clearing:is-internal", - "Value": "false" - - }, - { - "Name": "internal:siemens:clearing:repo-name", - "Value": "org1-npmjs-npm-remote" - }, - { - "Name": "internal:siemens:clearing:project-type", - "Value": "Npm" - }, - { - "Name": "internal:siemens:clearing:clearing-state", - "Value": "APPROVED" - - }, - { - "Name": "internal:siemens:clearing:sw360:release-url", - "Value": "false" - - }, - { - "Name": "internal:siemens:clearing:fossology:url", - "Value": "" - - } - ], - "Evidence": null - }, - { - "Type": 0, - "MimeType": null, - "BomRef": "pkg:npm/%40angular/cdk@11.2.4", - "Supplier": null, - "Author": null, - "Publisher": null, - "Group": "@angular", - "Name": "cdk", - "Version": "11.2.4", - "Description": null, - "Scope": null, - "Hashes": null, - "Licenses": null, - "Copyright": null, - "Cpe": null, - "Purl": "pkg:npm/%40angular/cdk@11.2.4", - "Swid": null, - "Modified": null, - "Pedigree": null, - "Components": null, - "Properties": [ - { - "Name": "internal:siemens:clearing:is-internal", - "Value": "true" - }, - { - "Name": "internal:siemens:clearing:repo-name", - "Value": "Not Found in JFrog" - }, - { - "Name": "internal:siemens:clearing:project-type", - "Value": "Npm" - }, - { - "Name": "internal:siemens:clearing:sw360:release-url", - "Value": "false" - - }, - { - "Name": "internal:siemens:clearing:fossology:url", - "Value": "false" - - } - ], - "Evidence": null + "component": { + "type": "application", + "name": "Test", + "version": "1.0" }, + "properties": [ + { + "name": "siemens:profile", + "value": "clearing" + } + ] + }, + "components": [ { - "Type": 0, - "MimeType": null, - "BomRef": "pkg:npm/%40angular/cdk@11.2.4", - "Supplier": null, - "Author": null, - "Publisher": null, - "Group": "@angular", - "Name": "cdk", - "Version": "11.2.4", - "Description": null, - "Scope": null, - "Hashes": null, - "Licenses": null, - "Copyright": null, - "Cpe": null, - "Purl": "pkg:npm/%40angular/cdk@11.2.4", - "Swid": null, - "Modified": null, - "Pedigree": null, - "Components": null, - "Properties": [ - { - "Name": "internal:siemens:clearing:is-internal", - "Value": "true" - }, - { - "Name": "internal:siemens:clearing:repo-name", - "Value": "Not Found in JFrog" - }, - { - "Name": "internal:siemens:clearing:project-type", - "Value": "Npm" - }, - { - "Name": "internal:siemens:clearing:sw360:release-url", - "Value": "false" - - }, - { - "Name": "internal:siemens:clearing:fossology:url", - "Value": "false" - + "type": "null", + "bom-ref": "pkg:npm/rxjs@6.5.4", + "name": "rxjs", + "version": "6.5.4", + "hashes": [ + { + "alg": "MD5", + "content": "7e5417640d342584fabde8ade0ab0383" + }, + { + "alg": "SHA-1", + "content": "e0777fe0d184cec7872df147f303572d414e211c" + }, + { + "alg": "SHA-256", + "content": "829ca3b450a7f687704421d0783f40727d335d4f51f411be6350b3297c91bfa9" } ], - "Evidence": null - }, - { - "Type": 0, - "MimeType": null, - "BomRef": "pkg:npm/%40angular/cdk@11.2.4", - "Supplier": null, - "Author": null, - "Publisher": null, - "Group": "@angular", - "Name": "cdk", - "Version": "11.2.4", - "Description": null, - "Scope": null, - "Hashes": null, - "Licenses": null, - "Copyright": null, - "Cpe": null, - "Purl": "pkg:npm/%40angular/cdk@11.2.4", - "Swid": null, - "Modified": null, - "Pedigree": null, - "Components": null, - "Properties": [ - { - "Name": "internal:siemens:clearing:development", - "Value": "true" - }, - { - "Name": "internal:siemens:clearing:is-internal", - "Value": "false" - }, - { - "Name": "internal:siemens:clearing:repo-name", - "Value": "Not Found in JFrog" - }, - { - "Name": "internal:siemens:clearing:project-type", - "Value": "Npm" - }, - { - "Name": "internal:siemens:clearing:sw360:release-url", - "Value": "false" - - }, - { - "Name": "internal:siemens:clearing:fossology:url", - "Value": "false" - - } - ], - "Evidence": null - }, - { - "Type": 0, - "MimeType": null, - "BomRef": "pkg:npm/%40angular/cdk@11.2.4", - "Supplier": null, - "Author": null, - "Publisher": null, - "Group": "@angular", - "Name": "cdk", - "Version": "11.2.4", - "Description": null, - "Scope": null, - "Hashes": null, - "Licenses": null, - "Copyright": null, - "Cpe": null, - "Purl": "pkg:npm/%40angular/cdk@11.2.4", - "Swid": null, - "Modified": null, - "Pedigree": null, - "Components": null, - "Properties": [ - { - "Name": "internal:siemens:clearing:development", - "Value": "true" - }, - { - "Name": "internal:siemens:clearing:is-internal", - "Value": "false" - }, - { - "Name": "internal:siemens:clearing:repo-name", - "Value": "Not Found in JFrog" - }, - { - "Name": "internal:siemens:clearing:project-type", - "Value": "Npm" - }, - { - "Name": "internal:siemens:clearing:sw360:release-url", - "Value": "false" - - }, - { - "Name": "internal:siemens:clearing:fossology:url", - "Value": "" - - } - ], - "Evidence": null - }, - { - "Type": 0, - "MimeType": null, - "BomRef": "pkg:npm/%40angular/cdk@11.2.4", - "Supplier": null, - "Author": null, - "Publisher": null, - "Group": "@angular", - "Name": "cdk", - "Version": "11.2.4", - "Description": null, - "Scope": null, - "Hashes": null, - "Licenses": null, - "Copyright": null, - "Cpe": null, - "Purl": "pkg:npm/%40angular/cdk@11.2.4", - "Swid": null, - "Modified": null, - "Pedigree": null, - "Components": null, - "Properties": [ + "purl": "pkg:npm/rxjs@6.5.4", + "properties": [ + { + "name": "internal:siemens:clearing:development", + "value": "false" + }, { - "Name": "internal:siemens:clearing:is-internal", - "Value": "false" + "name": "internal:siemens:clearing:identifier-type", + "value": "Discovered" }, { - "Name": "internal:siemens:clearing:repo-name", - "Value": "Not Found in JFrog" + "name": "internal:siemens:clearing:is-internal", + "value": "false" }, { - "Name": "internal:siemens:clearing:project-type", - "Value": "Npm" + "name": "internal:siemens:clearing:repo-name", + "value": "siparty-release-npm-egll" }, { - "Name": "internal:siemens:clearing:clearing-state", - "Value": "APPROVED" - + "name": "internal:siemens:clearing:project-type", + "value": "NPM" }, { - "Name": "internal:siemens:clearing:sw360:release-url", - "Value": "false" - + "name": "internal:siemens:clearing:siemens:filename", + "value": "rxjs-6.5.4.tgz" }, { - "Name": "internal:siemens:clearing:fossology:url", - "Value": "" - + "name": "internal:siemens:clearing:jfrog-repo-path", + "value": "siparty-release-npm-egll/rxjs/-/rxjs-6.5.4.tgz" } - ], - "Evidence": null + ] }, { - "Type": 0, - "MimeType": null, - "BomRef": "pkg:npm/%40angular/cdk@11.2.4", - "Supplier": null, - "Author": null, - "Publisher": null, - "Group": "@angular", - "Name": "cdk", - "Version": "11.2.4", - "Description": null, - "Scope": null, - "Hashes": null, - "Licenses": null, - "Copyright": null, - "Cpe": null, - "Purl": "pkg:npm/%40angular/cdk@11.2.4", - "Swid": null, - "Modified": null, - "Pedigree": null, - "Components": null, - "Properties": [ + "type": "null", + "bom-ref": "pkg:npm/%40angular-devkit/architect@0.901.10", + "group": "@angular-devkit", + "name": "architect", + "version": "0.901.10", + "hashes": [ { - "Name": "internal:siemens:clearing:is-internal", - "Value": "false" + "alg": "MD5", + "content": "fc292491b7982bb870beb6e5236ffbfd" }, { - "Name": "internal:siemens:clearing:repo-name", - "Value": "Not Found in JFrog" + "alg": "SHA-1", + "content": "46d896124bed90df71e06d04d610d9d1d9c4f249" }, { - "Name": "internal:siemens:clearing:project-type", - "Value": "Npm" - }, + "alg": "SHA-256", + "content": "930d09760e21da073f86e0e7dd1dc3b1b02a7ddaba2ae9075d1b1ca627aa43ae" + } + ], + "purl": "pkg:npm/%40angular-devkit/architect@0.901.10", + "properties": [ { - "Name": "internal:siemens:clearing:clearing-state", - "Value": "APPROVED" - + "name": "internal:siemens:clearing:development", + "value": "false" }, { - "Name": "internal:siemens:clearing:sw360:release-url", - "Value": "false" - + "name": "internal:siemens:clearing:identifier-type", + "value": "Discovered" }, { - "Name": "internal:siemens:clearing:fossology:url", - "Value": "" - - } - ], - "Evidence": null - }, - { - "Type": 0, - "MimeType": null, - "BomRef": "pkg:npm/%40angular/cdk@11.2.4", - "Supplier": null, - "Author": null, - "Publisher": null, - "Group": "@angular", - "Name": "cdk", - "Version": "11.2.4", - "Description": null, - "Scope": null, - "Hashes": null, - "Licenses": null, - "Copyright": null, - "Cpe": null, - "Purl": "pkg:npm/%40angular/cdk@11.2.4", - "Swid": null, - "Modified": null, - "Pedigree": null, - "Components": null, - "Properties": [ + "name": "internal:siemens:clearing:is-internal", + "value": "false" + }, { - "Name": "internal:siemens:clearing:is-internal", - "Value": "false" + "name": "internal:siemens:clearing:repo-name", + "value": "org1-npmjs-npm-remote-cache" }, { - "Name": "internal:siemens:clearing:repo-name", - "Value": "Not Found in JFrog" + "name": "internal:siemens:clearing:project-type", + "value": "NPM" }, { - "Name": "internal:siemens:clearing:project-type", - "Value": "Npm" + "name": "internal:siemens:clearing:siemens:filename", + "value": "architect-0.901.10.tgz" }, { - "Name": "internal:siemens:clearing:clearing-state", - "Value": "APPROVED" - + "name": "internal:siemens:clearing:jfrog-repo-path", + "value": "org1-npmjs-npm-remote-cache/@angular-devkit/architect/-/architect-0.901.10.tgz" + } + ] + }, + { + "type": "null", + "bom-ref": "pkg:npm/%40angular-devkit/build-angular@0.901.10", + "group": "@angular-devkit", + "name": "build-angular", + "version": "0.901.10", + "hashes": [ + { + "alg": "MD5", + "content": "b0781392c58ab4536dd4d9cbb46ea08c" }, { - "Name": "internal:siemens:clearing:sw360:release-url", - "Value": "false" - + "alg": "SHA-1", + "content": "1107c09019b849e96873de9764d76a6b5c82eb09" }, { - "Name": "internal:siemens:clearing:fossology:url", - "Value": "false" - + "alg": "SHA-256", + "content": "a552f007f34a5761fd2140686b8e05e87167485d77ef3b175f82abb6baf6979a" } ], - "Evidence": null - }, - { - "Type": 0, - "MimeType": null, - "BomRef": "pkg:npm/%40angular/cdk@11.2.4", - "Supplier": null, - "Author": null, - "Publisher": null, - "Group": "@angular", - "Name": "cdk", - "Version": "11.2.4", - "Description": null, - "Scope": null, - "Hashes": null, - "Licenses": null, - "Copyright": null, - "Cpe": null, - "Purl": "pkg:npm/%40angular/cdk@11.2.4", - "Swid": null, - "Modified": null, - "Pedigree": null, - "Components": null, - "Properties": [ + "purl": "pkg:npm/%40angular-devkit/build-angular@0.901.10", + "properties": [ + { + "name": "internal:siemens:clearing:development", + "value": "true" + }, { - "Name": "internal:siemens:clearing:is-internal", - "Value": "false" + "name": "internal:siemens:clearing:identifier-type", + "value": "Discovered" }, { - "Name": "internal:siemens:clearing:repo-name", - "Value": "Not Found in JFrog" + "name": "internal:siemens:clearing:is-internal", + "value": "false" }, { - "Name": "internal:siemens:clearing:project-type", - "Value": "Npm" + "name": "internal:siemens:clearing:repo-name", + "value": "org1-npmjs-npm-remote-cache" }, { - "Name": "internal:siemens:clearing:clearing-state", - "Value": "APPROVED" - + "name": "internal:siemens:clearing:project-type", + "value": "NPM" }, { - "Name": "internal:siemens:clearing:sw360:release-url", - "Value": "false" - + "name": "internal:siemens:clearing:siemens:filename", + "value": "build-angular-0.901.10.tgz" }, { - "Name": "internal:siemens:clearing:fossology:url", - "Value": "false" - + "name": "internal:siemens:clearing:jfrog-repo-path", + "value": "org1-npmjs-npm-remote-cache/@angular-devkit/build-angular/-/build-angular-0.901.10.tgz" } - ], - "Evidence": null + ] }, { - "Type": 0, - "MimeType": null, - "BomRef": "pkg:npm/%40angular/cdk@11.2.4", - "Supplier": null, - "Author": null, - "Publisher": null, - "Group": "@angular", - "Name": "cdk", - "Version": "11.2.4", - "Description": null, - "Scope": null, - "Hashes": null, - "Licenses": null, - "Copyright": null, - "Cpe": null, - "Purl": "pkg:npm/%40angular/cdk@11.2.4", - "Swid": null, - "Modified": null, - "Pedigree": null, - "Components": null, - "Properties": [ + "type": "null", + "bom-ref": "pkg:npm/tslib@1.11.1", + "name": "tslib", + "version": "1.11.1", + "hashes": [ + { + "alg": "MD5", + "content": "adc159b34ac38e30815f8c632759531e" + }, { - "Name": "internal:siemens:clearing:is-internal", - "Value": "false" + "alg": "SHA-1", + "content": "eb15d128827fbee2841549e171f45ed338ac7e35" }, { - "Name": "internal:siemens:clearing:repo-name", - "Value": "Not Found in JFrog" + "alg": "SHA-256", + "content": "7095b4b5fe8fe827acbf6ebe53dc44129f887b56d1bf85ee99331729d36b2fed" + } + ], + "purl": "pkg:npm/tslib@1.11.1", + "properties": [ + { + "name": "internal:siemens:clearing:development", + "value": "true" }, { - "Name": "internal:siemens:clearing:project-type", - "Value": "Npm" + "name": "internal:siemens:clearing:identifier-type", + "value": "Discovered" }, { - "Name": "internal:siemens:clearing:clearing-state", - "Value": "APPROVED" - + "name": "internal:siemens:clearing:is-internal", + "value": "false" }, { - "Name": "internal:siemens:clearing:sw360:release-url", - "Value": "false" - + "name": "internal:siemens:clearing:repo-name", + "value": "siparty-release-npm-egll" }, { - "Name": "internal:siemens:clearing:fossology:url", - "Value": "false" - + "name": "internal:siemens:clearing:project-type", + "value": "NPM" + }, + { + "name": "internal:siemens:clearing:siemens:filename", + "value": "tslib-1.11.1.tgz" + }, + { + "name": "internal:siemens:clearing:jfrog-repo-path", + "value": "siparty-release-npm-egll/tslib/-/tslib-1.11.1.tgz" } - ], - "Evidence": null + ] }, { - "Type": 0, - "MimeType": null, - "BomRef": "pkg:npm/%40angular/cdk@11.2.4", - "Supplier": null, - "Author": null, - "Publisher": null, - "Group": "@angular", - "Name": "cdk", - "Version": "11.2.4", - "Description": null, - "Scope": null, - "Hashes": null, - "Licenses": null, - "Copyright": null, - "Cpe": null, - "Purl": "pkg:npm/%40angular/cdk@11.2.4", - "Swid": null, - "Modified": null, - "Pedigree": null, - "Components": null, - "Properties": [ + "type": "null", + "bom-ref": "pkg:npm/typescript@3.6.5", + "name": "typescript", + "version": "3.6.5", + "hashes": [ + { + "alg": "MD5", + "content": "de646164a79cffa78f120e359f494d2a" + }, + { + "alg": "SHA-1", + "content": "dae20114a7b4ff4bd642db9c8c699f2953e8bbdb" + }, + { + "alg": "SHA-256", + "content": "4a46a4ae2885548f53120c8fdb747fbddfb53cc9916f25dd944594b0b931e1b2" + } + ], + "purl": "pkg:npm/typescript@3.6.5", + "properties": [ { - "Name": "internal:siemens:clearing:is-internal", - "Value": "false" + "name": "internal:siemens:clearing:development", + "value": "true" }, { - "Name": "internal:siemens:clearing:repo-name", - "Value": "Not Found in JFrog" + "name": "internal:siemens:clearing:identifier-type", + "value": "Discovered" }, { - "Name": "internal:siemens:clearing:project-type", - "Value": "Npm" + "name": "internal:siemens:clearing:is-internal", + "value": "false" }, { - "Name": "internal:siemens:clearing:clearing-state", - "Value": "APPROVED" - + "name": "internal:siemens:clearing:repo-name", + "value": "org1-npmjs-npm-remote-cache" }, { - "Name": "internal:siemens:clearing:sw360:release-url", - "Value": "false" - + "name": "internal:siemens:clearing:project-type", + "value": "NPM" }, { - "Name": "internal:siemens:clearing:fossology:url", - "Value": "false" - + "name": "internal:siemens:clearing:siemens:filename", + "value": "typescript-3.6.5.tgz" + }, + { + "name": "internal:siemens:clearing:jfrog-repo-path", + "value": "org1-npmjs-npm-remote-cache/typescript/-/typescript-3.6.5.tgz" } - ], - "Evidence": null + ] }, { - "Type": 0, - "MimeType": null, - "BomRef": "pkg:conan/protobuf@3.21.9", - "Supplier": null, - "Author": null, - "Publisher": null, - "Group": null, - "Name": "protobuf", - "Version": "3.21.9", - "Description": "", - "Scope": null, - "Hashes": null, - "Licenses": null, - "Copyright": null, - "Cpe": null, - "Purl": "pkg:conan/protobuf@3.21.9", - "Swid": null, - "Modified": null, - "Pedigree": null, - "Components": null, - "Properties": [ + "type": "null", + "bom-ref": "pkg:npm/%40angular-devkit/build-optimizer@0.901.10", + "group": "@angular-devkit", + "name": "build-optimizer", + "version": "0.901.10", + "hashes": [ { - "Name": "internal:siemens:clearing:development", - "Value": "false" + "alg": "MD5", + "content": "c2064396d44033ce1678c01da61a2b82" }, { - "Name": "internal:siemens:clearing:identifier-type", - "Value": "Discovered" + "alg": "SHA-1", + "content": "5e6163b4f7a1bb6df9793e0a1c9ccdaf5b0cc8b8" + }, + { + "alg": "SHA-256", + "content": "eea594078a98186b755adce656046cb02b0a4578d7927066e2a2cf4fe6b7c558" + } + ], + "purl": "pkg:npm/%40angular-devkit/build-optimizer@0.901.10", + "properties": [ + { + "name": "internal:siemens:clearing:development", + "value": "true" }, { - "Name": "internal:siemens:clearing:is-internal", - "Value": "false" + "name": "internal:siemens:clearing:identifier-type", + "value": "Discovered" }, { - "Name": "internal:siemens:clearing:repo-name", - "Value": "energy-dev-conan-egll" + "name": "internal:siemens:clearing:is-internal", + "value": "false" }, { - "Name": "internal:siemens:clearing:project-type", - "Value": "CONAN" + "name": "internal:siemens:clearing:repo-name", + "value": "org1-npmjs-npm-remote-cache" }, { - "Name": "internal:siemens:clearing:clearing-state", - "Value": "Approved" + "name": "internal:siemens:clearing:project-type", + "value": "NPM" }, { - "Name": "internal:siemens:clearing:sw360:release-url", - "Value": "http://md2pdvnc.ad001.siemens.net:8095/resource/api/releases/e13e0e564b004ef4adabbd01bf0b93ce" + "name": "internal:siemens:clearing:siemens:filename", + "value": "build-optimizer-0.901.10.tgz" }, { - "Name": "internal:siemens:clearing:fossology:url", - "Value": null + "name": "internal:siemens:clearing:jfrog-repo-path", + "value": "org1-npmjs-npm-remote-cache/@angular-devkit/build-optimizer/-/build-optimizer-0.901.10.tgz" } - ], - "Evidence": null + ] } ], - "Compositions": null + "dependencies": [ + { + "ref": "pkg:npm/rxjs@6.5.4", + "dependsOn": [ + "pkg:npm/tslib@^1.9.0" + ] + }, + { + "ref": "pkg:npm/%40angular-devkit/architect@0.901.10", + "dependsOn": [ + "pkg:npm/%40angular-devkit/core@9.1.10", + "pkg:npm/rxjs@6.5.4" + ] + }, + { + "ref": "pkg:npm/%40angular-devkit/build-angular@0.901.10", + "dependsOn": [ + "pkg:npm/%40angular-devkit/architect@0.901.10", + "pkg:npm/%40angular-devkit/build-optimizer@0.901.10", + "pkg:npm/%40angular-devkit/build-webpack@0.901.10", + "pkg:npm/%40angular-devkit/core@9.1.10", + "pkg:npm/%40babel/core@7.9.0", + "pkg:npm/%40babel/generator@7.9.3", + "pkg:npm/%40babel/preset-env@7.9.0", + "pkg:npm/%40babel/template@7.8.6", + "pkg:npm/%40jsdevtools/coverage-istanbul-loader@3.0.3", + "pkg:npm/%40ngtools/webpack@9.1.10", + "pkg:npm/ajv@6.12.0", + "pkg:npm/autoprefixer@9.7.4", + "pkg:npm/babel-loader@8.0.6", + "pkg:npm/browserslist@^4.9.1", + "pkg:npm/cacache@15.0.0", + "pkg:npm/caniuse-lite@^1.0.30001032", + "pkg:npm/circular-dependency-plugin@5.2.0", + "pkg:npm/copy-webpack-plugin@6.0.3", + "pkg:npm/core-js@3.6.4", + "pkg:npm/css-loader@3.5.1", + "pkg:npm/cssnano@4.1.10", + "pkg:npm/file-loader@6.0.0", + "pkg:npm/find-cache-dir@3.3.1", + "pkg:npm/glob@7.1.6", + "pkg:npm/jest-worker@25.1.0", + "pkg:npm/karma-source-map-support@1.4.0", + "pkg:npm/less@3.11.3", + "pkg:npm/less-loader@5.0.0", + "pkg:npm/license-webpack-plugin@2.1.4", + "pkg:npm/loader-utils@2.0.0", + "pkg:npm/mini-css-extract-plugin@0.9.0", + "pkg:npm/minimatch@3.0.4", + "pkg:npm/open@7.0.3", + "pkg:npm/parse5@4.0.0", + "pkg:npm/postcss@7.0.27", + "pkg:npm/postcss-import@12.0.1", + "pkg:npm/postcss-loader@3.0.0", + "pkg:npm/raw-loader@4.0.0", + "pkg:npm/regenerator-runtime@0.13.5", + "pkg:npm/rimraf@3.0.2", + "pkg:npm/rollup@2.1.0", + "pkg:npm/rxjs@6.5.4", + "pkg:npm/sass@1.26.3", + "pkg:npm/sass-loader@8.0.2", + "pkg:npm/semver@7.1.3", + "pkg:npm/source-map@0.7.3", + "pkg:npm/source-map-loader@0.2.4", + "pkg:npm/speed-measure-webpack-plugin@1.3.1", + "pkg:npm/style-loader@1.1.3", + "pkg:npm/stylus@0.54.7", + "pkg:npm/stylus-loader@3.0.2", + "pkg:npm/terser@4.6.10", + "pkg:npm/terser-webpack-plugin@3.0.3", + "pkg:npm/tree-kill@1.2.2", + "pkg:npm/webpack@4.42.0", + "pkg:npm/webpack-dev-middleware@3.7.2", + "pkg:npm/webpack-dev-server@3.11.0", + "pkg:npm/webpack-merge@4.2.2", + "pkg:npm/webpack-sources@1.4.3", + "pkg:npm/webpack-subresource-integrity@1.4.0", + "pkg:npm/worker-plugin@4.0.3" + ] + }, + { + "ref": "pkg:npm/%40angular-devkit/build-optimizer@0.901.10", + "dependsOn": [ + "pkg:npm/loader-utils@2.0.0", + "pkg:npm/source-map@0.7.3", + "pkg:npm/tslib@1.11.1", + "pkg:npm/typescript@3.6.5", + "pkg:npm/webpack-sources@1.4.3" + ] + } + ] } \ No newline at end of file diff --git a/src/AritfactoryUploader.UTest/PackageUploadHelperTest.cs b/src/AritfactoryUploader.UTest/PackageUploadHelperTest.cs index 43f7d3d2..e0e1dff7 100644 --- a/src/AritfactoryUploader.UTest/PackageUploadHelperTest.cs +++ b/src/AritfactoryUploader.UTest/PackageUploadHelperTest.cs @@ -33,7 +33,7 @@ public void GetComponentListFromComparisonBOM_GivenComparisonBOM_ReturnsComponen //Act Bom componentList = PackageUploadHelper.GetComponentListFromComparisonBOM(comparisonBOMPath); // Assert - Assert.That(12, Is.EqualTo(componentList.Components.Count), "Checks for no of components"); + Assert.That(6, Is.EqualTo(componentList.Components.Count), "Checks for no of components"); } [Test] @@ -54,7 +54,7 @@ public void GetComponentListFromComparisonBOM_GivenInvalidfile_ReturnsException( string comparisonBOMPath = outFolder + @"\ArtifactoryUTTestFiles\ComparisonBOM.json"; //Act && Assert - Assert.Throws(() => PackageUploadHelper.GetComponentListFromComparisonBOM(comparisonBOMPath)); + Assert.Throws(() => PackageUploadHelper.GetComponentListFromComparisonBOM(comparisonBOMPath)); } @@ -158,8 +158,8 @@ public void UpdateBomArtifactoryRepoUrl_GivenBomAndComponentsUploadedToArtifacto { new ComponentsToArtifactory() { - Purl = "pkg:npm/%40angular/animations@11.0.4", - DestRepoName = "siparty-release-npm-egll", + Purl = "pkg:npm/rxjs@6.5.4", + DestRepoName = "org1-npmjs-npm-remote", DryRun = false, } }; @@ -168,8 +168,8 @@ public void UpdateBomArtifactoryRepoUrl_GivenBomAndComponentsUploadedToArtifacto PackageUploadHelper.UpdateBomArtifactoryRepoUrl(ref bom, components); //Assert - var repoUrl = bom.Components.First(x => x.Properties[1].Name == "internal:siemens:clearing:repo-name").Properties[1].Value; - Assert.AreEqual("siparty-release-npm-egll", repoUrl); + var repoUrl = bom.Components.First(x => x.Properties[3].Name == "internal:siemens:clearing:repo-name").Properties[3].Value; + Assert.AreEqual("org1-npmjs-npm-remote", repoUrl); } [Test] @@ -184,8 +184,8 @@ public void UpdateBomArtifactoryRepoUrl_GivenBomAndComponentsUploadedToArtifacto { new ComponentsToArtifactory() { - Purl = "pkg:npm/%40angular/animations@11.0.4", - DestRepoName = "siparty-release-npm-egll", + Purl = "pkg:npm/rxjs@6.5.4", + DestRepoName = "org1-npmjs-npm-remote", } }; @@ -193,8 +193,8 @@ public void UpdateBomArtifactoryRepoUrl_GivenBomAndComponentsUploadedToArtifacto PackageUploadHelper.UpdateBomArtifactoryRepoUrl(ref bom, components); //Assert - var repoUrl = bom.Components.First(x => x.Properties[1].Name == "internal:siemens:clearing:repo-name").Properties[1].Value; - Assert.AreNotEqual("siparty-release-npm-egll", repoUrl); + var repoUrl = bom.Components.First(x => x.Properties[3].Name == "internal:siemens:clearing:repo-name").Properties[3].Value; + Assert.AreNotEqual("org1-npmjs-npm-remote", repoUrl); } private static List GetComponentList() diff --git a/src/AritfactoryUploader.UTest/PackageUploaderTest.cs b/src/AritfactoryUploader.UTest/PackageUploaderTest.cs index c48844b4..f3fa6ac6 100644 --- a/src/AritfactoryUploader.UTest/PackageUploaderTest.cs +++ b/src/AritfactoryUploader.UTest/PackageUploaderTest.cs @@ -65,12 +65,12 @@ public async Task UploadPackageToArtifactory_GivenAppsettings() await PackageUploader.UploadPackageToArtifactory(CommonAppSettings); // Assert - Assert.That(8, Is.EqualTo(PackageUploader.uploaderKpiData.PackagesToBeUploaded), "Checks for no of cleared third party components"); - Assert.That(2, Is.EqualTo(PackageUploader.uploaderKpiData.DevPackagesToBeUploaded), "Checks for no of development components"); - Assert.That(2, Is.EqualTo(PackageUploader.uploaderKpiData.InternalPackagesToBeUploaded), "Checks for no of internal components"); - Assert.That(12, Is.EqualTo(PackageUploader.uploaderKpiData.ComponentInComparisonBOM), "Checks for no of components in BOM"); - Assert.That(10, Is.EqualTo(PackageUploader.uploaderKpiData.PackagesNotExistingInRemoteCache), "Checks for no of components not present in remote cache"); - Assert.That(2, Is.EqualTo(PackageUploader.uploaderKpiData.PackagesNotUploadedDueToError), "Checks for no of components not uploaded due to error"); + Assert.That(0, Is.EqualTo(PackageUploader.uploaderKpiData.PackagesToBeUploaded), "Checks for no of cleared third party components"); + Assert.That(4, Is.EqualTo(PackageUploader.uploaderKpiData.DevPackagesToBeUploaded), "Checks for no of development components"); + Assert.That(0, Is.EqualTo(PackageUploader.uploaderKpiData.InternalPackagesToBeUploaded), "Checks for no of internal components"); + Assert.That(6, Is.EqualTo(PackageUploader.uploaderKpiData.ComponentInComparisonBOM), "Checks for no of components in BOM"); + Assert.That(0, Is.EqualTo(PackageUploader.uploaderKpiData.PackagesNotExistingInRemoteCache), "Checks for no of components not present in remote cache"); + Assert.That(3, Is.EqualTo(PackageUploader.uploaderKpiData.PackagesNotUploadedDueToError), "Checks for no of components not uploaded due to error"); } [Test] From 0ffc2e9845b5d517acb979d5a0ea3e793a3cb3bb Mon Sep 17 00:00:00 2001 From: prasenjeetnath <147582543+prasenjeetnath@users.noreply.github.com> Date: Wed, 10 Jul 2024 16:01:45 +0530 Subject: [PATCH 2/2] Update compile.yml added path to 8.0 --- .github/workflows/compile.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index cf58b345..a334d8d0 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -66,13 +66,13 @@ jobs: run: | dotnet build src\LicenseClearingTool.sln Write-Host "Files in directory:" - dir $env:GITHUB_WORKSPACE\out\net6.0 + dir $env:GITHUB_WORKSPACE\out\net8.0 - name: Upload artifact uses: actions/upload-artifact@v2 with: name: buildoutput - path: ${{ github.workspace }}/out/net6.0 + path: ${{ github.workspace }}/out/net8.0 - name: Archive Build Log uses: actions/upload-artifact@v2