Skip to content

Commit e880cb1

Browse files
authored
Merge pull request #3428 from topcoder-platform/fix-groups-updates
adding commit # https://github.com/topcoder-platform/community-app/co…
2 parents 0351a32 + 370c237 commit e880cb1

File tree

25 files changed

+7079
-7322
lines changed

25 files changed

+7079
-7322
lines changed

.circleci/config.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ install_dependency: &install_dependency
1818
install_deploysuite: &install_deploysuite
1919
name: Installation of install_deploysuite.
2020
command: |
21-
git clone --branch v1.3 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
21+
git clone --branch dev_comm https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
2222
cp ./../buildscript/master_deploy.sh .
2323
cp ./../buildscript/buildenv.sh .
2424
cp ./../buildscript/awsconfiguration.sh .
@@ -118,7 +118,7 @@ jobs:
118118
command: |
119119
source awsenvconf
120120
source buildenvvar
121-
./master_deploy.sh -d ECS -e PROD -t latest -s beta_communityapp_taskvar -i communityapp
121+
./master_deploy.sh -d ECS -e PROD -t latest -s beta_communityapp_taskvar, -i communityapp
122122
123123
# Build & Deploy against production backend
124124
"build-prod":
@@ -177,13 +177,15 @@ workflows:
177177
- develop
178178
- hot-fix
179179
- survey_tc
180+
- fix-groups-updates
180181
# This is alternate dev env for parallel testing
181182
- "build-test":
182183
context : org-global
183184
filters:
184185
branches:
185186
only:
186187
- hot-fix
188+
- feature-groups-api
187189
# This is beta env for production soft releases
188190
- "build-prod-beta":
189191
context : org-global
@@ -192,6 +194,9 @@ workflows:
192194
only:
193195
- develop
194196
- survey_tc
197+
- feature-groups-api
198+
- mm-broker-api
199+
- fix-groups-updates
195200
# Production builds are exectuted only on tagged commits to the
196201
# master branch.
197202
- "build-prod":

Dockerfile

+8
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ ARG TC_M2M_CLIENT_SECRET
5454
ARG TC_M2M_AUDIENCE
5555
ARG TC_M2M_GRANT_TYPE
5656

57+
ARG TC_M2M_AUTH0_PROXY_SERVER_URL
58+
ARG TC_M2M_AUTH0_URL
59+
ARG AUTH_SECRET
60+
5761
################################################################################
5862
# Setting of environment variables in the Docker image.
5963

@@ -93,6 +97,10 @@ ENV TC_M2M_CLIENT_SECRET=$TC_M2M_CLIENT_SECRET
9397
ENV TC_M2M_AUDIENCE=$TC_M2M_AUDIENCE
9498
ENV TC_M2M_GRANT_TYPE=$TC_M2M_GRANT_TYPE
9599

100+
ENV TC_M2M_AUTH0_PROXY_SERVER_URL=$TC_M2M_AUTH0_PROXY_SERVER_URL
101+
ENV TC_M2M_AUTH0_URL=$TC_M2M_AUTH0_URL
102+
ENV AUTH_SECRET=$AUTH_SECRET
103+
96104
ENV CONTENTFUL_MANAGEMENT_TOKEN=$CONTENTFUL_MANAGEMENT_TOKEN
97105
ENV CONTENTFUL_EDU_SPACE_ID=$CONTENTFUL_EDU_SPACE_ID
98106
ENV CONTENTFUL_EDU_CDN_API_KEY=$CONTENTFUL_EDU_CDN_API_KEY

build.sh

+3
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ docker build -t $TAG \
3636
--build-arg TC_M2M_CLIENT_ID=$TC_M2M_CLIENT_ID \
3737
--build-arg TC_M2M_CLIENT_SECRET=$TC_M2M_CLIENT_SECRET \
3838
--build-arg TC_M2M_AUDIENCE=$TC_M2M_AUDIENCE \
39+
--build-arg TC_M2M_AUTH0_PROXY_SERVER_URL=$TC_M2M_AUTH0_PROXY_SERVER_URL \
40+
--build-arg TC_M2M_AUTH0_URL=$TC_M2M_AUTH0_URL \
41+
--build-arg AUTH_SECRET=$AUTH_SECRET \
3942
--build-arg TC_M2M_GRANT_TYPE=$TC_M2M_GRANT_TYPE .
4043

4144
# Copies "node_modules" from the created image, if necessary for caching.

config/custom-environment-variables.js

+7
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,18 @@ module.exports = {
7474

7575
OPEN_EXCHANGE_RATES_KEY: 'OPEN_EXCHANGE_RATES_KEY',
7676

77+
JWT_AUTH: {
78+
SECRET: 'AUTH_SECRET',
79+
VALID_ISSUERS: 'VALID_ISSUERS',
80+
},
81+
7782
TC_M2M: {
83+
AUTH0_URL: 'TC_M2M_AUTH0_URL',
7884
CLIENT_ID: 'TC_M2M_CLIENT_ID',
7985
CLIENT_SECRET: 'TC_M2M_CLIENT_SECRET',
8086
AUDIENCE: 'TC_M2M_AUDIENCE',
8187
GRANT_TYPE: 'TC_M2M_GRANT_TYPE',
88+
AUTH0_PROXY_SERVER_URL: 'TC_M2M_AUTH0_PROXY_SERVER_URL',
8289
},
8390
},
8491
};

