Skip to content

Commit b0e0e42

Browse files
authored
DDP-4382: Migrate ESC(GEC) project to pepper
1 parent bc4f452 commit b0e0e42

Some content is hidden

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

75 files changed

+4799
-3
lines changed

.circleci/config.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ references:
1212
- *npm_cache_key
1313
# Note: important that values of guids and keys have matching order!"
1414
study_keys: &study_keys
15-
"osteo brain angio mbc testboston mpc prion atcp rgp"
15+
"osteo brain angio mbc testboston mpc prion atcp rgp esc"
1616
study_guids: &study_guids
17-
"CMI-OSTEO cmi-brain ANGIO cmi-mbc testboston cmi-mpc PRION atcp rgp"
17+
"CMI-OSTEO cmi-brain ANGIO cmi-mbc testboston cmi-mpc PRION atcp rgp cmi-esc"
1818
config_deployment_dir: &config_deployment_dir
1919
config/deployment
2020

@@ -436,6 +436,8 @@ jobs:
436436
study_key: atcp
437437
- conditionally-launch-build-and-store:
438438
study_key: rgp
439+
- conditionally-launch-build-and-store:
440+
study_key: esc
439441
- conditionally-launch-build-and-store:
440442
study_key: prion
441443

@@ -541,6 +543,9 @@ workflows:
541543
- deploy-stored-build-job:
542544
<<: *deploy_branch_filters
543545
study_key: rgp
546+
- deploy-stored-build-job:
547+
<<: *deploy_branch_filters
548+
study_key: esc
544549
- deploy-stored-build-job:
545550
<<: *deploy_branch_filters
546551
study_key: prion
@@ -578,6 +583,9 @@ workflows:
578583
- build-and-deploy-job:
579584
name: rgp-nightly
580585
study_key: rgp
586+
- build-and-deploy-job:
587+
name: esc-nightly
588+
study_key: esc
581589
- build-and-deploy-job:
582590
name: prion-nightly
583591
study_key: prion

config/deployment/dev/dispatch.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ dispatch:
1111
service: testboston
1212
- url: "mpc.dev.datadonationplatform.org/*"
1313
service: mpc
14+
- url: "esc.dev.datadonationplatform.org/*"
15+
service: esc
1416
- url: "prion.dev.datadonationplatform.org/*"
1517
service: prion
1618
- url: "pepper-dev.datadonationplatform.org/docs*"

config/deployment/staging/dispatch.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ dispatch:
1111
service: testboston
1212
- url: "mpc.staging.datadonationplatform.org/*"
1313
service: mpc
14+
- url: "esc.staging.datadonationplatform.org/*"
15+
service: esc
1416
- url: "prion.staging.datadonationplatform.org/*"
1517
service: prion
1618
- url: "pepper-staging.datadonationplatform.org/docs*"

config/deployment/test/dispatch.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ dispatch:
1111
service: testboston
1212
- url: "mpc.test.datadonationplatform.org/*"
1313
service: mpc
14+
- url: "esc.test.datadonationplatform.org/*"
15+
service: esc
1416
- url: "prion.test.datadonationplatform.org/*"
1517
service: prion
1618
- url: "pepper-test.datadonationplatform.org/docs*"

