From 50290a77e50170387fd5ffdae3adf65564bd4c6a Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs Date: Fri, 14 Jul 2023 10:45:29 -0400 Subject: [PATCH 1/8] Update defaults logic for multi-pem Signed-off-by: 1000TurquoisePogs --- defaults/serverConfig/defaults.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/defaults/serverConfig/defaults.yaml b/defaults/serverConfig/defaults.yaml index 6a0451f..5ea33f5 100644 --- a/defaults/serverConfig/defaults.yaml +++ b/defaults/serverConfig/defaults.yaml @@ -51,7 +51,11 @@ components: if (zowe.certificate?.truststore?.type == "JCERACFKS") { return [ zowe.certificate.truststore.file ]; } else if(zowe.certificate?.pem?.certificateAuthorities) { - return [zowe.certificate.pem.certificateAuthorities]; + if (Array.isArray(zowe.certificate.pem.certificateAuthorities)) { + return zowe.certificate.pem.certificateAuthorities; + } else { + return zowe.certificate.pem.certificateAuthorities.split(','); + } } else { return ["../defaults/serverConfig/apiml-localca.cer"]; } }; a() }}' loopbackAddress: "${{ function a(){ if (process.env.ZOWE_LOOPBACK_ADDRESS) { return process.env.ZOWE_LOOPBACK_ADDRESS; } else { return undefined; } }; a() }}" From a642471c0d8d86c54b8ac5c45e533df38589a202 Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs Date: Fri, 14 Jul 2023 10:48:43 -0400 Subject: [PATCH 2/8] Update CHANGELOG.md Signed-off-by: 1000TurquoisePogs --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6f1bf6..0ec16a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to the Zlux App Server package will be documented in this file. +## v2.11.0 + +- Bugfix: The server couldn't load more than one certificate authority specified within the zowe.certificate.pem.certificateAuthorities section under any condition. Now, it is supported regardless of if the section is an array or a comma-separated string. (#266) + ## v2.10.0 - Enhancement: Migrated app-server configuration options into a "defaults.yaml" file which adheres to the schema of the Zowe config. This allows users to see the default behaviors more clearly, and can serve as an example by which users can customize their Zowe config to override such defaults. (#247) From 8db02e713516a7e4079c90db544aba9b5f8b6bd8 Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs Date: Fri, 14 Jul 2023 10:51:51 -0400 Subject: [PATCH 3/8] Update defaults.yaml Signed-off-by: 1000TurquoisePogs --- defaults/serverConfig/defaults.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/serverConfig/defaults.yaml b/defaults/serverConfig/defaults.yaml index 5ea33f5..f60f6fe 100644 --- a/defaults/serverConfig/defaults.yaml +++ b/defaults/serverConfig/defaults.yaml @@ -54,7 +54,7 @@ components: if (Array.isArray(zowe.certificate.pem.certificateAuthorities)) { return zowe.certificate.pem.certificateAuthorities; } else { - return zowe.certificate.pem.certificateAuthorities.split(','); + return zowe.certificate.pem.certificateAuthorities.split(","); } } else { return ["../defaults/serverConfig/apiml-localca.cer"]; } }; a() }}' From 9308f8490a0ae15804f780f6f931ea1507d9ab60 Mon Sep 17 00:00:00 2001 From: syadav3 Date: Tue, 1 Aug 2023 19:00:48 +0530 Subject: [PATCH 4/8] Added Changelog file check --- .github/workflows/build-core.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-core.yml b/.github/workflows/build-core.yml index 2790081..c6479fb 100644 --- a/.github/workflows/build-core.yml +++ b/.github/workflows/build-core.yml @@ -44,11 +44,30 @@ jobs: github-repo: ${{ github.repository }} github-token: ${{ secrets.GITHUB_TOKEN }} - build: + check_changelog: runs-on: ubuntu-latest needs: check-permission steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Check if CHANGELOG is added + id: changed-files-yaml + uses: tj-actions/changed-files@v37 + with: + files_yaml: | + doc: + - CHANGELOG.md + + - name: Abort the workflow if CHANGELOG is not added + if: steps.changed-files-yaml.outputs.doc_any_changed != 'true' + run: | + echo "CHANGELOG + build: + runs-on: ubuntu-latest + needs: check_changelog + steps: - name: '[Prep 1] Cache node modules' uses: actions/cache@v2 with: From 50596f62126942cdece17648f3149bce1c6dfd11 Mon Sep 17 00:00:00 2001 From: syadav3 Date: Wed, 2 Aug 2023 16:51:56 +0530 Subject: [PATCH 5/8] Updated the code as per the suggestions --- .github/workflows/build-core.yml | 42 +++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-core.yml b/.github/workflows/build-core.yml index c6479fb..85e96f4 100644 --- a/.github/workflows/build-core.yml +++ b/.github/workflows/build-core.yml @@ -46,24 +46,44 @@ jobs: check_changelog: runs-on: ubuntu-latest - needs: check-permission steps: - name: Checkout code uses: actions/checkout@v3 - - - name: Check if CHANGELOG is added - id: changed-files-yaml - uses: tj-actions/changed-files@v37 with: - files_yaml: | - doc: - - CHANGELOG.md + path: copy-repo + fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }} + + - name: Get changed files + id: changed-files + run: | + cd copy-repo + if ${{ github.event_name == 'pull_request' }}; then + echo "changed_files=$(git diff --name-only -r HEAD^1 HEAD | xargs)" >> $GITHUB_OUTPUT + else + echo "changed_files=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | xargs)" >> $GITHUB_OUTPUT + fi - - name: Abort the workflow if CHANGELOG is not added - if: steps.changed-files-yaml.outputs.doc_any_changed != 'true' + - name: List changed files + id: set-flag run: | - echo "CHANGELOG + cd copy-repo + for file in ${{ steps.changed-files.outputs.changed_files }}; do + echo "$file was changed" + if [[ $file == "CHANGELOG.md" ]] + then + echo "file-flag=true" >> $GITHUB_OUTPUT + break; + else + echo "file-flag=false" >> $GITHUB_OUTPUT + fi + done + - name: Check if CHANGELOG is Updated and Abort if not updated + if: steps.set-flag.outputs.file-flag != 'true' + run: | + echo "CHANGELOG not added. Please add the CHANGELOG in the CHANGELOG.md file" + exit 1 + build: runs-on: ubuntu-latest needs: check_changelog From 2144b105f774c110919310422a86db4f1f9d3ece Mon Sep 17 00:00:00 2001 From: syadav3 Date: Wed, 2 Aug 2023 17:03:26 +0530 Subject: [PATCH 6/8] Updated code to Build to not fail even if Changelog not udpated --- .github/workflows/build-core.yml | 2 +- CHANGELOG.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-core.yml b/.github/workflows/build-core.yml index 85e96f4..8874fba 100644 --- a/.github/workflows/build-core.yml +++ b/.github/workflows/build-core.yml @@ -86,7 +86,7 @@ jobs: build: runs-on: ubuntu-latest - needs: check_changelog + needs: check-permission steps: - name: '[Prep 1] Cache node modules' uses: actions/cache@v2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ec16a5..d8e9154 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -82,4 +82,4 @@ All notable changes to the Zlux App Server package will be documented in this fi - Add v1.12 update script for replacing all bundled plugin references with ones that use $ROOT_DIR environment variable - Change Scripts to work with independent zss component -- Add v1.12 update script for removing apiml-auth if it is not being explicitly used +- Add v1.12 update script for removing apiml-auth if it is not being explicitly used. From b707e1f505f5a89b29fe4f5261234b3f414f4591 Mon Sep 17 00:00:00 2001 From: syadav3 Date: Thu, 3 Aug 2023 23:54:31 +0530 Subject: [PATCH 7/8] Removed temporary dir after Check changelog --- .github/workflows/build-core.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-core.yml b/.github/workflows/build-core.yml index 8874fba..84bbbd5 100644 --- a/.github/workflows/build-core.yml +++ b/.github/workflows/build-core.yml @@ -81,8 +81,12 @@ jobs: - name: Check if CHANGELOG is Updated and Abort if not updated if: steps.set-flag.outputs.file-flag != 'true' run: | - echo "CHANGELOG not added. Please add the CHANGELOG in the CHANGELOG.md file" + echo "CHANGELOG.md not updated, please update CHANGELOG.md with the changes made in the pull request" exit 1 + + - name: Remove copy-repo + if: always() + run: rm -r copy-repo build: runs-on: ubuntu-latest From 6b6c50d07dde672c8a745e3d58273f13703c09e9 Mon Sep 17 00:00:00 2001 From: syadav3 Date: Thu, 3 Aug 2023 23:59:52 +0530 Subject: [PATCH 8/8] Updated Changelog to original --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8e9154..0ec16a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -82,4 +82,4 @@ All notable changes to the Zlux App Server package will be documented in this fi - Add v1.12 update script for replacing all bundled plugin references with ones that use $ROOT_DIR environment variable - Change Scripts to work with independent zss component -- Add v1.12 update script for removing apiml-auth if it is not being explicitly used. +- Add v1.12 update script for removing apiml-auth if it is not being explicitly used