config/default.js

+17
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
/* All availalbe configuration options should be documented in the default
22
* config file, even when they are overriden in every custom configuration. */
33

4+
const { deferConfig } = require('config/defer');
5+
46
module.exports = {
57
/* Configuration of Topcoder APIs. */
68
API: {
79
V2: 'https://api.topcoder-dev.com/v2',
810
V3: 'https://api.topcoder-dev.com/v3',
911
V4: 'https://api.topcoder-dev.com/v4',
1012
V5: 'https://api.topcoder-dev.com/v5',
13+
MM_BROKER: '/api',
1114
},
1215

1316
/* Auth0 config */
@@ -210,15 +213,29 @@ module.exports = {
210213

211214
OPEN_EXCHANGE_RATES_KEY: '',
212215

216+
/* Review type ID for AV Scans. */
217+
AV_SCAN_SCORER_REVIEW_TYPE_ID: '',
218+
219+
JWT_AUTH: {
220+
SECRET: '',
221+
VALID_ISSUERS: deferConfig(function d() {
222+
return this.VALID_ISSUERS ? this.VALID_ISSUERS.replace(/\\"/g, '')
223+
: '["https://api.topcoder-dev.com", "https://api.topcoder.com", "https://topcoder-dev.auth0.com/"]';
224+
}),
225+
},
226+
213227
/* These credentials allow Community App server to communicate with
214228
* protected TC API endpoints (on behalf of the app itself). */
215229
TC_M2M: {
230+
AUTH0_URL: '',
216231
CLIENT_ID: '',
217232
CLIENT_SECRET: '',
218233
AUDIENCE: '',
219234
GRANT_TYPE: '',
235+
AUTH0_PROXY_SERVER_URL: '',
220236
},
221237
},
238+
222239
SECONDARY_MENU_FOR_LOGGED_USER: [
223240
{
224241
title: 'Dashboard',

config/development.js

+4
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@ module.exports = {
44
URL: {
55
USER_SETTINGS: '', /* No dev server is available for saved searches */
66
},
7+
8+
SECRET: {
9+
AV_SCAN_SCORER_REVIEW_TYPE_ID: '68c5a381-c8ab-48af-92a7-7a869a4ee6c3',
10+
},
711
};

config/production.js

+4
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,8 @@ module.exports = {
9393
title: 'Switch to BUSINESS',
9494
href: 'https://connect.topcoder.com',
9595
},
96+
97+
SECRET: {
98+
AV_SCAN_SCORER_REVIEW_TYPE_ID: '55bbb17d-aac2-45a6-89c3-a8d102863d05',
99+
},
96100
};

config/production.json

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"info": {
3+
"_postman_id": "093e51f1-1207-41e7-89d6-4e71d5513a7d",
4+
"name": "TC MM Broker",
5+
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
6+
},
7+
"item": [
8+
{
9+
"name": "{{base}}/v5/submissions?challengeId=30055457",
10+
"request": {
11+
"method": "GET",
12+
"header": [
13+
{
14+
"key": "Authorization",
15+
"value": "Bearer {{token}}",
16+
"type": "text"
17+
}
18+
],
19+
"url": {
20+
"raw": "{{base}}/api/v5/submissions?challengeId=30055457",
21+
"host": [
22+
"{{base}}"
23+
],
24+
"path": [
25+
"api",
26+
"v5",
27+
"submissions"
28+
],
29+
"query": [
30+
{
31+
"key": "challengeId",
32+
"value": "30055457"
33+
}
34+
]
35+
}
36+
},
37+
"response": []
38+
},
39+
{
40+
"name": "{{base}}/v5/submissions/8816e023-c824-4c3d-a4a7-0dca66333d3c",
41+
"request": {
42+
"method": "GET",
43+
"header": [
44+
{
45+
"key": "Authorization",
46+
"value": "Bearer {{token}}",
47+
"type": "text"
48+
}
49+
],
50+
"url": {
51+
"raw": "{{base}}/api/v5/submissions/8816e023-c824-4c3d-a4a7-0dca66333d3c",
52+
"host": [
53+
"{{base}}"
54+
],
55+
"path": [
56+
"api",
57+
"v5",
58+
"submissions",
59+
"8816e023-c824-4c3d-a4a7-0dca66333d3c"
60+
]
61+
}
62+
},
63+
"response": []
64+
}
65+
],
66+
"protocolProfileBehavior": {}
67+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"id": "1707ac96-1010-4ea9-980f-373e8ddd5b5b",
3+
"name": "TC MM Broker",
4+
"values": [
5+
{
6+
"key": "base",
7+
"value": "localhost:3000",
8+
"enabled": true
9+
},
10+
{
11+
"key": "token",
12+
"value": "",
13+
"enabled": true
14+
}
15+
],
16+
"_postman_variable_scope": "environment",
17+
"_postman_exported_at": "2019-09-26T13:40:11.068Z",
18+
"_postman_exported_using": "Postman/7.8.0"
19+
}

0 commit comments

Comments
 (0)