config/pepperConfig.js.ctmpl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,22 @@ var DDP_ENV = {
8787
{{end}}
8888
{{end}}
8989

90+
{{if eq $study_guid "cmi-esc"}}
91+
{{if eq $environment "dev"}}
92+
DDP_ENV['auth0ClientId'] = "2LLtNaf1eoiwyMiORtgrcOzL0aASMNC3";
93+
DDP_ENV['projectGAToken'] = "UA-108484823-1";
94+
{{else if eq $environment "test"}}
95+
DDP_ENV['auth0ClientId'] = "fixme-not-set";
96+
DDP_ENV['projectGAToken'] = "UA-108484823-1";
97+
{{else if eq $environment "staging"}}
98+
DDP_ENV['auth0ClientId'] = "fixme-not-set";
99+
DDP_ENV['projectGAToken'] = "UA-108484823-1";
100+
{{else if eq $environment "prod"}}
101+
DDP_ENV['auth0ClientId'] = "fixme-not-set";
102+
DDP_ENV['projectGAToken'] = "UA-61688341-15";
103+
{{end}}
104+
{{end}}
105+
90106
{{if eq $study_guid "cmi-brain"}}
91107
{{if eq $environment "dev"}}
92108
DDP_ENV['auth0ClientId'] = "ZYh16tmcKQrMbWEqFOXSw4wQTvAcaQIJ";

ddp-workspace/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ DDP apps:
2424
ng serve ddp-angio
2525
ng serve ddp-atcp
2626
ng serve ddp-brain
27+
ng serve ddp-esc
2728
ng serve ddp-mbc
2829
ng serve ddp-mpc
2930
ng serve ddp-osteo

ddp-workspace/angular.json

Lines changed: 151 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1735,6 +1735,156 @@
17351735
}
17361736
}
17371737
}
1738+
},
1739+
"ddp-esc": {
1740+
"projectType": "application",
1741+
"schematics": {
1742+
"@schematics/angular:component": {
1743+
"style": "scss"
1744+
}
1745+
},
1746+
"root": "projects/ddp-esc",
1747+
"sourceRoot": "projects/ddp-esc/src",
1748+
"prefix": "app",
1749+
"architect": {
1750+
"build": {
1751+
"builder": "@angular-devkit/build-angular:browser",
1752+
"options": {
1753+
"outputPath": "dist/ddp-esc",
1754+
"index": "projects/ddp-esc/src/index.html",
1755+
"main": "projects/ddp-esc/src/main.ts",
1756+
"polyfills": "projects/ddp-esc/src/polyfills.ts",
1757+
"tsConfig": "projects/ddp-esc/tsconfig.app.json",
1758+
"aot": true,
1759+
"assets": [
1760+
"projects/ddp-esc/src/favicon.ico",
1761+
"projects/ddp-esc/src/favicon-alert.ico",
1762+
"projects/ddp-esc/src/assets",
1763+
{
1764+
"glob": "*.pdf",
1765+
"input": "projects/ddp-esc/src/pdf/",
1766+
"output": "/"
1767+
},
1768+
{
1769+
"glob": "pepperConfig.js",
1770+
"input": "projects/ddp-esc/output-config/",
1771+
"output": "assets/config"
1772+
}
1773+
],
1774+
"styles": [
1775+
"projects/ddp-esc/src/theme.scss",
1776+
"projects/ddp-esc/src/styles.scss"
1777+
],
1778+
"scripts": []
1779+
},
1780+
"configurations": {
1781+
"production": {
1782+
"fileReplacements": [
1783+
{
1784+
"replace": "projects/ddp-esc/src/environments/environment.ts",
1785+
"with": "projects/ddp-esc/src/environments/environment.prod.ts"
1786+
}
1787+
],
1788+
"optimization": true,
1789+
"outputHashing": "all",
1790+
"sourceMap": false,
1791+
"extractCss": true,
1792+
"namedChunks": false,
1793+
"extractLicenses": true,
1794+
"vendorChunk": false,
1795+
"buildOptimizer": true,
1796+
"budgets": [
1797+
{
1798+
"type": "initial",
1799+
"maximumWarning": "5mb",
1800+
"maximumError": "5mb"
1801+
},
1802+
{
1803+
"type": "anyComponentStyle",
1804+
"maximumWarning": "25kb"
1805+
}
1806+
]
1807+
},
1808+
"es5": {
1809+
"budgets": [
1810+
{
1811+
"type": "anyComponentStyle",
1812+
"maximumWarning": "25kb"
1813+
}
1814+
],
1815+
"tsConfig": "projects/ddp-esc/tsconfig.es5.json"
1816+
}
1817+
}
1818+
},
1819+
"serve": {
1820+
"builder": "@angular-devkit/build-angular:dev-server",
1821+
"options": {
1822+
"browserTarget": "ddp-esc:build"
1823+
},
1824+
"configurations": {
1825+
"production": {
1826+
"browserTarget": "ddp-esc:build:production"
1827+
},
1828+
"es5": {
1829+
"browserTarget": "ddp-esc:build:es5"
1830+
}
1831+
}
1832+
},
1833+
"extract-i18n": {
1834+
"builder": "@angular-devkit/build-angular:extract-i18n",
1835+
"options": {
1836+
"browserTarget": "ddp-esc:build"
1837+
}
1838+
},
1839+
"test": {
1840+
"builder": "@angular-devkit/build-angular:karma",
1841+
"options": {
1842+
"main": "projects/ddp-esc/src/test.ts",
1843+
"polyfills": "projects/ddp-esc/src/polyfills.ts",
1844+
"tsConfig": "projects/ddp-esc/tsconfig.spec.json",
1845+
"karmaConfig": "projects/ddp-esc/karma.conf.js",
1846+
"assets": [
1847+
"projects/ddp-esc/src/favicon.ico",
1848+
"projects/ddp-esc/src/favicon-alert.ico",
1849+
"projects/ddp-esc/src/assets",
1850+
{
1851+
"glob": "*.pdf",
1852+
"input": "projects/ddp-esc/src/pdf/",
1853+
"output": "/"
1854+
}
1855+
],
1856+
"styles": [
1857+
"projects/ddp-esc/src/styles.scss"
1858+
],
1859+
"scripts": []
1860+
}
1861+
},
1862+
"lint": {
1863+
"builder": "@angular-devkit/build-angular:tslint",
1864+
"options": {
1865+
"tsConfig": [
1866+
"projects/ddp-esc/tsconfig.app.json",
1867+
"projects/ddp-esc/tsconfig.spec.json",
1868+
"projects/ddp-esc/e2e/tsconfig.json"
1869+
],
1870+
"exclude": [
1871+
"**/node_modules/**"
1872+
]
1873+
}
1874+
},
1875+
"e2e": {
1876+
"builder": "@angular-devkit/build-angular:protractor",
1877+
"options": {
1878+
"protractorConfig": "projects/ddp-esc/e2e/protractor.conf.js",
1879+
"devServerTarget": "ddp-esc:serve"
1880+
},
1881+
"configurations": {
1882+
"production": {
1883+
"devServerTarget": "ddp-esc:serve:production"
1884+
}
1885+
}
1886+
}
1887+
}
17381888
}
17391889
},
17401890
"defaultProject": "ddp-sdk",
@@ -1743,4 +1893,4 @@
17431893
"style": "scss"
17441894
}
17451895
}
1746-
}
1896+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+
# For additional information regarding the format and rule options, please see:
3+
# https://github.com/browserslist/browserslist#queries
4+
5+
# You can see what browsers were selected by your queries by running:
6+
# npx browserslist
7+
8+
> 0.5%
9+
last 2 versions
10+
Firefox ESR
11+
not dead
12+
not IE 9-11 # For IE 9-11 support, remove 'not'.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
# Only exists if Bazel was run
8+
/bazel-out
9+
10+
# dependencies
11+
/node_modules
12+
13+
# profiling files
14+
chrome-profiler-events.json
15+
speed-measure-plugin.json
16+
17+
# IDEs and editors
18+
/.idea
19+
.project
20+
.classpath
21+
.c9/
22+
*.launch
23+
.settings/
24+
*.sublime-workspace
25+
26+
# IDE - VSCode
27+
.vscode/*
28+
!.vscode/settings.json
29+
!.vscode/tasks.json
30+
!.vscode/launch.json
31+
!.vscode/extensions.json
32+
.history/*
33+
34+
# misc
35+
/.sass-cache
36+
/connect.lock
37+
/coverage
38+
/libpeerconnection.log
39+
npm-debug.log
40+
yarn-error.log
41+
testem.log
42+
/typings
43+
44+
# e2e
45+
/e2e/*.js
46+
/e2e/*.map
47+
48+
# System Files
49+
.DS_Store
50+
Thumbs.db
51+
52+
# ignore rendered configs--they will be rebuilt at deploy time
53+
src/assets/config/*
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
service: esc
2+
runtime: python37
3+
4+
# This setting will not matter except to prevent default automatic-scaling which prevents disabling
5+
# earlier versions of this service
6+
basic_scaling:
7+
max_instances: 1
8+
9+
handlers:
10+
- url: /(.*\.(css|eot|gz|html|ico|js|map|png|svg|ttf|woff|woff2|jpg|jpeg|gif|png|json|pdf))
11+
static_files: dist/\1
12+
upload: dist/(.*\.(css|eot|gz|html|ico|js|map|png|svg|ttf|woff|woff2|jpg|jpeg|gif|png|json|pdf))
13+
secure: always
14+
15+
- url: /(.*)
16+
static_files: dist/index.html
17+
upload: dist/index.html
18+
secure: always
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// @ts-check
2+
// Protractor configuration file, see link for more information
3+
// https://github.com/angular/protractor/blob/master/lib/config.ts
4+
5+
const { SpecReporter } = require('jasmine-spec-reporter');
6+
7+
/**
8+
* @type { import("protractor").Config }
9+
*/
10+
exports.config = {
11+
allScriptsTimeout: 11000,
12+
specs: [
13+
'./src/**/*.e2e-spec.ts'
14+
],
15+
capabilities: {
16+
browserName: 'chrome'
17+
},
18+
directConnect: true,
19+
baseUrl: 'http://localhost:4200/',
20+
framework: 'jasmine',
21+
jasmineNodeOpts: {
22+
showColors: true,
23+
defaultTimeoutInterval: 30000,
24+
print: function() {}
25+
},
26+
onPrepare() {
27+
require('ts-node').register({
28+
project: require('path').join(__dirname, './tsconfig.json')
29+
});
30+
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
31+
}
32+
};

0 commit comments

Comments
 (0)