Check Bad .CFConfigs #93
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check Bad .CFConfigs | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| lucee_versions: | |
| required: false | |
| description: Lucee Versions (json) | |
| default: '[ "7.0/snapshot/jar", "6.2/snapshot/jar", "6.2/stable/jar" ]' | |
| type: string | |
| workflow_call: | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| luceeVersion: ${{ fromJSON(github.event.inputs.lucee_versions) }} | |
| javaVersion: [ 21 ] | |
| env: | |
| luceeVersionQuery: ${{ matrix.luceeVersion }} | |
| compile: ${{ github.event.inputs.compile }} | |
| TEST_IMAGE_EXT: 2.0.0.31-SNAPSHOT | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK ${{matrix.javaVersion}} | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: ${{matrix.javaVersion}} | |
| distribution: "temurin" | |
| - name: Cache Maven packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.m2 | |
| key: maven-cache | |
| - name: Cache Lucee files | |
| uses: actions/cache@v4 | |
| if: always() | |
| with: | |
| path: /home/runner/work/_actions/lucee/script-runner/main/lucee-download-cache | |
| key: lucee-downloads | |
| - name: Extract and save default .CFConfig.json | |
| uses: lucee/script-runner@main | |
| if: always() | |
| with: | |
| webroot: ${{ github.workspace }}/custom/bad-cfconfig | |
| execute: /saveDefault.cfm | |
| luceeVersionQuery: ${{ matrix.luceeVersion }} | |
| compile: true | |
| - name: Check good .CFConfig.json LUCEE_BASE_CONFIG | |
| uses: lucee/script-runner@main | |
| if: always() | |
| with: | |
| webroot: ${{ github.workspace }}/custom/bad-cfconfig | |
| execute: /debug.cfm | |
| luceeVersionQuery: ${{ matrix.luceeVersion }} | |
| compile: true | |
| env: | |
| LUCEE_BASE_CONFIG: ${{ github.workspace }}/custom/bad-cfconfig/.CFConfig-good.json5 | |
| check_extensions: B737ABC4-D43F-4D91-8E8E973E37C40D1B:2.0.0.26 | |
| - name: Copy .CFConfig-good.json5 into context | |
| if: always() | |
| run: | | |
| rm -rf /home/runner/work/_actions/lucee/script-runner/main/temp/ | |
| mkdir -p /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/context/ | |
| cp -a ${{ github.workspace }}/custom/bad-cfconfig/.CFConfig-good.json5 \ | |
| /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/context/.CFConfig.json | |
| - name: Check good .CFConfig.json (via context) | |
| uses: lucee/script-runner@main | |
| if: always() | |
| with: | |
| webroot: ${{ github.workspace }}/custom/bad-cfconfig | |
| execute: /debug.cfm | |
| luceeVersionQuery: ${{ matrix.luceeVersion }} | |
| preCleanup: false | |
| env: | |
| check_extensions: B737ABC4-D43F-4D91-8E8E973E37C40D1B:2.0.0.26 | |
| - name: Check good .CFConfig with newer image extension LUCEE_BASE_CONFIG | |
| uses: lucee/script-runner@main | |
| if: always() | |
| with: | |
| webroot: ${{ github.workspace }}/custom/bad-cfconfig | |
| execute: /debug.cfm | |
| luceeVersionQuery: ${{ matrix.luceeVersion }} | |
| env: | |
| LUCEE_BASE_CONFIG: ${{ github.workspace }}/custom/bad-cfconfig/.CFConfig-newer-extension.json5 | |
| check_extensions: B737ABC4-D43F-4D91-8E8E973E37C40D1B:${{ env.TEST_IMAGE_EXT }} | |
| - name: Check newer image extension is installed via LUCEE_EXTENSIONS | |
| uses: lucee/script-runner@main | |
| if: always() | |
| with: | |
| webroot: ${{ github.workspace }}/custom/bad-cfconfig | |
| execute: /debug.cfm | |
| luceeVersionQuery: ${{ matrix.luceeVersion }} | |
| env: | |
| LUCEE_EXTENSIONS: B737ABC4-D43F-4D91-8E8E973E37C40D1B;version=${{ env.TEST_IMAGE_EXT }} | |
| check_extensions: B737ABC4-D43F-4D91-8E8E973E37C40D1B:${{ env.TEST_IMAGE_EXT }} | |
| - name: Copy .CFConfig-newer-extension.json5 into context | |
| if: always() | |
| run: | | |
| rm -rf /home/runner/work/_actions/lucee/script-runner/main/temp/ | |
| mkdir -p /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/context/ | |
| cp -a ${{ github.workspace }}/custom/bad-cfconfig/.CFConfig-newer-extension.json5 \ | |
| /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/context/.CFConfig.json | |
| - name: Check good .CFConfig with newer image extension ( via context ) | |
| uses: lucee/script-runner@main | |
| if: always() | |
| with: | |
| webroot: ${{ github.workspace }}/custom/bad-cfconfig | |
| execute: /debug.cfm | |
| luceeVersionQuery: ${{ matrix.luceeVersion }} | |
| preCleanup: false | |
| env: | |
| check_extensions: B737ABC4-D43F-4D91-8E8E973E37C40D1B:${{ env.TEST_IMAGE_EXT }} | |
| - name: Copy newer image extension into /deploy | |
| if: always() | |
| run: | | |
| rm -rf /home/runner/work/_actions/lucee/script-runner/main/temp/ | |
| mkdir -p /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/deploy/ | |
| wget -nv -O /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/deploy/image-extension-${{ env.TEST_IMAGE_EXT }}.lex \ | |
| https://ext.lucee.org/image-extension-${{ env.TEST_IMAGE_EXT }}.lex | |
| - name: Check updating image extension via .lex file ( via /deploy ) | |
| uses: lucee/script-runner@main | |
| if: always() | |
| with: | |
| webroot: ${{ github.workspace }}/custom/bad-cfconfig | |
| execute: /debug.cfm | |
| luceeVersionQuery: ${{ matrix.luceeVersion }} | |
| preCleanup: false | |
| env: | |
| check_extensions: B737ABC4-D43F-4D91-8E8E973E37C40D1B:${{ env.TEST_IMAGE_EXT }} | |
| check_extensions_since: 6.1.1 | |
| - name: Copy .CFConfig-newer-extension.json5 into /deploy | |
| if: always() | |
| run: | | |
| rm -rf /home/runner/work/_actions/lucee/script-runner/main/temp/ | |
| mkdir -p /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/deploy/ | |
| cp -a ${{ github.workspace }}/custom/bad-cfconfig/.CFConfig-newer-extension-snippet.json5 \ | |
| /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/deploy/.CFConfig.json | |
| - name: Check .CFConfig with newer image extension snippet ( via /deploy ) | |
| uses: lucee/script-runner@main | |
| if: always() | |
| with: | |
| webroot: ${{ github.workspace }}/custom/bad-cfconfig | |
| execute: /debug.cfm | |
| luceeVersionQuery: ${{ matrix.luceeVersion }} | |
| preCleanup: false | |
| env: | |
| check_extensions: B737ABC4-D43F-4D91-8E8E973E37C40D1B:${{ env.TEST_IMAGE_EXT }} | |
| check_extensions_since: 6.1.1 | |
| - name: Copy .CFConfig-newer-mappings.json5 into /deploy | |
| if: always() | |
| run: | | |
| rm -rf /home/runner/work/_actions/lucee/script-runner/main/temp/ | |
| mkdir -p /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/deploy/ | |
| cp -a ${{ github.workspace }}/custom/bad-cfconfig/.CFConfig-newer-mappings.json5 \ | |
| /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/deploy/.CFConfig.json | |
| - name: Check .CFConfig with newer mappings via snippet ( via /deploy ) | |
| uses: lucee/script-runner@main | |
| if: always() | |
| with: | |
| webroot: ${{ github.workspace }}/custom/bad-cfconfig | |
| execute: /debug.cfm | |
| luceeVersionQuery: ${{ matrix.luceeVersion }} | |
| preCleanup: false | |
| - name: Copy .CFConfig-empty-cacheHandlers.json5 into /deploy | |
| if: always() | |
| run: | | |
| rm -rf /home/runner/work/_actions/lucee/script-runner/main/temp/ | |
| mkdir -p /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/deploy/ | |
| cp -a ${{ github.workspace }}/custom/bad-cfconfig/.CFConfig-empty-cacheHandlers.json \ | |
| /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/deploy/.CFConfig.json | |
| - name: Check .CFConfig with empty cacheHandlers ( via /deploy ) | |
| uses: lucee/script-runner@main | |
| if: always() | |
| with: | |
| webroot: ${{ github.workspace }}/custom/bad-cfconfig | |
| execute: /debug.cfm | |
| luceeVersionQuery: ${{ matrix.luceeVersion }} | |
| preCleanup: false | |
| env: | |
| expect_empty_config: cacheHandlers | |
| - name: Check bad .CFConfig with unknown extension version LUCEE_BASE_CONFIG | |
| uses: lucee/script-runner@main | |
| if: always() | |
| with: | |
| webroot: ${{ github.workspace }}/custom/bad-cfconfig | |
| execute: /debug.cfm | |
| luceeVersionQuery: ${{ matrix.luceeVersion }} | |
| env: | |
| LUCEE_BASE_CONFIG: ${{ github.workspace }}/custom/bad-cfconfig/.CFConfig-bad-extension.json5 | |
| - name: Check bad .CFConfig with invalid json5? due to a comment LUCEE_BASE_CONFIG | |
| uses: lucee/script-runner@main | |
| if: always() | |
| with: | |
| webroot: ${{ github.workspace }}/custom/bad-cfconfig | |
| execute: /debug.cfm | |
| luceeVersionQuery: ${{ matrix.luceeVersion }} | |
| env: | |
| LUCEE_BASE_CONFIG: ${{ github.workspace }}/custom/bad-cfconfig/.CFConfig-bad-comment.json5 | |
| check_extensions: -D46B46A9-A0E3-44E1-D972A04AC3A8DC10:1.0.19.25 | |
| - name: Check bad .CFConfig missing file LUCEE_BASE_CONFIG | |
| uses: lucee/script-runner@main | |
| if: always() | |
| with: | |
| webroot: ${{ github.workspace }}/custom/bad-cfconfig | |
| execute: /debug.cfm | |
| luceeVersionQuery: ${{ matrix.luceeVersion }} | |
| env: | |
| LUCEE_BASE_CONFIG: ${{ github.workspace }}/custom/bad-cfconfig/.CFConfig-404.json5 | |
| - name: Copy .CFConfig-bad-extension.json5 into context (s3 ext) | |
| if: always() | |
| run: | | |
| rm -rf /home/runner/work/_actions/lucee/script-runner/main/temp/ | |
| mkdir -p /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/context/ | |
| cp -a ${{ github.workspace }}/custom/bad-cfconfig/.CFConfig-bad-extension.json5 \ | |
| /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/context/.CFConfig.json | |
| - name: Check bad .CFConfig with wrong version number for bundled s3 extension (via context) | |
| uses: lucee/script-runner@main | |
| if: always() | |
| with: | |
| webroot: ${{ github.workspace }}/custom/bad-cfconfig | |
| execute: /debug.cfm | |
| luceeVersionQuery: ${{ matrix.luceeVersion }} | |
| preCleanup: false | |
| env: | |
| check_extensions: -17AB52DE-B300-A94B-E058BD978511E39E:0.0.404.404 | |
| - name: Copy .CFConfig-bad-extension.json5 into context (chart ext) | |
| if: always() | |
| run: | | |
| rm -rf /home/runner/work/_actions/lucee/script-runner/main/temp/ | |
| mkdir -p /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/context/ | |
| cp -a ${{ github.workspace }}/custom/bad-cfconfig/.CFConfig-bad-extension-404.json5 \ | |
| /home/runner/work/_actions/lucee/script-runner/main/temp/lucee/lucee-server/context/.CFConfig.json | |
| - name: Check bad .CFConfig with wrong version number for unbundled chart extension (via context) | |
| uses: lucee/script-runner@main | |
| if: always() | |
| with: | |
| webroot: ${{ github.workspace }}/custom/bad-cfconfig | |
| execute: /debug.cfm | |
| luceeVersionQuery: ${{ matrix.luceeVersion }} | |
| preCleanup: false | |
| env: | |
| check_extensions: -D46B46A9-A0E3-44E1-D972A04AC3A8DC10:0.0.404.404 | |
| - name: Check CFCHART extension is installed via LUCEE_EXTENSIONS | |
| uses: lucee/script-runner@main | |
| if: always() | |
| with: | |
| webroot: ${{ github.workspace }}/custom/bad-cfconfig | |
| execute: /debug.cfm | |
| luceeVersionQuery: ${{ matrix.luceeVersion }} | |
| env: | |
| LUCEE_EXTENSIONS: D46B46A9-A0E3-44E1-D972A04AC3A8DC10 | |
| LUCEE_LOGGING_FORCE_LEVEL: trace |