Skip to content

Commit

Permalink
refactor(config): merge db & service config into one (#67)
Browse files Browse the repository at this point in the history
* chore: enforce to --runInBand scripts

* chore: enforce to --runInBand scripts

* refactor(config): merge all

* fix(ci): cleanup linting smells

* fix(ci): cleanup linting smells

* refactor(config): add knexfile for knex cli tool

* fix(test): linting issues

* fix(requests): invalid type

* fix(requests): invalid type

* fix(requests): invalid type

* fix(ci): improve
  • Loading branch information
eoln committed May 14, 2021
1 parent 40c0a64 commit a0ecf8a
Show file tree
Hide file tree
Showing 23 changed files with 624 additions and 442 deletions.
11 changes: 1 addition & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ jobs:
mv junit.xml test/results
- store_artifacts:
path: ./test/results
prefix: test
- store_test_results:
path: ./test/results

Expand All @@ -132,7 +131,6 @@ jobs:
mv junit.xml test/results
- store_artifacts:
path: ./test/results
prefix: test
- store_test_results:
path: ./test/results

Expand All @@ -156,7 +154,6 @@ jobs:
NODE_ENV: "test"
- store_artifacts:
path: coverage
prefix: test
- store_test_results:
path: coverage
- run:
Expand All @@ -174,8 +171,6 @@ jobs:
executor: default-machine
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package-lock.json" }}
- run:
name: Set up NVM
command: |
Expand All @@ -188,7 +183,7 @@ jobs:
command: |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
node --version
npm install
npm ci
- run:
name: Create dir for test results
command: |
Expand Down Expand Up @@ -225,7 +220,6 @@ jobs:
mv junit.xml test/results
- store_artifacts:
path: ./test/results
prefix: test
- store_test_results:
path: ./test/results

Expand Down Expand Up @@ -260,7 +254,6 @@ jobs:
command: npm run audit:check --silent -- --json > ./audit/results/auditResults.json
- store_artifacts:
path: ./audit/results
prefix: audit

audit-licenses:
executor: default-docker
Expand All @@ -281,7 +274,6 @@ jobs:
command: cd /tmp/license-scanner && pathToRepo=$CIRCLE_WORKING_DIRECTORY make run
- store_artifacts:
path: /tmp/license-scanner/results
prefix: licenses

build-local:
executor: default-machine
Expand Down Expand Up @@ -415,7 +407,6 @@ jobs:
command: cd /tmp/license-scanner && mode=docker dockerImages=$DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:local make run
- store_artifacts:
path: /tmp/license-scanner/results
prefix: licenses

image-scan:
executor: anchore/anchore_engine
Expand Down
99 changes: 0 additions & 99 deletions config/custom-convict-formats.ts

This file was deleted.

33 changes: 33 additions & 0 deletions config/development.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,38 @@
"key": "./secrets/client.crt"
}
}
},
"DATABASE": {
"client": "mysql",
"version": "5.5",
"connection": {
"host": "localhost",
"port": 3306,
"user": "auth-service",
"password": "password",
"database": "auth-service",
"timezone": "UTC"
},
"pool": {
"min": 10,
"max": 10,
"acquireTimeoutMillis": 30000,
"createTimeoutMillis": 30000,
"destroyTimeoutMillis": 5000,
"idleTimeoutMillis": 30000,
"reapIntervalMillis": 1000,
"createRetryIntervalMillis": 200
},
"migrations": {
"tableName": "auth-service",
"loadExtensions": [
".ts"
]
},
"seeds": {
"loadExtensions": [
".ts"
]
}
}
}
29 changes: 0 additions & 29 deletions config/development_db.json

This file was deleted.

33 changes: 33 additions & 0 deletions config/integration.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,38 @@
"key": "./secrets/client.crt"
}
}
},
"DATABASE": {
"client": "mysql",
"version": "5.5",
"connection": {
"host": "localhost",
"port": 3306,
"user": "auth-service",
"password": "password",
"database": "auth-service",
"timezone": "UTC"
},
"pool": {
"min": 10,
"max": 10,
"acquireTimeoutMillis": 30000,
"createTimeoutMillis": 30000,
"destroyTimeoutMillis": 5000,
"idleTimeoutMillis": 30000,
"reapIntervalMillis": 1000,
"createRetryIntervalMillis": 200
},
"migrations": {
"tableName": "auth-service",
"loadExtensions": [
".ts"
]
},
"seeds": {
"loadExtensions": [
".ts"
]
}
}
}
29 changes: 0 additions & 29 deletions config/integration_db.json

This file was deleted.

Loading

0 comments on commit a0ecf8a

Please sign in to comment.