From a34f41e8dbc04d236c3182d7d3918c7d02a215ff Mon Sep 17 00:00:00 2001 From: Marcel Schork Date: Mon, 15 Apr 2024 12:10:06 +0200 Subject: [PATCH 1/5] feat: use metadata prop Bundle-SymbolicName as artifact id and Origin-Bundle-SymbolicName as fallback --- src/lib/client/ManifestReader.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/client/ManifestReader.ts b/src/lib/client/ManifestReader.ts index efbfe19..6c65a6c 100644 --- a/src/lib/client/ManifestReader.ts +++ b/src/lib/client/ManifestReader.ts @@ -33,8 +33,8 @@ export default class ManifestReader { getArtifactMetadata(): Artifact { return { Id: - (this.manifestEntries.get('Origin-Bundle-SymbolicName') as string) || - (this.manifestEntries.get('Bundle-SymbolicName') as string).split(';')[0], + (this.manifestEntries.get('Bundle-SymbolicName') as string).split(';')[0] || + (this.manifestEntries.get('Origin-Bundle-SymbolicName') as string), Version: this.manifestEntries.get('Bundle-Version') as string, Name: this.manifestEntries.get('Bundle-Name') as string, Type: this.manifestEntries.get('SAP-BundleType') as ArtifactType, From 9b0e614a501a743cb0d629d076fe0930ac3d9cfc Mon Sep 17 00:00:00 2001 From: Marcel Schork Date: Mon, 15 Apr 2024 12:25:24 +0200 Subject: [PATCH 2/5] fix: issue --- .../META-INF/MANIFEST.MF | 2 +- src/test/integration/IntegrationFlow.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/Testpackage/com.sap.SFIHCM03.hcm2bizx.SFSFOffboardingGetOffboardUserRecordWithExpabcd.EBZ/META-INF/MANIFEST.MF b/src/test/Testpackage/com.sap.SFIHCM03.hcm2bizx.SFSFOffboardingGetOffboardUserRecordWithExpabcd.EBZ/META-INF/MANIFEST.MF index 4c85f75..fab784d 100644 --- a/src/test/Testpackage/com.sap.SFIHCM03.hcm2bizx.SFSFOffboardingGetOffboardUserRecordWithExpabcd.EBZ/META-INF/MANIFEST.MF +++ b/src/test/Testpackage/com.sap.SFIHCM03.hcm2bizx.SFSFOffboardingGetOffboardUserRecordWithExpabcd.EBZ/META-INF/MANIFEST.MF @@ -1,7 +1,7 @@ Manifest-Version: 1.0 Bundle-Description: Bundle-SymbolicName: com.sap.SFIHCM03.hcm2bizx.SFSFOffboardingGetOffbo - ardUserRecordWithExpabcd; singleton:=true + ardUserRecordWithExpabcd.EBZ; singleton:=true Origin-Bundle-SymbolicName: com.sap.SFIHCM03.hcm2bizx.SFSFOffboardingG etOffboardUserRecordWithExpabcd Bundle-ManifestVersion: 2 diff --git a/src/test/integration/IntegrationFlow.test.ts b/src/test/integration/IntegrationFlow.test.ts index aa9e3ea..d799712 100644 --- a/src/test/integration/IntegrationFlow.test.ts +++ b/src/test/integration/IntegrationFlow.test.ts @@ -32,7 +32,7 @@ describe('Integration flow', () => { }); it('fetch an integration flow ', async () => { - const iFlowId = sciRestClient.getArtifactMetadata(path.join(artiFactDirectory, 'TestPackage', iFlowFolder)).Id; + const iFlowId = sciRestClient.getArtifactMetadata(path.join(artiFactDirectory, 'Testpackage', iFlowFolder)).Id; const readStream = (await sciRestClient.getArtifact(iFlowId, '1.0.0', 'IntegrationFlow')) as ReadStream; const writer = fs.createWriteStream(path.join(artiFactDirectory, 'test.zip')); From 795b387e5889e7a5cfbb67e383d39065d556abf4 Mon Sep 17 00:00:00 2001 From: Marcel Schork Date: Mon, 15 Apr 2024 12:31:33 +0200 Subject: [PATCH 3/5] ci: use Java 17 for Sonar scan --- .github/workflows/node-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index b9a3ac0..616dc23 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -11,6 +11,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - uses: actions/setup-java@v1 + with: + java-version: 17 - uses: SonarSource/sonarqube-scan-action@v1.1.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 1e840ec07ed8c6bdc6aadf8a18bf0d60ad196f64 Mon Sep 17 00:00:00 2001 From: Marcel Schork Date: Mon, 15 Apr 2024 12:35:20 +0200 Subject: [PATCH 4/5] chore: fix --- .github/workflows/node-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 616dc23..11e9c96 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -11,9 +11,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: - java-version: 17 + java-version: '17' + distribution: 'adopt' - uses: SonarSource/sonarqube-scan-action@v1.1.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 4fc842fea512bb6f3a29072953c6489522c98af8 Mon Sep 17 00:00:00 2001 From: Marcel Schork Date: Mon, 15 Apr 2024 12:42:47 +0200 Subject: [PATCH 5/5] ci: fix --- .github/workflows/node-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 11e9c96..7ca9823 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -15,7 +15,7 @@ jobs: with: java-version: '17' distribution: 'adopt' - - uses: SonarSource/sonarqube-scan-action@v1.1.0 + - uses: SonarSource/sonarqube-scan-action@v2.0.2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}