diff --git a/.github/workflows/build-core.yml b/.github/workflows/build-core.yml index 27900817..84bbbd5d 100644 --- a/.github/workflows/build-core.yml +++ b/.github/workflows/build-core.yml @@ -44,11 +44,54 @@ jobs: github-repo: ${{ github.repository }} github-token: ${{ secrets.GITHUB_TOKEN }} + check_changelog: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + 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: List changed files + id: set-flag + run: | + 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.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 needs: check-permission steps: - - name: '[Prep 1] Cache node modules' uses: actions/cache@v2 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index b6f1bf6b..0ec16a5f 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) diff --git a/defaults/serverConfig/defaults.yaml b/defaults/serverConfig/defaults.yaml index c3d9186e..c2daa703 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() }}"