Skip to content

Commit 0b65b48

Browse files
committed
Merge branch 'development'
2 parents e7b3aa2 + 93f7120 commit 0b65b48

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+3575
-846
lines changed

.cfformat.json

Lines changed: 54 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,62 @@
11
{
2-
"brackets.padding": true,
3-
"strings.quote": "double",
4-
"strings.attributes.quote": "double",
2+
"array.empty_padding": false,
3+
"array.padding": true,
4+
"array.multiline.min_length": 40,
5+
"array.multiline.element_count": 2,
6+
"array.multiline.leading_comma.padding": true,
7+
"array.multiline.leading_comma": false,
8+
"alignment.consecutive.assignments": true,
9+
"alignment.consecutive.properties": true,
10+
"alignment.consecutive.params": true,
11+
"brackets.padding": true,
12+
"comment.asterisks": "align",
13+
"binary_operators.padding": true,
14+
"for_loop_semicolons.padding": true,
515
"function_call.empty_padding": false,
6-
"function_call.padding": true,
7-
"function_declaration.padding": true,
16+
"function_call.padding": true,
817
"function_call.multiline.leading_comma.padding": true,
9-
"function_declaration.multiline.leading_comma.padding" : true,
18+
"function_call.casing.builtin": "cfdocs",
19+
"function_call.casing.userdefined": "camel",
20+
"function_call.multiline.element_count": 2,
21+
"function_call.multiline.leading_comma": false,
22+
"function_call.multiline.min_length": 40,
23+
"function_declaration.padding": true,
1024
"function_declaration.empty_padding": false,
25+
"function_declaration.multiline.leading_comma": false,
26+
"function_declaration.multiline.leading_comma.padding": true,
27+
"function_declaration.multiline.element_count": 2,
28+
"function_declaration.multiline.min_length": 40,
1129
"function_declaration.group_to_block_spacing": "compact",
30+
"function_anonymous.empty_padding": false,
31+
"function_anonymous.group_to_block_spacing": "compact",
32+
"function_anonymous.multiline.element_count": 2,
33+
"function_anonymous.multiline.leading_comma": false,
34+
"function_anonymous.multiline.leading_comma.padding": true,
35+
"function_anonymous.multiline.min_length": 40,
36+
"function_anonymous.padding": true,
37+
"indent_size": 4,
38+
"keywords.block_to_keyword_spacing": "spaced",
39+
"keywords.group_to_block_spacing": "spaced",
40+
"keywords.padding_inside_group": true,
41+
"keywords.spacing_to_block": "spaced",
42+
"keywords.spacing_to_group": true,
43+
"keywords.empty_group_spacing": false,
44+
"max_columns": 120,
45+
"metadata.multiline.element_count": 3,
46+
"metadata.multiline.min_length": 40,
47+
"method_call.chain.multiline": 3,
48+
"newline": "\n",
49+
"property.multiline.element_count": 3,
50+
"property.multiline.min_length": 40,
51+
"parentheses.padding": true,
52+
"strings.quote": "double",
53+
"strings.attributes.quote": "double",
54+
"struct.separator": " : ",
1255
"struct.padding": true,
1356
"struct.empty_padding": false,
14-
"struct.multiline.leading_comma.padding" : true,
15-
"array.empty_padding":false,
16-
"array.padding":true,
17-
"array.multiline.leading_comma.padding":true,
18-
"binary_operators.padding":true,
19-
"for_loop_semicolons.padding":true,
20-
"indent_size":4,
21-
"parentheses.padding":true,
22-
"struct.separator":" : ",
23-
"tab_indent":true,
24-
"keywords.block_to_keyword_spacing" : "spaced",
25-
"keywords.group_to_block_spacing" : "spaced",
26-
"keywords.padding_inside_group" : true,
27-
"keywords.spacing_to_block" : "compact",
28-
"keywords.spacing_to_group" : true
57+
"struct.multiline.leading_comma": false,
58+
"struct.multiline.leading_comma.padding": true,
59+
"struct.multiline.element_count": 2,
60+
"struct.multiline.min_length": 40,
61+
"tab_indent": true
2962
}

