forked from gpickin/coldbox-plugin-BCrypt
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
727 additions
and
1,401 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
DB_HOST=127.0.0.1 | ||
DB_PORT=3306 | ||
DB_USER=root | ||
DB_PASSWORD=mysql | ||
DB_CLASS=com.mysql.cj.jdbc.Driver | ||
DB_BUNDLEVERSION=8.0.19 | ||
DB_BUNDLENAME=com.mysql.cj |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
patreon: ortussolutions |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
name: bcrypt CI | ||
|
||
# Only on Development we build snapshots | ||
on: | ||
push: | ||
branches: | ||
- development | ||
- master | ||
|
||
env: | ||
MODULE_ID: bcrypt | ||
|
||
jobs: | ||
############################################# | ||
# Tests First baby! We fail, no build :( | ||
############################################# | ||
tests: | ||
uses: ./.github/workflows/tests.yml | ||
secrets: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
|
||
############################################# | ||
# Build Module | ||
############################################# | ||
build: | ||
name: Build & Publish | ||
needs: tests | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: "adopt" | ||
java-version: "11" | ||
|
||
- name: Setup CommandBox | ||
uses: Ortus-Solutions/setup-commandbox@main | ||
with: | ||
forgeboxAPIKey: ${{ secrets.FORGEBOX_TOKEN }} | ||
|
||
- name: Setup Environment Variables For Build Process | ||
id: current_version | ||
run: | | ||
echo "VERSION=`cat box.json | jq '.version' -r`" >> $GITHUB_ENV | ||
box package set [email protected]@[email protected]@ | ||
# master or snapshot | ||
echo "Github Ref is $GITHUB_REF" | ||
echo "BRANCH=master" >> $GITHUB_ENV | ||
if [ $GITHUB_REF == 'refs/heads/development' ] | ||
then | ||
echo "BRANCH=development" >> $GITHUB_ENV | ||
fi | ||
- name: Build ${{ env.MODULE_ID }} | ||
run: | | ||
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 }} | ||
- name: Upload Build Artifacts | ||
if: success() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ env.MODULE_ID }} | ||
path: | | ||
.artifacts/**/* | ||
- name: Upload Binaries to S3 | ||
uses: jakejarvis/s3-sync-action@master | ||
with: | ||
args: --acl public-read | ||
env: | ||
AWS_S3_BUCKET: "downloads.ortussolutions.com" | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_SECRET }} | ||
SOURCE_DIR: ".artifacts/${{ env.MODULE_ID }}" | ||
DEST_DIR: "ortussolutions/coldbox-modules/${{ env.MODULE_ID }}" | ||
|
||
- name: Upload API Docs to S3 | ||
uses: jakejarvis/s3-sync-action@master | ||
with: | ||
args: --acl public-read | ||
env: | ||
AWS_S3_BUCKET: "apidocs.ortussolutions.com" | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_SECRET }} | ||
SOURCE_DIR: ".tmp/apidocs" | ||
DEST_DIR: "coldbox-modules/${{ env.MODULE_ID }}/${{ env.VERSION }}" | ||
|
||
- name: Publish To ForgeBox | ||
run: | | ||
cd .tmp/${{ env.MODULE_ID }} | ||
cat box.json | ||
box forgebox publish | ||
- 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: '${{ env.MODULE_ID }} Built with ${{ job.status }}!' | ||
SLACK_TITLE: "${{ env.MODULE_ID }} Build" | ||
SLACK_USERNAME: CI | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Publish Github Release | ||
name: Github Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- v[0-9]+.* | ||
|
||
jobs: | ||
create-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: taiki-e/[email protected] | ||
with: | ||
# Produced by the build/Build.cfc | ||
changelog: changelog.md | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Pull Requests | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- "main" | ||
- "master" | ||
- "development" | ||
pull_request: | ||
branches: | ||
- development | ||
|
||
jobs: | ||
tests: | ||
uses: coldbox-modules/bcrypt/.github/workflows/tests.yml@development | ||
|
||
# Format PR | ||
format: | ||
name: Format | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- uses: Ortus-Solutions/[email protected] | ||
with: | ||
cmd: run-script format | ||
|
||
- name: Commit Format Changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Apply cfformat changes |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
name: Test Suites | ||
|
||
# We are a reusable Workflow only | ||
on: | ||
workflow_call: | ||
secrets: | ||
SLACK_WEBHOOK_URL: | ||
required: true | ||
|
||
jobs: | ||
tests: | ||
name: Tests | ||
runs-on: ubuntu-20.04 | ||
env: | ||
DB_USER: root | ||
DB_PASSWORD: root | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
cfengine: [ "lucee@5", "adobe@2018", "adobe@2021" ] | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: "adopt" | ||
java-version: "11" | ||
|
||
- 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@main | ||
|
||
- name: Install Dependencies | ||
run: | | ||
box install | ||
cd test-harness && box install | ||
- name: Start ${{ matrix.cfengine }} Server | ||
run: | | ||
box server start serverConfigFile="server-${{ matrix.cfengine }}.json" --noSaveSettings --debug | ||
# Install Adobe 2021 cfpm modules | ||
if [[ "${{ matrix.cfengine }}" == "adobe@2021" ]] ; then | ||
box run-script install:2021 | ||
fi | ||
curl http://127.0.0.1:60299 | ||
- name: Run Tests | ||
run: | | ||
mkdir -p test-harness/tests/results | ||
box testbox run --verbose outputFile=test-harness/tests/results/test-results outputFormats=json,antjunit | ||
ls -lR test-harness/tests | ||
- name: Publish Test Results | ||
uses: EnricoMi/publish-unit-test-result-action@v1 | ||
if: always() | ||
with: | ||
files: test-harness/tests/results/**/*.xml | ||
check_name: "${{ matrix.cfengine }} Test Results" | ||
|
||
- name: Upload Test Results to Artifacts | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: test-results-${{ matrix.cfengine }} | ||
path: | | ||
test-harness/tests/results/**/* | ||
- name: Failure Debugging Log | ||
if: ${{ failure() }} | ||
run: | | ||
box server log serverConfigFile="server-${{ matrix.cfengine }}.json" | ||
- name: Upload Debugging Log To Artifacts | ||
if: ${{ failure() }} | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: Failure Debugging Info - ${{ matrix.cfengine }} | ||
path: | | ||
.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 }} failed | ||
SLACK_USERNAME: CI | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
.vscode | ||
|
||
# Artifacts and temp folders | ||
.artifacts/** | ||
.tmp/** | ||
|
||
test-harness/.engine/** | ||
# Engine + Secrets + databases | ||
.env | ||
.engine/** | ||
.db/** | ||
|
||
# Dependencies | ||
test-harness/coldbox/** | ||
test-harness/docbox/** | ||
test-harness/testbox/** | ||
test-harness/logs/** | ||
test-harness/modules/** | ||
|
||
# modules | ||
modules/** | ||
|
||
# log files | ||
logs/** | ||
logs/** |
This file contains 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
Oops, something went wrong.