Skip to content

Commit

Permalink
boxlang certs and updates
Browse files Browse the repository at this point in the history
  • Loading branch information
lmajano committed Feb 19, 2025
1 parent 78c512c commit b316f9d
Show file tree
Hide file tree
Showing 12 changed files with 94 additions and 76 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,22 @@ on:
- "main"
- "master"
- "development"
- "releases/v*"
pull_request:
branches:
- "releases/v*"
- development

jobs:
tests:
uses: ./.github/workflows/tests.yml
secrets: inherit

formatCheck:
# Format PR
format_check:
name: Checks Source Code Formatting
runs-on: ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: Ortus-Solutions/[email protected]
with:
Expand Down
56 changes: 44 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@ on:
default: false
type: boolean

# Manual Trigger
workflow_dispatch:
env:
MODULE_ID: mementifier
MODULE_ID: ${{ github.event.repository.name }}
JDK: 21
SNAPSHOT: ${{ inputs.snapshot || false }}
BUILD_ID: ${{ github.run_number }}

jobs:
##########################################################################################
Expand All @@ -27,15 +31,26 @@ 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@v3
uses: actions/checkout@v4

- name: Setup CommandBox
uses: Ortus-Solutions/[email protected]
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: |
Expand All @@ -50,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
Expand All @@ -61,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/[email protected].1
- name: Commit Changelog [unreleased] with latest version
uses: EndBug/[email protected].4
if: env.SNAPSHOT == 'false'
with:
author_name: Github Actions
Expand All @@ -73,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 }}"
Expand All @@ -82,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: |
Expand Down Expand Up @@ -118,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:
Expand All @@ -127,6 +142,18 @@ 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
##########################################################################################
Expand All @@ -135,10 +162,15 @@ jobs:
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
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: development

Expand All @@ -148,7 +180,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
Expand All @@ -165,7 +197,7 @@ jobs:
# Commit it back to development
- name: Commit Version Bump
uses: EndBug/[email protected].1
uses: EndBug/[email protected].4
with:
author_name: Github Actions
author_email: [email protected]
Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -20,16 +26,19 @@ jobs:
format:
name: Code Auto-Formatting
runs-on: ubuntu-24.04
permissions:
contents: write
checks: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Auto-format
uses: Ortus-Solutions/[email protected]
with:
cmd: run-script format

- name: Commit Format Changes
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply cfformat changes

