From c0e2637b2e87fc8f1799f27b59a54e8db0c03072 Mon Sep 17 00:00:00 2001 From: jclausen Date: Fri, 20 Sep 2024 17:41:55 -0400 Subject: [PATCH 01/30] change to minor release due to return type changes createFromFile --- box.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/box.json b/box.json index 3740f30..79a4550 100644 --- a/box.json +++ b/box.json @@ -1,6 +1,6 @@ { "name":"CB File Storages", - "version":"1.1.4", + "version":"1.2.0", "location":"https://downloads.ortussolutions.com/ortussolutions/coldbox-modules/cbfs/@build.version@/cbfs-@build.version@.zip", "author":"Ortus Solutions, Corp", "homepage":"https://github.com/coldbox-modules/cbfs", From 174503ba18aa9324b557b7f3a9e7c8cd5e481e87 Mon Sep 17 00:00:00 2001 From: jclausen Date: Fri, 20 Sep 2024 17:50:23 -0400 Subject: [PATCH 02/30] Issue #41 - upload now returns file object --- changelog.md | 6 ++++++ models/AbstractDiskProvider.cfc | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 2cee77b..bca7bcf 100644 --- a/changelog.md +++ b/changelog.md @@ -13,6 +13,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Issue #49 - Fix windows pathing issues when the disk path is relative or mapped +### Changed + +* Issue #40 - `createFromFile` now returns a file object of the created file +* Issue #41 - `upload` now returns a file object of the uploaded file + + ## [1.1.2] - 2023-05-18 ### Fixed diff --git a/models/AbstractDiskProvider.cfc b/models/AbstractDiskProvider.cfc index aa3a241..026b0a7 100644 --- a/models/AbstractDiskProvider.cfc +++ b/models/AbstractDiskProvider.cfc @@ -171,7 +171,7 @@ component accessors="true" { fileDelete( tmpFile ); } - return this; + return file( normalizePath( filePath ) ); } /** From 11d4896a69ce1ba7230c837c8b729bce24594879 Mon Sep 17 00:00:00 2001 From: jclausen Date: Fri, 20 Sep 2024 18:13:23 -0400 Subject: [PATCH 03/30] bump action versions --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 59ce7fa..71ae973 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -142,7 +142,7 @@ jobs: forgeboxAPIKey: ${{ secrets.FORGEBOX_TOKEN }} - name: Download build artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: ${{ env.MODULE_ID }} path: .tmp @@ -159,7 +159,7 @@ jobs: # Commit it back to development - name: Commit Version Bump - uses: EndBug/add-and-commit@v9.1.1 + uses: EndBug/add-and-commit@v9.1.4 with: author_name: Github Actions author_email: info@ortussolutions.com From f868c283c5374db06ebf003510edf52caa7672f8 Mon Sep 17 00:00:00 2001 From: Github Actions Date: Sun, 22 Sep 2024 16:01:26 +0000 Subject: [PATCH 04/30] Version bump [ci skip] --- box.json | 2 +- changelog.md | 43 ++++++++++++++++++++++++------------------- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/box.json b/box.json index 3740f30..58f08b7 100644 --- a/box.json +++ b/box.json @@ -1,6 +1,6 @@ { "name":"CB File Storages", - "version":"1.1.4", + "version":"1.1.5", "location":"https://downloads.ortussolutions.com/ortussolutions/coldbox-modules/cbfs/@build.version@/cbfs-@build.version@.zip", "author":"Ortus Solutions, Corp", "homepage":"https://github.com/coldbox-modules/cbfs", diff --git a/changelog.md b/changelog.md index 43995eb..74869a8 100644 --- a/changelog.md +++ b/changelog.md @@ -9,9 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.1.4] - 2024-09-22 + ### Fixed -* Issue #49 - Fix windows pathing issues when the disk path is relative or mapped +- Issue #49 - Fix windows pathing issues when the disk path is relative or mapped ## [1.1.2] - 2023-05-18 @@ -23,56 +25,59 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -* Fixes an issue where `createFromFile` would not clear the existence check cache -* Fixes an incorrect source assigment and method signature for the File object `createFromFile` method +- Fixes an issue where `createFromFile` would not clear the existence check cache +- Fixes an incorrect source assigment and method signature for the File object `createFromFile` method ### Added -* Adds the force argument to the File exists method for correct disk pass-through -* Adds the `name` method to the File object +- Adds the force argument to the File exists method for correct disk pass-through +- Adds the `name` method to the File object ## [1.1.0] - 2023-05-01 ### Added -* New Github actions -* ColdBox 7 Auto-Testing -* Added url(), temporaryURL(), and download() methods to the File object. +- New Github actions +- ColdBox 7 Auto-Testing +- Added url(), temporaryURL(), and download() methods to the File object. ## [1.0.3] => 2023-03-15 ### Fixed -* Fix for Adobe S3 request returning ByteArrayOutputStream -* Fix ROOT folder issues with S3 -* Fix when referencing root folder -* Fix calling temporaryURL() on s3 provider -* Throw error if the source does not exist in S3 Provider +- Fix for Adobe S3 request returning ByteArrayOutputStream +- Fix ROOT folder issues with S3 +- Fix when referencing root folder +- Fix calling temporaryURL() on s3 provider +- Throw error if the source does not exist in S3 Provider ## [1.1.0] => 2023-03-31 ### Added -* Ability to pass response headers to temporaryURL() when using S3 provider. +- Ability to pass response headers to temporaryURL() when using S3 provider. ## [1.0.2] => 2023-01-03 ### Fixed -* Fixes an issue where Lucee would not retrieve the correct binary contents of a file -* Ensures explicity content types are sent with the S3 put headers +- Fixes an issue where Lucee would not retrieve the correct binary contents of a file +- Ensures explicity content types are sent with the S3 put headers ## [1.0.1] => 2022-DEC-29 ### Fixed -* Issue #35 - JSON/JS/XML files being returned as binary +- Issue #35 - JSON/JS/XML files being returned as binary ## [1.0.0] => 2022-NOV-24 -* First iteration of this module +- First iteration of this module + +[Unreleased]: https://github.com/coldbox-modules/cbfs/compare/v1.1.4...HEAD + +[1.1.4]: https://github.com/coldbox-modules/cbfs/compare/v1.1.4...v1.1.4 -[Unreleased]: https://github.com/coldbox-modules/cbfs/compare/v1.1.2...HEAD [1.1.2]: https://github.com/coldbox-modules/cbfs/compare/v1.1.1...v1.1.2 From aa3d1e0ccd93c2e0adcd555a03043e8b48acc0a2 Mon Sep 17 00:00:00 2001 From: Oscar Tisnado <68830577+otisnado@users.noreply.github.com> Date: Fri, 6 Dec 2024 12:43:35 -0600 Subject: [PATCH 05/30] add boxlang to matrix --- .github/workflows/tests.yml | 3 +++ server-boxlang@1.json | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 server-boxlang@1.json diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dc2d531..831eb65 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -52,6 +52,9 @@ jobs: coldboxVersion: "be" cfengine: "adobe@2021" experimental: true + - commandVersion: "be" + cfengine: "boxlag@1" + experimental: true steps: - name: Checkout Repository uses: actions/checkout@v4 diff --git a/server-boxlang@1.json b/server-boxlang@1.json new file mode 100644 index 0000000..36f4512 --- /dev/null +++ b/server-boxlang@1.json @@ -0,0 +1,36 @@ +{ + "app":{ + "cfengine":"boxlang@be", + "serverHomeDirectory":".engine/boxlang" + }, + "name":"cbsecurity-boxlang@1", + "force":true, + "openBrowser":false, + "web":{ + "directoryBrowsing":true, + "http":{ + "port":"60299" + }, + "rewrites":{ + "enable":"true" + }, + "webroot":"test-harness", + "aliases":{ + "/moduleroot/cbsecurity":"./" + } + }, + "JVM":{ + "heapSize":"1024", + "javaVersion":"openjdk21_jdk", + "args":"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9999" + }, + "cfconfig":{ + "file":".cfconfig.json" + }, + "env":{ + "BOXLANG_DEBUG":true + }, + "scripts":{ + "onServerInitialInstall":"install bx-mail,bx-mysql,bx-derby,bx-compat-cfml@be,bx-unsafe-evaluate,bx-esapi --noSave" + } +} \ No newline at end of file From 5fcf28566d4a8000938e277e31ab6c922df06af9 Mon Sep 17 00:00:00 2001 From: Oscar Tisnado <68830577+otisnado@users.noreply.github.com> Date: Fri, 6 Dec 2024 12:47:24 -0600 Subject: [PATCH 06/30] fix misspelled module name in server-boxlang@1.json --- server-boxlang@1.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server-boxlang@1.json b/server-boxlang@1.json index 36f4512..59a8607 100644 --- a/server-boxlang@1.json +++ b/server-boxlang@1.json @@ -3,7 +3,7 @@ "cfengine":"boxlang@be", "serverHomeDirectory":".engine/boxlang" }, - "name":"cbsecurity-boxlang@1", + "name":"cbfs-boxlang@1", "force":true, "openBrowser":false, "web":{ @@ -16,7 +16,7 @@ }, "webroot":"test-harness", "aliases":{ - "/moduleroot/cbsecurity":"./" + "/moduleroot/cbfs":"./" } }, "JVM":{ From 692b8fd06102fd2ddf616896094927487a6dd9c8 Mon Sep 17 00:00:00 2001 From: Oscar Tisnado <68830577+otisnado@users.noreply.github.com> Date: Mon, 3 Feb 2025 22:52:49 -0600 Subject: [PATCH 07/30] ci: enable workflow dispatch for triggering boxlang tests and reinstall commandbox-boxlang --- .github/workflows/snapshot.yml | 1 + .github/workflows/tests.yml | 7 ++++++- server-boxlang@1.json | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 37e3183..8ef1a7e 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -4,6 +4,7 @@ on: push: branches: - 'development' + workflow_dispatch: jobs: ########################################################################################## diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 831eb65..3a79d85 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -53,7 +53,7 @@ jobs: cfengine: "adobe@2021" experimental: true - commandVersion: "be" - cfengine: "boxlag@1" + cfengine: "boxlang@1" experimental: true steps: - name: Checkout Repository @@ -71,6 +71,11 @@ jobs: with: version: ${{ matrix.commandbox_version }} + - name: Update Commandbox Boxlang Module + if: ${{ matrix.cfengine == 'boxlang@1' }} + run: + box install --force commandbox-boxlang + - name: Install Dependencies run: | box install diff --git a/server-boxlang@1.json b/server-boxlang@1.json index 59a8607..f4ee0e9 100644 --- a/server-boxlang@1.json +++ b/server-boxlang@1.json @@ -22,7 +22,7 @@ "JVM":{ "heapSize":"1024", "javaVersion":"openjdk21_jdk", - "args":"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9999" + "args":"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9999 -Dboxlang.debugMode=true" }, "cfconfig":{ "file":".cfconfig.json" @@ -33,4 +33,4 @@ "scripts":{ "onServerInitialInstall":"install bx-mail,bx-mysql,bx-derby,bx-compat-cfml@be,bx-unsafe-evaluate,bx-esapi --noSave" } -} \ No newline at end of file +} From 6a8dfe2639161544af1a1f559a79d6454df96ee3 Mon Sep 17 00:00:00 2001 From: Oscar Tisnado <68830577+otisnado@users.noreply.github.com> Date: Tue, 4 Feb 2025 22:55:22 -0600 Subject: [PATCH 08/30] ci: use ubuntu-24.04 runner --- .github/workflows/main.yml | 2 +- .github/workflows/pr.yml | 2 +- .github/workflows/release.yml | 4 ++-- .github/workflows/snapshot.yml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f720015..08c03bb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ jobs: ########################################################################################## format: name: Code Auto-Formatting - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index a48c550..355726a 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -19,7 +19,7 @@ jobs: formatCheck: name: Checks Source Code Formatting - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Checkout Repository uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 71ae973..29b50ef 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: ########################################################################################## build: name: Build & Publish - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Checkout Repository uses: actions/checkout@v4 @@ -127,7 +127,7 @@ jobs: prep_next_release: name: Prep Next Release if: github.ref == 'refs/heads/main' - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 needs: [ build ] steps: # Checkout development diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 8ef1a7e..d566589 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -19,7 +19,7 @@ jobs: ########################################################################################## format: name: Code Auto-Formatting - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 From 81db4ef6192450efd400244b44777b60c7ade2e1 Mon Sep 17 00:00:00 2001 From: Oscar Tisnado <68830577+otisnado@users.noreply.github.com> Date: Thu, 6 Feb 2025 11:10:38 -0600 Subject: [PATCH 09/30] fix version mistake --- .github/workflows/tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3a79d85..6650b06 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -52,8 +52,9 @@ jobs: coldboxVersion: "be" cfengine: "adobe@2021" experimental: true - - commandVersion: "be" + - commandVersion: "6.2.0-alpha" cfengine: "boxlang@1" + coldboxVersion: "be" experimental: true steps: - name: Checkout Repository From d7230c261121c5d8a9fdba0ed140deedff322081 Mon Sep 17 00:00:00 2001 From: Oscar Tisnado <68830577+otisnado@users.noreply.github.com> Date: Thu, 6 Feb 2025 11:37:05 -0600 Subject: [PATCH 10/30] fix wrong matrix variable name --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6650b06..002ed05 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -52,7 +52,7 @@ jobs: coldboxVersion: "be" cfengine: "adobe@2021" experimental: true - - commandVersion: "6.2.0-alpha" + - commandbox_version: "6.2.0-alpha" cfengine: "boxlang@1" coldboxVersion: "be" experimental: true From 0f266be605e3129258afc5a635858c08e623614d Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Wed, 19 Feb 2025 22:30:47 +0100 Subject: [PATCH 11/30] boxlang certs --- .github/workflows/cron.yml | 10 +++ .github/workflows/main.yml | 43 ---------- .github/workflows/pr.yml | 5 +- .github/workflows/release.yml | 62 +++++++++++--- .github/workflows/snapshot.yml | 14 ++++ .github/workflows/tests.yml | 83 +++++++++---------- .markdownlint.json | 6 +- box.json | 4 +- build/Build.cfc | 3 +- changelog.md | 7 +- readme.md | 6 +- server-adobe@2018.json | 24 ------ server-adobe@2021.json | 4 + ...xlang@1.json => server-boxlang-cfml@1.json | 6 +- server.json | 24 ------ 15 files changed, 138 insertions(+), 163 deletions(-) create mode 100644 .github/workflows/cron.yml delete mode 100644 .github/workflows/main.yml delete mode 100644 server-adobe@2018.json rename server-boxlang@1.json => server-boxlang-cfml@1.json (76%) delete mode 100644 server.json diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml new file mode 100644 index 0000000..b47207b --- /dev/null +++ b/.github/workflows/cron.yml @@ -0,0 +1,10 @@ +name: Daily Tests + +on: + schedule: + - cron: '0 0 * * *' # Runs at 00:00 UTC every day + +jobs: + tests: + uses: ./.github/workflows/tests.yml + secrets: inherit diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 08c03bb..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Build Main - -on: - push: - branches: - - 'main' - -jobs: - ########################################################################################## - # Module Tests - ########################################################################################## - tests: - secrets: inherit - uses: ./.github/workflows/tests.yml - - ########################################################################################## - # Format Source Code - ########################################################################################## - format: - name: Code Auto-Formatting - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v4 - - - name: Auto-format - uses: Ortus-Solutions/commandbox-action@v1.0.2 - with: - cmd: run-script format - - - name: Commit Format Changes - uses: stefanzweifel/git-auto-commit-action@v5 - with: - commit_message: Apply cfformat changes - - ########################################################################################## - # Release it - ########################################################################################## - release: - uses: ./.github/workflows/release.yml - needs: [ tests, format ] - secrets: inherit - with: - snapshot: false diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 355726a..b0bf721 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -6,10 +6,8 @@ on: - "main" - "master" - "development" - - "releases/v*" pull_request: branches: - - "releases/v*" - development jobs: @@ -17,7 +15,8 @@ jobs: uses: ./.github/workflows/tests.yml secrets: inherit - formatCheck: + # Format PR + format_check: name: Checks Source Code Formatting runs-on: ubuntu-24.04 steps: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 29b50ef..c9069d6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,7 +1,13 @@ name: Build a Release on: - # Reusable workflow only : called by either the `release` or `main` workflows + # If you push to master|main this will trigger a stable release + push: + branches: + - master + - main + + # Reusable workflow : Usually called by a `snapshot` workflow workflow_call: inputs: snapshot: @@ -10,9 +16,13 @@ on: default: false type: boolean + # Manual Trigger + workflow_dispatch: env: - MODULE_ID: cbfs + MODULE_ID: ${{ github.event.repository.name }} + JDK: 21 SNAPSHOT: ${{ inputs.snapshot || false }} + BUILD_ID: ${{ github.run_number }} jobs: ########################################################################################## @@ -21,6 +31,11 @@ jobs: build: name: Build & Publish runs-on: ubuntu-24.04 + permissions: + checks: write + pull-requests: write + contents: write + issues: write steps: - name: Checkout Repository uses: actions/checkout@v4 @@ -30,6 +45,12 @@ jobs: with: forgeboxAPIKey: ${{ secrets.FORGEBOX_TOKEN }} + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: "temurin" + java-version: ${{ env.JDK }} + - name: "Setup Environment Variables For Build Process" id: current_version run: | @@ -44,7 +65,7 @@ jobs: fi - name: Update changelog [unreleased] with latest version - uses: thomaseizinger/keep-a-changelog-new-release@1.3.0 + uses: thomaseizinger/keep-a-changelog-new-release@3.1.0 if: env.SNAPSHOT == 'false' with: changelogPath: ./changelog.md @@ -55,10 +76,10 @@ jobs: npm install -g markdownlint-cli markdownlint changelog.md --fix box install commandbox-docbox - box task run taskfile=build/Build target=run :version=${{ env.VERSION }} :projectName=${{ env.MODULE_ID }} :buildID=${{ github.run_number }} :branch=${{ env.BRANCH }} + box task run taskfile=build/Build target=run :version=${{ env.VERSION }} :projectName=${{ env.MODULE_ID }} :buildID=${{ env.BUILD_ID }} :branch=${{ env.BRANCH }} - - name: Commit Changelog To Master - uses: EndBug/add-and-commit@v9.1.1 + - name: Commit Changelog [unreleased] with latest version + uses: EndBug/add-and-commit@v9.1.4 if: env.SNAPSHOT == 'false' with: author_name: Github Actions @@ -67,7 +88,7 @@ jobs: add: changelog.md - name: Tag Version - uses: rickstaa/action-create-tag@v1.6.1 + uses: rickstaa/action-create-tag@v1.7.2 if: env.SNAPSHOT == 'false' with: tag: "v${{ env.VERSION }}" @@ -76,7 +97,7 @@ jobs: - name: Upload Build Artifacts if: success() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.MODULE_ID }} path: | @@ -112,7 +133,7 @@ jobs: box forgebox publish --force - name: Create Github Release - uses: taiki-e/create-gh-release-action@v1.6.2 + uses: taiki-e/create-gh-release-action@v1.8.2 continue-on-error: true if: env.SNAPSHOT == 'false' with: @@ -121,14 +142,31 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} ref: refs/tags/v${{ env.VERSION }} + - name: Inform Slack + if: ${{ always() }} + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_CHANNEL: coding + SLACK_COLOR: ${{ job.status }} # or a specific color like 'green' or '#ff00ff' + SLACK_ICON_EMOJI: ":bell:" + SLACK_MESSAGE: "Module ${{ env.MODULE_ID }} v${{ env.VERSION }} Built with ${{ job.status }}!" + SLACK_TITLE: "ColdBox Module ${{ env.MODULE_ID }}" + SLACK_USERNAME: CI + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + ########################################################################################## # Prep Next Release ########################################################################################## prep_next_release: name: Prep Next Release - if: github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' runs-on: ubuntu-24.04 needs: [ build ] + permissions: + checks: write + pull-requests: write + contents: write + issues: write steps: # Checkout development - name: Checkout Repository @@ -155,7 +193,7 @@ jobs: # Bump to next version - name: Bump Version run: | - box bump --patch --!TagVersion + box bump --minor --!TagVersion # Commit it back to development - name: Commit Version Bump @@ -163,7 +201,7 @@ jobs: with: author_name: Github Actions author_email: info@ortussolutions.com - message: 'Version bump [ci skip]' + message: 'Version bump' add: | box.json changelog.md diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index d566589..50c8392 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -4,8 +4,14 @@ on: push: branches: - 'development' + workflow_dispatch: +# Unique group name per workflow-branch/tag combo +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: ########################################################################################## # Module Tests @@ -20,6 +26,9 @@ jobs: format: name: Code Auto-Formatting runs-on: ubuntu-24.04 + permissions: + contents: write + checks: write steps: - uses: actions/checkout@v4 @@ -40,5 +49,10 @@ jobs: uses: ./.github/workflows/release.yml needs: [ tests, format ] secrets: inherit + permissions: + checks: write + pull-requests: write + contents: write + issues: write with: snapshot: true diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 002ed05..32739be 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,14 +5,14 @@ on: workflow_call: secrets: SLACK_WEBHOOK_URL: - required: true + required: false S3SDK_AWS_BUCKET_NAME: required: true jobs: tests: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 services: s3Mock: image: adobe/s3mock @@ -27,34 +27,25 @@ jobs: strategy: fail-fast: false matrix: - commandbox_version: [ "6.1.0-rc" ] - cfengine: [ "lucee@5", "adobe@2021", "adobe@2023" ] - coldboxVersion: [ "^6.0.0", "^7.0.0" ] + cfengine: [ "boxlang-cfml@1", "lucee@5", "lucee@6", "adobe@2021", "adobe@2023" ] + coldboxVersion: [ "^7.0.0" ] experimental: [ false ] + # Experimental: ColdBox BE vs All Engines include: - - commandbox_version: "6.1.0-rc" - coldboxVersion: "^6.0.0" - cfengine: "adobe@2018" - experimental: false - - commandbox_version: "6.1.0-rc" - coldboxVersion: "^7.0.0" - cfengine: "lucee@6" - experimental: true - - commandbox_version: "6.1.0-rc" - coldboxVersion: "be" + - coldboxVersion: "be" cfengine: "lucee@5" experimental: true - - commandbox_version: "6.1.0-rc" - coldboxVersion: "be" - cfengine: "adobe@2018" + - coldboxVersion: "be" + cfengine: "lucee@6" experimental: true - - commandbox_version: "6.1.0-rc" - coldboxVersion: "be" + - coldboxVersion: "be" cfengine: "adobe@2021" experimental: true - - commandbox_version: "6.2.0-alpha" - cfengine: "boxlang@1" - coldboxVersion: "be" + - coldboxVersion: "be" + cfengine: "adobe@2023" + experimental: true + - coldboxVersion: "be" + cfengine: "boxlang-cfml@1" experimental: true steps: - name: Checkout Repository @@ -65,17 +56,23 @@ jobs: uses: actions/setup-java@v4 with: distribution: "temurin" - java-version: "11" + java-version: "21" + + - name: Setup Environment For Testing Process + run: | + # Setup .env + touch .env + # ENV + printf "ENVIRONMENT=development\n" >> .env + printf "DB_HOST=localhost\n" >> .env + printf "DB_USER=${{ env.DB_USER }}\n" >> .env + printf "DB_PASSWORD=${{ env.DB_PASSWORD }}\n" >> .env + printf "DB_CLASS=com.mysql.cj.jdbc.Driver\n" >> .env + printf "DB_BUNDLEVERSION=8.0.19\n" >> .env + printf "DB_BUNDLENAME=com.mysql.cj\n" >> .env - name: Setup CommandBox CLI uses: Ortus-Solutions/setup-commandbox@v2.0.1 - with: - version: ${{ matrix.commandbox_version }} - - - name: Update Commandbox Boxlang Module - if: ${{ matrix.cfengine == 'boxlang@1' }} - run: - box install --force commandbox-boxlang - name: Install Dependencies run: | @@ -137,15 +134,15 @@ jobs: .engine/**/logs/* .engine/**/WEB-INF/cfusion/logs/* - # - name: Slack Notifications - # # Only on failures and NOT in pull requests - # if: ${{ failure() && !startsWith( 'pull_request', github.event_name ) }} - # uses: rtCamp/action-slack-notify@v2 - # env: - # SLACK_CHANNEL: coding - # SLACK_COLOR: ${{ job.status }} # or a specific color like 'green' or '#ff00ff' - # SLACK_ICON_EMOJI: ":bell:" - # SLACK_MESSAGE: '${{ github.repository }} tests failed :cry:' - # SLACK_TITLE: ${{ github.repository }} Tests For ${{ matrix.cfengine }} with ColdBox ${{ matrix.coldboxVersion }} failed - # SLACK_USERNAME: CI - # SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + - name: Slack Notifications + # Only on failures and NOT in pull requests + if: ${{ failure() && !startsWith( 'pull_request', github.event_name ) }} + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_CHANNEL: coding + SLACK_COLOR: ${{ job.status }} # or a specific color like 'green' or '#ff00ff' + SLACK_ICON_EMOJI: ":bell:" + SLACK_MESSAGE: '${{ github.repository }} tests failed :cry:' + SLACK_TITLE: ${{ github.repository }} Tests For ${{ matrix.cfengine }} with ColdBox ${{ matrix.coldboxVersion }} failed + SLACK_USERNAME: CI + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.markdownlint.json b/.markdownlint.json index 36204cd..21bc843 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -8,7 +8,9 @@ "no-multiple-blanks": { "maximum": 2 }, - "no-duplicate-header" : false, + "no-duplicate-header" : { + "siblings_only" : true + }, "no-duplicate-heading" : false, "no-inline-html" : false -} \ No newline at end of file +} diff --git a/box.json b/box.json index 79a4550..97fcb91 100644 --- a/box.json +++ b/box.json @@ -26,6 +26,7 @@ "s3sdk":"^5.1.2" }, "devDependencies":{ + "commandbox-boxlang":"*", "commandbox-cfformat":"*", "commandbox-docbox":"*" }, @@ -51,13 +52,10 @@ "install:dependencies":"install --force && cd test-harness && install --force", "start:S3Mock":"!docker run --rm -d --name cbfs-s3-mock -p 9090:9090 -p 9191:9191 -e initialBuckets=cbfs-test -t adobe/s3mock", "start:lucee":"server start serverConfigFile=server-lucee@5.json", - "start:2018":"server start serverConfigFile=server-adobe@2018.json", "start:2021":"server start serverConfigFile=server-adobe@2021.json", "stop:lucee":"server stop serverConfigFile=server-lucee@5.json", - "stop:2018":"server stop serverConfigFile=server-adobe@2018.json", "stop:2021":"server stop serverConfigFile=server-adobe@2021.json", "logs:lucee":"server log serverConfigFile=server-lucee@5.json --follow", - "logs:2018":"server log serverConfigFile=server-adobe@2018.json --follow", "logs:2021":"server log serverConfigFile=server-adobe@2021.json --follow" } } diff --git a/build/Build.cfc b/build/Build.cfc index 7e50596..b15a671 100644 --- a/build/Build.cfc +++ b/build/Build.cfc @@ -201,7 +201,6 @@ component { // Create project mapping fileSystemUtil.createMapping( arguments.projectName, variables.cwd ); - fileSystemUtil.createMapping( "coldbox", variables.cwd & "test-harness/coldbox" ); // Generate Docs print.greenLine( "Generating API Docs, please wait..." ).toConsole(); @@ -307,4 +306,4 @@ component { variables.exportsDir = variables.artifactsDir & "/#projectName#/#arguments.version#"; directoryCreate( variables.exportsDir, true, true ); } -} \ No newline at end of file +} diff --git a/changelog.md b/changelog.md index 4abdb6c..64544e3 100644 --- a/changelog.md +++ b/changelog.md @@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- BoxLang certification +- Github Actions updates + ### Changed * Issue #40 - `createFromFile` now returns a file object of the created file @@ -19,7 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Issue #49 - Fix windows pathing issues when the disk path is relative or mapped - + ## [1.1.2] - 2023-05-18 diff --git a/readme.md b/readme.md index 8abfb9f..89b57e4 100644 --- a/readme.md +++ b/readme.md @@ -33,9 +33,9 @@ Apache License, Version 2.0. ## System Requirements -- Lucee 5+ -- Adobe ColdFusion 2018+ -- Java 11-15 +- BoxLang 1+ +- Lucee 5+ +- Adobe ColdFusion 2021+ ## Installation diff --git a/server-adobe@2018.json b/server-adobe@2018.json deleted file mode 100644 index e982feb..0000000 --- a/server-adobe@2018.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name":"cbfs-adobe@2018", - "app":{ - "serverHomeDirectory":".engine/adobe2018", - "cfengine":"adobe@2018" - }, - "web":{ - "http":{ - "port":"60299" - }, - "rewrites":{ - "enable":"true" - }, - "webroot":"test-harness", - "aliases":{ - "/moduleroot/cbfs":"../", - "/root":"./test-harness" - } - }, - "openBrowser":"false", - "cfconfig":{ - "file":".cfconfig.json" - } -} diff --git a/server-adobe@2021.json b/server-adobe@2021.json index e94ea5d..3fc486b 100644 --- a/server-adobe@2021.json +++ b/server-adobe@2021.json @@ -16,6 +16,10 @@ "/moduleroot/cbfs":"../", "/root":"./test-harness" } + }, + "jvm":{ + "heapSize":"1024", + "javaVersion":"openjdk11_jre" }, "openBrowser":"false", "cfconfig":{ diff --git a/server-boxlang@1.json b/server-boxlang-cfml@1.json similarity index 76% rename from server-boxlang@1.json rename to server-boxlang-cfml@1.json index f4ee0e9..15d8985 100644 --- a/server-boxlang@1.json +++ b/server-boxlang-cfml@1.json @@ -21,8 +21,8 @@ }, "JVM":{ "heapSize":"1024", - "javaVersion":"openjdk21_jdk", - "args":"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9999 -Dboxlang.debugMode=true" + "javaVersion":"openjdk21_jre", + "args":"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8888" }, "cfconfig":{ "file":".cfconfig.json" @@ -31,6 +31,6 @@ "BOXLANG_DEBUG":true }, "scripts":{ - "onServerInitialInstall":"install bx-mail,bx-mysql,bx-derby,bx-compat-cfml@be,bx-unsafe-evaluate,bx-esapi --noSave" + "onServerInitialInstall":"install bx-compat-cfml --noSave" } } diff --git a/server.json b/server.json deleted file mode 100644 index ca83d70..0000000 --- a/server.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name":"cbfs-lucee@5", - "app":{ - "serverHomeDirectory":".engine/lucee5", - "cfengine":"lucee@5" - }, - "web":{ - "http":{ - "port":"60299" - }, - "rewrites":{ - "enable":"true" - }, - "webroot":"test-harness", - "aliases":{ - "/moduleroot/cbfs":"./", - "/root":"./test-harness" - } - }, - "openBrowser":"false", - "cfconfig":{ - "file":".cfconfig.json" - } -} From 9137f668312727cd3462ea78659cb5a480aca8bf Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Wed, 19 Feb 2025 22:34:41 +0100 Subject: [PATCH 12/30] s3sdk --- test-harness/box.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test-harness/box.json b/test-harness/box.json index 497106f..8ab25b4 100644 --- a/test-harness/box.json +++ b/test-harness/box.json @@ -5,10 +5,11 @@ "private":true, "description":"", "dependencies":{ - "coldbox":"7" + "coldbox":"^7", + "s3sdk":"^5.1.2" }, "devDependencies":{ - "testbox":"^5.4.0+7" + "testbox":"*" }, "installPaths":{ "coldbox":"coldbox/", From 09017e9011b9d7948628459b05acf3eb2e9415a6 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Wed, 19 Feb 2025 22:37:10 +0100 Subject: [PATCH 13/30] make server configs unique --- server-adobe@2023.json | 3 ++- server-boxlang-cfml@1.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/server-adobe@2023.json b/server-adobe@2023.json index 01f6ae5..5c24b11 100644 --- a/server-adobe@2023.json +++ b/server-adobe@2023.json @@ -13,7 +13,8 @@ }, "webroot": "test-harness", "aliases":{ - "/moduleroot/cbfs":"../" + "/moduleroot/cbfs":"../", + "/root":"./test-harness" } }, "jvm":{ diff --git a/server-boxlang-cfml@1.json b/server-boxlang-cfml@1.json index 15d8985..ae478c6 100644 --- a/server-boxlang-cfml@1.json +++ b/server-boxlang-cfml@1.json @@ -16,7 +16,8 @@ }, "webroot":"test-harness", "aliases":{ - "/moduleroot/cbfs":"./" + "/moduleroot/cbfs":"./", + "/root":"./test-harness" } }, "JVM":{ From 305ac06bfcd2a4cfb46f6390403ff45bc93ab814 Mon Sep 17 00:00:00 2001 From: Jon Clausen Date: Sun, 23 Feb 2025 14:57:37 -0500 Subject: [PATCH 14/30] BL compat testing updates --- models/testing/AbstractDiskSpec.cfc | 25 ++++++++++++++++++++++++- server-boxlang-cfml@1.json | 4 ++-- test-harness/box.json | 3 +-- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/models/testing/AbstractDiskSpec.cfc b/models/testing/AbstractDiskSpec.cfc index 28f0ff5..89f677b 100644 --- a/models/testing/AbstractDiskSpec.cfc +++ b/models/testing/AbstractDiskSpec.cfc @@ -95,6 +95,10 @@ component extends="coldbox.system.testing.BaseTestCase" { } ); story( "The disk can create files from an existing file", function(){ + beforeEach( function( currentSpec ){ + disk.delete( variables.pathPrefix & "space_ninja2.png" ); + sleepIfNIO(); + } ); given( "given a existing file path", function(){ then( "it should create the file", function(){ var path = variables.pathPrefix & "space_ninja2.png"; @@ -121,8 +125,12 @@ component extends="coldbox.system.testing.BaseTestCase" { fileDelete( clone ); } + sleepIfNIO(); + fileCopy( original, clone ); + sleepIfNIO(); + disk.createFromFile( source : clone, directory : getDirectoryFromPath( path ), @@ -330,6 +338,7 @@ component extends="coldbox.system.testing.BaseTestCase" { destination = variables.pathPrefix & "test_file_two.txt"; disk.delete( sourcePath ); disk.delete( destination ); + sleepIfNIO(); } ); given( "An existing source and a non-existing destination", function(){ then( "it should move the source to the destination", function(){ @@ -467,7 +476,7 @@ component extends="coldbox.system.testing.BaseTestCase" { { "disk" : disk.getName() } ); try { - if ( server.keyExists( "lucee" ) ) { + if ( server.keyExists( "lucee" ) && !server.keyExists( "boxlang" ) ) { var req = new http( method = "GET", url = downloadTestEndpoint ); var resp = req.send().getPrefix(); } else { @@ -1004,6 +1013,7 @@ component extends="coldbox.system.testing.BaseTestCase" { destinationPath = variables.pathPrefix & "tddtests"; disk.deleteDirectory( sourcePath ); disk.deleteDirectory( destinationPath ); + sleepIfNIO(); } ); given( "a valid source and destination with no recurse and no filter", function(){ @@ -1166,6 +1176,7 @@ component extends="coldbox.system.testing.BaseTestCase" { story( "The disk can get the contents of a directory", function(){ beforeEach( function( currentSpec ){ disk.deleteDirectory( variables.pathPrefix & "bddtests" ); + sleepIfNIO(); } ); given( "a valid directory", function(){ then( "it will list the directory", function(){ @@ -1292,6 +1303,7 @@ component extends="coldbox.system.testing.BaseTestCase" { story( "The disk can get file information maps", function(){ beforeEach( function( currentSpec ){ disk.deleteDirectory( variables.pathPrefix & "bddtests" ); + sleepIfNIO(); } ); given( "a valid directory", function(){ then( "it can get a file map structure", function(){ @@ -1324,6 +1336,7 @@ component extends="coldbox.system.testing.BaseTestCase" { story( "The disk can get multiple file content maps", function(){ beforeEach( function( currentSpec ){ disk.deleteDirectory( variables.pathPrefix & "bddtests" ); + sleepIfNIO(); } ); given( "a valid directory", function(){ then( "it can get a file content map structure", function(){ @@ -1376,6 +1389,7 @@ component extends="coldbox.system.testing.BaseTestCase" { story( "The disk can work with binary and non-binary files", function(){ beforeEach( function( currentSpec ){ disk.deleteDirectory( variables.pathPrefix & "bddtests" ); + sleepIfNIO(); } ); given( "we have a json file", function(){ then( "it should determine the file is not binary", function(){ @@ -1496,4 +1510,13 @@ component extends="coldbox.system.testing.BaseTestCase" { return reFindNoCase( "Mac", createObject( "java", "java.lang.System" ).getProperties()[ "os.name" ] ); } + /** + * Boxlang uses java.nio which is non blocking so file operations may take a few ms to complete. + */ + function sleepIfNIO( duration = 50 ){ + if( getMetadata( this ).name == "LocalProvider" && server.keyExists( "boxlang" ) ){ + sleep( duration ); + } + } + } diff --git a/server-boxlang-cfml@1.json b/server-boxlang-cfml@1.json index ae478c6..2eff753 100644 --- a/server-boxlang-cfml@1.json +++ b/server-boxlang-cfml@1.json @@ -17,7 +17,7 @@ "webroot":"test-harness", "aliases":{ "/moduleroot/cbfs":"./", - "/root":"./test-harness" + "/root":"./test-harness" } }, "JVM":{ @@ -32,6 +32,6 @@ "BOXLANG_DEBUG":true }, "scripts":{ - "onServerInitialInstall":"install bx-compat-cfml --noSave" + "onServerInitialInstall":"install bx-compat-cfml@be,bx-esapi --noSave" } } diff --git a/test-harness/box.json b/test-harness/box.json index 8ab25b4..05e82c3 100644 --- a/test-harness/box.json +++ b/test-harness/box.json @@ -5,8 +5,7 @@ "private":true, "description":"", "dependencies":{ - "coldbox":"^7", - "s3sdk":"^5.1.2" + "coldbox":"^7" }, "devDependencies":{ "testbox":"*" From 610b932adba3d401c396f8aff24a794f7b7097c4 Mon Sep 17 00:00:00 2001 From: jclausen <5255645+jclausen@users.noreply.github.com> Date: Sun, 23 Feb 2025 19:58:39 +0000 Subject: [PATCH 15/30] Apply cfformat changes --- models/testing/AbstractDiskSpec.cfc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/testing/AbstractDiskSpec.cfc b/models/testing/AbstractDiskSpec.cfc index 89f677b..9f65b78 100644 --- a/models/testing/AbstractDiskSpec.cfc +++ b/models/testing/AbstractDiskSpec.cfc @@ -1514,7 +1514,7 @@ component extends="coldbox.system.testing.BaseTestCase" { * Boxlang uses java.nio which is non blocking so file operations may take a few ms to complete. */ function sleepIfNIO( duration = 50 ){ - if( getMetadata( this ).name == "LocalProvider" && server.keyExists( "boxlang" ) ){ + if ( getMetadata( this ).name == "LocalProvider" && server.keyExists( "boxlang" ) ) { sleep( duration ); } } From 2a22b17fac4f369977891fa11adb51f48620dc38 Mon Sep 17 00:00:00 2001 From: Jon Clausen Date: Sun, 23 Feb 2025 17:24:46 -0500 Subject: [PATCH 16/30] readme updates --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 89b57e4..b63bc8c 100644 --- a/readme.md +++ b/readme.md @@ -33,7 +33,7 @@ Apache License, Version 2.0. ## System Requirements -- BoxLang 1+ +- [BoxLang 1+](https://www.boxlang.io/) - Lucee 5+ - Adobe ColdFusion 2021+ From b85bc24016ae1fc5f69c16682790b929af3552cc Mon Sep 17 00:00:00 2001 From: Jon Clausen Date: Sun, 23 Feb 2025 18:15:19 -0500 Subject: [PATCH 17/30] fixes for env not being sourced in for S3 mock --- .github/workflows/tests.yml | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 32739be..a2d33ce 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,7 +19,7 @@ jobs: ports: - 9090:9090 env: - initialBuckets: ${{ secrets.S3SDK_AWS_BUCKET_NAME }} + initialBuckets: cbfs-test env: DB_USER: root DB_PASSWORD: root @@ -28,7 +28,7 @@ jobs: fail-fast: false matrix: cfengine: [ "boxlang-cfml@1", "lucee@5", "lucee@6", "adobe@2021", "adobe@2023" ] - coldboxVersion: [ "^7.0.0" ] + coldboxVersion: [ "^7" ] experimental: [ false ] # Experimental: ColdBox BE vs All Engines include: @@ -70,10 +70,21 @@ jobs: printf "DB_CLASS=com.mysql.cj.jdbc.Driver\n" >> .env printf "DB_BUNDLEVERSION=8.0.19\n" >> .env printf "DB_BUNDLENAME=com.mysql.cj\n" >> .env + printf "AWS_S3_DOMAIN=127.0.0.1:9090\n" >> .env + printf "AWS_S3_SSL=false\n" >> .env + printf "AWS_S3_REGION"=\n" >> .env + printf "AWS_S3_PUBLIC_DOMAIN=127.0.0.1:9090/cbfs-test\n" >> .env + printf "AWS_S3_BUCKET_NAME=cbfs-test\n" >> .env - name: Setup CommandBox CLI uses: Ortus-Solutions/setup-commandbox@v2.0.1 + # This needs to happen until v6.2 of commandbox is released + - name: Update CommandBox-BoxLang + if : ${{ matrix.cfengine == 'boxlang-cfml@1' }} + run: | + box install --force commandbox-boxlang + - name: Install Dependencies run: | box install @@ -82,25 +93,11 @@ jobs: box install - name: Start ${{ matrix.cfengine }} Server - env: - ENVIRONMENT: development - AWS_S3_DOMAIN: 127.0.0.1:9090 - AWS_S3_SSL: "false" - AWS_S3_REGION: - AWS_S3_PUBLIC_DOMAIN: 127.0.0.1:9090/cbfs-test - AWS_S3_BUCKET_NAME: ${{ secrets.S3SDK_AWS_BUCKET_NAME }} run: | box server start serverConfigFile="server-${{ matrix.cfengine }}.json" --noSaveSettings --debug curl http://127.0.0.1:60299 - name: Run Tests - env: - ENVIRONMENT: development - AWS_S3_DOMAIN: 127.0.0.1:9090 - AWS_S3_SSL: "false" - AWS_S3_REGION: - AWS_S3_PUBLIC_DOMAIN: 127.0.0.1:9090/cbfs-test - AWS_S3_BUCKET_NAME: ${{ secrets.S3SDK_AWS_BUCKET_NAME }} run: | mkdir -p test-harness/tests/results box testbox run --verbose outputFile=test-harness/tests/results/test-results outputFormats=json,antjunit From 162772267ebeb30cf0bc9044def8883823a2787a Mon Sep 17 00:00:00 2001 From: Jon Clausen Date: Sun, 23 Feb 2025 18:19:38 -0500 Subject: [PATCH 18/30] fix unclosed quote --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a2d33ce..048ad10 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -72,7 +72,7 @@ jobs: printf "DB_BUNDLENAME=com.mysql.cj\n" >> .env printf "AWS_S3_DOMAIN=127.0.0.1:9090\n" >> .env printf "AWS_S3_SSL=false\n" >> .env - printf "AWS_S3_REGION"=\n" >> .env + printf "AWS_S3_REGION=\n" >> .env printf "AWS_S3_PUBLIC_DOMAIN=127.0.0.1:9090/cbfs-test\n" >> .env printf "AWS_S3_BUCKET_NAME=cbfs-test\n" >> .env From c575c7d8e99dace1f156480a07c8de745fed297a Mon Sep 17 00:00:00 2001 From: Jon Clausen Date: Sun, 23 Feb 2025 18:39:05 -0500 Subject: [PATCH 19/30] try pinning commandbox version --- .github/workflows/tests.yml | 3 +++ box.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 048ad10..e0cc0a4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -78,6 +78,8 @@ jobs: - name: Setup CommandBox CLI uses: Ortus-Solutions/setup-commandbox@v2.0.1 + with: + version: 6.1.0 # This needs to happen until v6.2 of commandbox is released - name: Update CommandBox-BoxLang @@ -91,6 +93,7 @@ jobs: cd test-harness box package set dependencies.coldbox=${{ matrix.coldboxVersion }} box install + cd ../ - name: Start ${{ matrix.cfengine }} Server run: | diff --git a/box.json b/box.json index 97fcb91..de774d4 100644 --- a/box.json +++ b/box.json @@ -23,7 +23,7 @@ "contributors":[], "dependencies":{ "cbstreams":"^2.0", - "s3sdk":"^5.1.2" + "s3sdk":"^5.7.1" }, "devDependencies":{ "commandbox-boxlang":"*", From ef19be4eade266b57f9c3a182b1b3df1c00a2c7f Mon Sep 17 00:00:00 2001 From: Jon Clausen Date: Sun, 23 Feb 2025 19:54:35 -0500 Subject: [PATCH 20/30] manually remove coldbox virtual app as the subsequent tests are not loading coldbox correctly --- test-harness/tests/specs/services/DiskServiceSpec.cfc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test-harness/tests/specs/services/DiskServiceSpec.cfc b/test-harness/tests/specs/services/DiskServiceSpec.cfc index 4587ea1..36a4886 100644 --- a/test-harness/tests/specs/services/DiskServiceSpec.cfc +++ b/test-harness/tests/specs/services/DiskServiceSpec.cfc @@ -22,6 +22,13 @@ component extends="coldbox.system.testing.BaseTestCase" { */ function afterAll(){ super.afterAll(); + if( structKeyExists( request, "coldBoxVirtualApp" ) ){ + // Shutdown the virtual app + request.coldBoxVirtualApp.shutdown(); + } + structDelete( request, "coldboxVirtualApp" ); + structDelete( application, "cbController" ); + structDelete( application, "wirebox" ); } /*********************************** BDD SUITES ***********************************/ From 71e406f3744259a4e71872d47ba5cbd54ee0ac0d Mon Sep 17 00:00:00 2001 From: jclausen <5255645+jclausen@users.noreply.github.com> Date: Mon, 24 Feb 2025 00:55:17 +0000 Subject: [PATCH 21/30] Apply cfformat changes --- test-harness/tests/specs/services/DiskServiceSpec.cfc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-harness/tests/specs/services/DiskServiceSpec.cfc b/test-harness/tests/specs/services/DiskServiceSpec.cfc index 36a4886..0036372 100644 --- a/test-harness/tests/specs/services/DiskServiceSpec.cfc +++ b/test-harness/tests/specs/services/DiskServiceSpec.cfc @@ -22,7 +22,7 @@ component extends="coldbox.system.testing.BaseTestCase" { */ function afterAll(){ super.afterAll(); - if( structKeyExists( request, "coldBoxVirtualApp" ) ){ + if ( structKeyExists( request, "coldBoxVirtualApp" ) ) { // Shutdown the virtual app request.coldBoxVirtualApp.shutdown(); } From f516d7abe9fe9a168db5af8f42173edd42a2bfc7 Mon Sep 17 00:00:00 2001 From: Jon Clausen Date: Sun, 23 Feb 2025 20:06:51 -0500 Subject: [PATCH 22/30] try re-creating virtual app --- .../tests/specs/services/DiskServiceSpec.cfc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/test-harness/tests/specs/services/DiskServiceSpec.cfc b/test-harness/tests/specs/services/DiskServiceSpec.cfc index 0036372..7373558 100644 --- a/test-harness/tests/specs/services/DiskServiceSpec.cfc +++ b/test-harness/tests/specs/services/DiskServiceSpec.cfc @@ -25,10 +25,17 @@ component extends="coldbox.system.testing.BaseTestCase" { if ( structKeyExists( request, "coldBoxVirtualApp" ) ) { // Shutdown the virtual app request.coldBoxVirtualApp.shutdown(); + structDelete( request, "coldboxVirtualApp" ); + structDelete( application, "wirebox" ); + structDelete( application, "cbController" ); + request.coldBoxVirtualApp = new coldbox.system.testing.VirtualApp(); + request.coldBoxVirtualApp.startup(); + } else { + structDelete( application, "wirebox" ); + structDelete( application, "cbController" ); + request.coldBoxVirtualApp = new coldbox.system.testing.VirtualApp(); + request.coldBoxVirtualApp.startup(); } - structDelete( request, "coldboxVirtualApp" ); - structDelete( application, "cbController" ); - structDelete( application, "wirebox" ); } /*********************************** BDD SUITES ***********************************/ From 7cf135c620937252f80737a37048d224092490df Mon Sep 17 00:00:00 2001 From: Jon Clausen Date: Sun, 23 Feb 2025 20:16:35 -0500 Subject: [PATCH 23/30] Remove DiskServiceSpec until COLDBOX-1294 is fixed --- .github/workflows/tests.yml | 4 ++++ .../tests/specs/services/DiskServiceSpec.cfc | 14 -------------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e0cc0a4..1bf150b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -87,6 +87,10 @@ jobs: run: | box install --force commandbox-boxlang + - name: Remove DiskServiceSpec until COLDBOX-1294 is fixed + run: | + rm -rf test-harness/tests/specs/services/DiskServiceSpec.cfc + - name: Install Dependencies run: | box install diff --git a/test-harness/tests/specs/services/DiskServiceSpec.cfc b/test-harness/tests/specs/services/DiskServiceSpec.cfc index 7373558..4587ea1 100644 --- a/test-harness/tests/specs/services/DiskServiceSpec.cfc +++ b/test-harness/tests/specs/services/DiskServiceSpec.cfc @@ -22,20 +22,6 @@ component extends="coldbox.system.testing.BaseTestCase" { */ function afterAll(){ super.afterAll(); - if ( structKeyExists( request, "coldBoxVirtualApp" ) ) { - // Shutdown the virtual app - request.coldBoxVirtualApp.shutdown(); - structDelete( request, "coldboxVirtualApp" ); - structDelete( application, "wirebox" ); - structDelete( application, "cbController" ); - request.coldBoxVirtualApp = new coldbox.system.testing.VirtualApp(); - request.coldBoxVirtualApp.startup(); - } else { - structDelete( application, "wirebox" ); - structDelete( application, "cbController" ); - request.coldBoxVirtualApp = new coldbox.system.testing.VirtualApp(); - request.coldBoxVirtualApp.startup(); - } } /*********************************** BDD SUITES ***********************************/ From 5f67c52018657877654e14d1b577ee959b838104 Mon Sep 17 00:00:00 2001 From: Jon Clausen Date: Sun, 23 Feb 2025 20:30:28 -0500 Subject: [PATCH 24/30] add opens and jre versions --- server-adobe@2023.json | 3 ++- server-lucee@5.json | 3 +++ server-lucee@6.json | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/server-adobe@2023.json b/server-adobe@2023.json index 5c24b11..41b35ef 100644 --- a/server-adobe@2023.json +++ b/server-adobe@2023.json @@ -18,7 +18,8 @@ } }, "jvm":{ - "heapSize":"1024" + "heapSize":"1024", + "args" : "--add-opens java.base/sun.nio.fs=ALL-UNNAMED" }, "openBrowser":"false", "cfconfig": { diff --git a/server-lucee@5.json b/server-lucee@5.json index ca83d70..902d6cf 100644 --- a/server-lucee@5.json +++ b/server-lucee@5.json @@ -17,6 +17,9 @@ "/root":"./test-harness" } }, + "JVM":{ + "javaVersion":"openjdk11_jre" + }, "openBrowser":"false", "cfconfig":{ "file":".cfconfig.json" diff --git a/server-lucee@6.json b/server-lucee@6.json index c7379a3..b7471a0 100644 --- a/server-lucee@6.json +++ b/server-lucee@6.json @@ -17,6 +17,9 @@ "/root":"./test-harness" } }, + "jvm" : { + "args" : "--add-opens java.base/sun.nio.fs=ALL-UNNAMED" + }, "openBrowser":"false", "cfconfig":{ "file":".cfconfig.json" From d7a447c25fe1c7f31b6d1c067eb4e69e950e25fb Mon Sep 17 00:00:00 2001 From: Jon Clausen Date: Sun, 23 Feb 2025 21:08:55 -0500 Subject: [PATCH 25/30] remove lucee 6 from non-experimental --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1bf150b..db60f57 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -27,7 +27,7 @@ jobs: strategy: fail-fast: false matrix: - cfengine: [ "boxlang-cfml@1", "lucee@5", "lucee@6", "adobe@2021", "adobe@2023" ] + cfengine: [ "boxlang-cfml@1", "lucee@5", "adobe@2021", "adobe@2023" ] coldboxVersion: [ "^7" ] experimental: [ false ] # Experimental: ColdBox BE vs All Engines From 5ced7eba98c3098cb39dcb5db94d5af49a2deea1 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Tue, 7 Oct 2025 09:59:09 +0200 Subject: [PATCH 26/30] Update Router.cfc --- test-harness/config/Router.cfc | 2 -- 1 file changed, 2 deletions(-) diff --git a/test-harness/config/Router.cfc b/test-harness/config/Router.cfc index da3e27b..ad2d264 100644 --- a/test-harness/config/Router.cfc +++ b/test-harness/config/Router.cfc @@ -1,8 +1,6 @@ component { function configure(){ - setFullRewrites( true ); - route( ":handler/:action?" ).end(); } From 54405426d65b7a3ca943d3c8eb71dd84c636fdcf Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Tue, 7 Oct 2025 10:06:12 +0200 Subject: [PATCH 27/30] Update server-boxlang-cfml@1.json --- server-boxlang-cfml@1.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server-boxlang-cfml@1.json b/server-boxlang-cfml@1.json index 2eff753..4a8bd33 100644 --- a/server-boxlang-cfml@1.json +++ b/server-boxlang-cfml@1.json @@ -1,9 +1,9 @@ { "app":{ - "cfengine":"boxlang@be", - "serverHomeDirectory":".engine/boxlang" + "cfengine":"boxlang@1", + "serverHomeDirectory":".engine/boxlang-cfml" }, - "name":"cbfs-boxlang@1", + "name":"cbfs-boxlang-cfml@1", "force":true, "openBrowser":false, "web":{ @@ -32,6 +32,6 @@ "BOXLANG_DEBUG":true }, "scripts":{ - "onServerInitialInstall":"install bx-compat-cfml@be,bx-esapi --noSave" + "onServerInitialInstall":"install bx-compat-cfml,bx-esapi --noSave" } } From 003a9bde5673b8ba691f35631b9f36d3dab9c63b Mon Sep 17 00:00:00 2001 From: Jon Clausen Date: Fri, 10 Oct 2025 09:01:05 -0400 Subject: [PATCH 28/30] remove unnecessary empty bytes write --- models/providers/S3Provider.cfc | 2 -- 1 file changed, 2 deletions(-) diff --git a/models/providers/S3Provider.cfc b/models/providers/S3Provider.cfc index f1ea941..f3d80e4 100644 --- a/models/providers/S3Provider.cfc +++ b/models/providers/S3Provider.cfc @@ -484,8 +484,6 @@ component accessors="true" extends="cbfs.models.AbstractDiskProvider" { var response = variables.s3.getObject( bucketName = variables.properties.bucketName, uri = arguments.path ).response; if ( getMetadata( response ).name == "java.io.ByteArrayOutputStream" ) { - var bytes = []; - response.writeBytes( bytes ); return response.toByteArray(); } else { return response; From 933e111564711b41ae3b9c4a2aae1af10e560355 Mon Sep 17 00:00:00 2001 From: Jon Clausen Date: Tue, 28 Oct 2025 16:31:19 -0400 Subject: [PATCH 29/30] revert BL tests to be until 1.7 is out --- .github/workflows/tests.yml | 1 + server-boxlang-cfml@1.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index db60f57..fb064f4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -27,6 +27,7 @@ jobs: strategy: fail-fast: false matrix: + # Note the boxlang versions are on @be current due to BL-1823 not being available until 1.7 is released cfengine: [ "boxlang-cfml@1", "lucee@5", "adobe@2021", "adobe@2023" ] coldboxVersion: [ "^7" ] experimental: [ false ] diff --git a/server-boxlang-cfml@1.json b/server-boxlang-cfml@1.json index 4a8bd33..a185051 100644 --- a/server-boxlang-cfml@1.json +++ b/server-boxlang-cfml@1.json @@ -1,6 +1,6 @@ { "app":{ - "cfengine":"boxlang@1", + "cfengine":"boxlang@be", "serverHomeDirectory":".engine/boxlang-cfml" }, "name":"cbfs-boxlang-cfml@1", From cf9c88225f3d1f87f8487d3bd4dbbd88e981dc3a Mon Sep 17 00:00:00 2001 From: Jon Clausen Date: Tue, 4 Aug 2026 18:38:13 -0400 Subject: [PATCH 30/30] bump coldbox version and BL stable version --- server-boxlang-cfml@1.json | 2 +- test-harness/box.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server-boxlang-cfml@1.json b/server-boxlang-cfml@1.json index a185051..4a8bd33 100644 --- a/server-boxlang-cfml@1.json +++ b/server-boxlang-cfml@1.json @@ -1,6 +1,6 @@ { "app":{ - "cfengine":"boxlang@be", + "cfengine":"boxlang@1", "serverHomeDirectory":".engine/boxlang-cfml" }, "name":"cbfs-boxlang-cfml@1", diff --git a/test-harness/box.json b/test-harness/box.json index 05e82c3..fab8efb 100644 --- a/test-harness/box.json +++ b/test-harness/box.json @@ -5,7 +5,7 @@ "private":true, "description":"", "dependencies":{ - "coldbox":"^7" + "coldbox":"^8" }, "devDependencies":{ "testbox":"*"