.gitattributes

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Custom for Visual Studio
5+
*.cs diff=csharp
6+
*.sln merge=union
7+
*.csproj merge=union
8+
*.vbproj merge=union
9+
*.fsproj merge=union
10+
*.dbproj merge=union
11+
12+
# Standard to msysgit
13+
*.doc diff=astextplain
14+
*.DOC diff=astextplain
15+
*.docx diff=astextplain
16+
*.DOCX diff=astextplain
17+
*.dot diff=astextplain
18+
*.DOT diff=astextplain
19+
*.pdf diff=astextplain
20+
*.PDF diff=astextplain
21+
*.rtf diff=astextplain
22+
*.RTF diff=astextplain

.github/workflows/ci.yml

Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
1+
name: swagger-sdk CI
2+
3+
# Only on Development we build snapshots
4+
on:
5+
push:
6+
branches:
7+
- development
8+
- master
9+
10+
env:
11+
MODULE_ID: swagger-sdk
12+
13+
jobs:
14+
#############################################
15+
# Tests First baby! We fail, no build :(
16+
#############################################
17+
tests:
18+
name: Tests
19+
runs-on: ubuntu-20.04
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
cfengine: [ "lucee@5", "adobe@2018", "adobe@2021" ]
24+
steps:
25+
- name: Checkout Repository
26+
uses: actions/checkout@v2
27+
28+
- name: Setup Java
29+
uses: actions/setup-java@v2
30+
with:
31+
distribution: "adopt"
32+
java-version: "11"
33+
34+
- name: Cache CommandBox Dependencies
35+
uses: actions/cache@v1
36+
if: ${{ true }}
37+
with:
38+
path: ~/.CommandBox/artifacts
39+
key: ${{ runner.OS }}-commandbox-cache-${{ hashFiles( 'box.json' ) }}-${{ hashFiles( 'test-harness/box.json' ) }}
40+
restore-keys: |
41+
${{ runner.OS }}-commandbox-cache-${{ hashFiles( 'box.json' ) }}-${{ hashFiles( 'test-harness/box.json' ) }}
42+
43+
- name: Setup CommandBox
44+
uses: elpete/[email protected]
45+
46+
- name: Install Test Harness Dependencies
47+
working-directory: ./test-harness
48+
run: |
49+
box install
50+
51+
- name: Start ${{ matrix.cfengine }} Server
52+
working-directory: ./test-harness
53+
run: |
54+
echo "matrix.cfengine=${{ matrix.cfengine }}" > ./.env
55+
box server start serverConfigFile="server-${{ matrix.cfengine }}.json" --noSaveSettings --debug
56+
# Install Adobe 2021 cfpm modules
57+
if [[ "${{ matrix.cfengine }}" == "adobe@2021" ]] ; then
58+
box run-script install:2021
59+
fi
60+
curl http://127.0.0.1:60299
61+
62+
- name: Run Tests
63+
working-directory: ./test-harness
64+
run: |
65+
mkdir tests/results
66+
box package set testbox.runner="http://localhost:60299/tests/runner.cfm"
67+
box testbox run --verbose outputFile=tests/results/test-results outputFormats=json,antjunit
68+
69+
- name: Publish Test Results
70+
uses: EnricoMi/publish-unit-test-result-action@v1
71+
if: always()
72+
with:
73+
files: test-harness/tests/results/**/*.xml
74+
check_name: "${{ matrix.cfengine }} Test Results"
75+
76+
- name: Upload Test Results Artifacts
77+
if: always()
78+
uses: actions/upload-artifact@v2
79+
with:
80+
name: test-results-${{ matrix.cfengine }}
81+
path: |
82+
test-harness/tests/results/**/*
83+
84+
- name: Slack Notification
85+
if: failure()
86+
uses: rtCamp/action-slack-notify@v2
87+
env:
88+
SLACK_CHANNEL: coding
89+
SLACK_COLOR: ${{ job.status }} # or a specific color like 'green' or '#ff00ff'
90+
SLACK_ICON_EMOJI: ":bell:"
91+
SLACK_MESSAGE: '${{ env.MODULE_ID }} tests failed :cry:'
92+
SLACK_TITLE: ${{ env.MODULE_ID }} Tests For ${{ matrix.cfengine }} failed
93+
SLACK_USERNAME: CI
94+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
95+
96+
- name: Failure Debugging Info
97+
if: ${{ failure() }}
98+
working-directory: ./test-harness
99+
run: |
100+
box server log serverConfigFile="server-${{ matrix.cfengine }}.json"
101+
102+
- name: Upload Debugging Info To Artifacts
103+
if: ${{ failure() }}
104+
uses: actions/upload-artifact@v2
105+
with:
106+
name: Failure Debugging Info - ${{ matrix.cfengine }}
107+
path: |
108+
test-harness/.engine/**/logs/*
109+
test-harness/.engine/**/WEB-INF/cfusion/logs/*
110+
111+
#############################################
112+
# Build Module
113+
#############################################
114+
build:
115+
name: Build & Publish
116+
needs: tests
117+
runs-on: ubuntu-20.04
118+
steps:
119+
- name: Checkout Repository
120+
uses: actions/checkout@v2
121+
with:
122+
fetch-depth: 0
123+
124+
- name: Setup Java
125+
uses: actions/setup-java@v2
126+
with:
127+
distribution: "adopt"
128+
java-version: "11"
129+
130+
- name: Cache CommandBox Dependencies
131+
uses: actions/cache@v1
132+
if: ${{ true }}
133+
with:
134+
path: ~/.CommandBox/artifacts
135+
key: ${{ runner.OS }}-commandbox-cache-${{ hashFiles( 'box.json' ) }}-${{ hashFiles( 'test-harness/box.json' ) }}
136+
restore-keys: |
137+
${{ runner.OS }}-commandbox-cache-${{ hashFiles( 'box.json' ) }}-${{ hashFiles( 'test-harness/box.json' ) }}
138+
139+
- name: Setup CommandBox
140+
uses: elpete/[email protected]
141+
with:
142+
forgeboxAPIKey: ${{ secrets.FORGEBOX_TOKEN }}
143+
144+
- name: Setup Environment Variables For Build Process
145+
id: current_version
146+
run: |
147+
echo "VERSION=`cat box.json | jq '.version' -r`" >> $GITHUB_ENV
148+
149+
# master or snapshot
150+
echo "Github Ref is $GITHUB_REF"
151+
echo "BRANCH=master" >> $GITHUB_ENV
152+
if [ $GITHUB_REF == 'refs/heads/development' ]
153+
then
154+
echo "BRANCH=development" >> $GITHUB_ENV
155+
fi
156+
157+
- name: Build ${{ env.MODULE_ID }}
158+
run: |
159+
box install commandbox-docbox
160+
box task run taskfile=build/Build target=run :version=${{ env.VERSION }} :projectName=${{ env.MODULE_ID }} :buildID=${{ github.run_number }} :branch=${{ env.BRANCH }}
161+
162+
- name: Upload Build Artifacts
163+
if: success()
164+
uses: actions/upload-artifact@v2
165+
with:
166+
name: ${{ env.MODULE_ID }}
167+
path: |
168+
.artifacts/**/*
169+
170+
- name: Upload Binaries to S3
171+
uses: jakejarvis/s3-sync-action@master
172+
with:
173+
args: --acl public-read
174+
env:
175+
AWS_S3_BUCKET: "downloads.ortussolutions.com"
176+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }}
177+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_SECRET }}
178+
SOURCE_DIR: ".artifacts/${{ env.MODULE_ID }}"
179+
DEST_DIR: "ortussolutions/coldbox-modules/${{ env.MODULE_ID }}"
180+
181+
- name: Upload API Docs to S3
182+
uses: jakejarvis/s3-sync-action@master
183+
with:
184+
args: --acl public-read
185+
env:
186+
AWS_S3_BUCKET: "apidocs.ortussolutions.com"
187+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }}
188+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_SECRET }}
189+
SOURCE_DIR: ".tmp/apidocs"
190+
DEST_DIR: "coldbox-modules/${{ env.MODULE_ID }}/${{ env.VERSION }}"
191+
192+
- name: Publish To ForgeBox
193+
run: |
194+
cd .tmp/${{ env.MODULE_ID }}
195+
cat box.json
196+
box forgebox publish
197+
198+
- name: Inform Slack
199+
if: ${{ always() }}
200+
uses: rtCamp/action-slack-notify@v2
201+
env:
202+
SLACK_CHANNEL: coding
203+
SLACK_COLOR: ${{ job.status }} # or a specific color like 'green' or '#ff00ff'
204+
SLACK_ICON_EMOJI: ":bell:"
205+
SLACK_MESSAGE: '${{ env.MODULE_ID }} Built with ${{ job.status }}!'
206+
SLACK_TITLE: "${{ env.MODULE_ID }} Build"
207+
SLACK_USERNAME: CI
208+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}

0 commit comments

Comments
 (0)