Expand All @@ -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
29 changes: 12 additions & 17 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ jobs:
strategy:
fail-fast: false
matrix:
cfengine: [ "lucee@5", "adobe@2018", "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 ]
# Here we tests all engines against ColdBox@BE
# Experimental: ColdBox BE vs All Engines
include:
- coldboxVersion: "be"
cfengine: "lucee@5"
experimental: true
- coldboxVersion: "be"
cfengine: "adobe@2018"
cfengine: "lucee@6"
experimental: true
- coldboxVersion: "be"
cfengine: "adobe@2021"
Expand All @@ -36,11 +36,11 @@ jobs:
cfengine: "adobe@2023"
experimental: true
- coldboxVersion: "be"
cfengine: "boxlang@1"
cfengine: "boxlang-cfml@1"
experimental: true
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Database and Fixtures
run: |
Expand All @@ -49,18 +49,10 @@ jobs:
#mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} < test-harness/tests/resources/coolblog.sql
- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "11"

- name: Setup CommandBox CLI
uses: Ortus-Solutions/[email protected]

- name: Update Boxlang Module
if: ${{ matrix.cfengine == 'boxlang@1' }}
run:
box install --force commandbox-boxlang
java-version: "21"

- name: Setup Environment For Testing Process
run: |
Expand All @@ -75,7 +67,10 @@ jobs:
printf "DB_BUNDLEVERSION=8.0.19\n" >> .env
printf "DB_BUNDLENAME=com.mysql.cj\n" >> .env
- name: Install Test Harness with ColdBox ${{ matrix.coldboxVersion }}
- name: Setup CommandBox CLI
uses: Ortus-Solutions/[email protected]

- name: Install Dependencies
run: |
box install
cd test-harness
Expand Down
10 changes: 4 additions & 6 deletions box.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"contributors":[],
"dependencies":{},
"devDependencies":{
"commandbox-boxlang":"*",
"commandbox-cfformat":"*",
"commandbox-docbox":"*",
"commandbox-dotenv":"*",
Expand All @@ -47,13 +48,10 @@
"format:watch":"cfformat watch helpers,models,test-harness/tests/,ModuleConfig.cfc ./.cfformat.json",
"format:check":"cfformat check helpers,models,test-harness/tests/,ModuleConfig.cfc ./.cfformat.json",
"start:lucee":"server start [email protected]",
"start:2018":"server start [email protected]",
"start:2021":"server start [email protected]",
"start:2023":"server start [email protected]",
"stop:lucee":"server stop [email protected]",
"stop:2018":"server stop [email protected]",
"stop:2021":"server stop [email protected]",
"stop:2023":"server stop [email protected]",
"logs:lucee":"server log [email protected] --follow",
"logs:2018":"server log [email protected] --follow",
"logs:2021":"server log [email protected] --follow"
"logs:2023":"server log [email protected] --follow"
}
}
4 changes: 3 additions & 1 deletion build/Build.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ component {
variables.cwd = getCWD().reReplace( "\.$", "" );
variables.artifactsDir = cwd & "/.artifacts";
variables.buildDir = cwd & "/.tmp";
variables.apidDocsDir = variables.buildDir & "/apidocs";
variables.apiDocsURL = "http://localhost:60299/apidocs/";
variables.testRunner = "http://localhost:60299/tests/runner.cfm";

Expand All @@ -31,7 +32,8 @@ component {
// Cleanup + Init Build Directories
[
variables.buildDir,
variables.artifactsDir
variables.artifactsDir,
variables.apidDocsDir
].each( function( item ){
if ( directoryExists( item ) ) {
directoryDelete( item, true );
Expand Down
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- BoxLang certification
- Updated scripts

## [3.4.0] - 2023-09-18

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# Mementifier : The State Maker!

Welcome to the `mementifier` module. This module will transform your business objects into native ColdFusion (CFML) data structures with :rocket: speed. It will inject itself into ORM objects and/or business objects alike and give them a nice `getMemento()` function to transform their properties and relationships (state) into a consumable structure or array of structures. It can even detect ORM entities and you don't even have to write the default includes manually, it will auto-detect all properties. No more building transformations by hand! No more inconsistencies! No more repeating yourself!
Welcome to the `mementifier` module. This module will transform your business objects into native BoxLang or CFML data structures with :rocket: speed. It will inject itself into ORM objects and/or business objects alike and give them a nice `getMemento()` function to transform their properties and relationships (state) into a consumable structure or array of structures. It can even detect ORM entities and you don't even have to write the default includes manually, it will auto-detect all properties. No more building transformations by hand! No more inconsistencies! No more repeating yourself!

> Memento pattern is used to restore state of an object to a previous state or to produce the state of the object.
Expand Down
23 changes: 0 additions & 23 deletions [email protected]

This file was deleted.

8 changes: 4 additions & 4 deletions [email protected][email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -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 -Dboxlang.debugMode=true"
},
"cfconfig":{
"file":".cfconfig.json"
Expand All @@ -31,6 +31,6 @@
"BOXLANG_DEBUG":true
},
"scripts":{
"onServerInitialInstall":"install bx-compat-cfml@be,bx-orm@be,bx-mysql,bx-esapi --noSave"
"onServerInitialInstall":"install bx-compat-cfml,bx-orm,bx-mysql,bx-esapi --noSave"
}
}
}
Loading

0 comments on commit b316f9d

Please sign in to comment.