Skip to content

Commit b9f78d3

Browse files
Merge branch 'develop' into remove-CORS
2 parents 72db6a1 + f21c1de commit b9f78d3

31 files changed

+1641
-101
lines changed

.circleci/config.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -276,37 +276,34 @@ workflows:
276276
branches:
277277
only:
278278
- develop
279-
- feature/recommender-sync-develop
280-
- remove-CORS
281279
# This is alternate dev env for parallel testing
282280
- "build-test":
283281
context : org-global
284282
filters:
285283
branches:
286284
only:
287-
- FAQ-theme
285+
- free
288286
# This is alternate dev env for parallel testing
289287
- "build-qa":
290288
context : org-global
291289
filters:
292290
branches:
293291
only:
294-
- bug-bash
292+
- free
295293
# This is beta env for production soft releases
296294
- "build-prod-beta":
297295
context : org-global
298296
filters:
299297
branches:
300298
only:
301-
- bug-bash
299+
- free
302300
# This is stage env for production QA releases
303301
- "build-prod-staging":
304302
context : org-global
305303
filters:
306304
branches:
307305
only:
308306
- develop
309-
- feature/recommender-sync-develop
310307
- "approve-smoke-test-on-staging":
311308
type: approval
312309
requires:

Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ ARG MAILCHIMP_BASE_URL
5252
ARG NODE_CONFIG_ENV
5353
ARG OPEN_EXCHANGE_RATES_KEY
5454
ARG SEGMENT_IO_API_KEY
55+
ARG CHAMELEON_VERIFICATION_SECRET
5556
ARG SERVER_API_KEY
5657

5758
# TC M2M credentials for Community App server
@@ -72,6 +73,9 @@ ARG SENDGRID_API_KEY
7273
ARG GROWSURF_API_KEY
7374
ARG GROWSURF_CAMPAIGN_ID
7475

76+
# Optimizely
77+
ARG OPTIMIZELY_SDK_KEY
78+
7579
################################################################################
7680
# Setting of environment variables in the Docker image.
7781

@@ -108,6 +112,7 @@ ENV MAILCHIMP_BASE_URL=$MAILCHIMP_BASE_URL
108112
ENV NODE_CONFIG_ENV=$NODE_CONFIG_ENV
109113
ENV OPEN_EXCHANGE_RATES_KEY=$OPEN_EXCHANGE_RATES_KEY
110114
ENV SEGMENT_IO_API_KEY=$SEGMENT_IO_API_KEY
115+
ENV CHAMELEON_VERIFICATION_SECRET=$CHAMELEON_VERIFICATION_SECRET
111116
ENV SERVER_API_KEY=$SERVER_API_KEY
112117

113118
# TC M2M credentials for Community App server
@@ -131,6 +136,9 @@ ENV GROWSURF_API_KEY=$GROWSURF_API_KEY
131136
ENV GROWSURF_CAMPAIGN_ID=$GROWSURF_CAMPAIGN_ID
132137
ENV GSHEETS_API_KEY=$GSHEETS_API_KEY
133138

139+
# Optimizely
140+
ENV OPTIMIZELY_SDK_KEY=$OPTIMIZELY_SDK_KEY
141+
134142
################################################################################
135143
# Testing and build of the application inside the container.
136144

build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ docker build -t $TAG \
3232
--build-arg NODE_CONFIG_ENV=$NODE_CONFIG_ENV \
3333
--build-arg OPEN_EXCHANGE_RATES_KEY=$OPEN_EXCHANGE_RATES_KEY \
3434
--build-arg SEGMENT_IO_API_KEY=$SEGMENT_IO_API_KEY \
35+
--build-arg CHAMELEON_VERIFICATION_SECRET=$CHAMELEON_VERIFICATION_SECRET \
3536
--build-arg SERVER_API_KEY=$SERVER_API_KEY \
3637
--build-arg TC_M2M_CLIENT_ID=$TC_M2M_CLIENT_ID \
3738
--build-arg TC_M2M_CLIENT_SECRET=$TC_M2M_CLIENT_SECRET \
@@ -48,6 +49,7 @@ docker build -t $TAG \
4849
--build-arg GROWSURF_API_KEY=$GROWSURF_API_KEY \
4950
--build-arg GROWSURF_CAMPAIGN_ID=$GROWSURF_CAMPAIGN_ID \
5051
--build-arg GSHEETS_API_KEY=$GSHEETS_API_KEY \
52+
--build-arg OPTIMIZELY_SDK_KEY=$OPTIMIZELY_SDK_KEY \
5153
--build-arg COMMUNITY_APP_URL=$COMMUNITY_APP_URL .
5254

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

config/custom-environment-variables.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ module.exports = {
9999
RECRUITCRM_API_KEY: 'RECRUITCRM_API_KEY',
100100
GROWSURF_API_KEY: 'GROWSURF_API_KEY',
101101
SENDGRID_API_KEY: 'SENDGRID_API_KEY',
102+
CHAMELEON_VERIFICATION_SECRET: 'CHAMELEON_VERIFICATION_SECRET',
102103
},
103104
GROWSURF_CAMPAIGN_ID: 'GROWSURF_CAMPAIGN_ID',
104105
AUTH_CONFIG: {
@@ -108,4 +109,7 @@ module.exports = {
108109
TOKEN_CACHE_TIME: 'TOKEN_CACHE_TIME',
109110
},
110111
GSHEETS_API_KEY: 'GSHEETS_API_KEY',
112+
OPTIMIZELY: {
113+
SDK_KEY: 'OPTIMIZELY_SDK_KEY',
114+
},
111115
};

config/default.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,4 +426,7 @@ module.exports = {
426426
DEBOUNCE_ON_CHANGE_TIME: 150,
427427
},
428428
ENABLE_RECOMMENDER: true,
429+
OPTIMIZELY: {
430+
SDK_KEY: '7V4CJhurXT3Y3bnzv1hv1',
431+
},
429432
};

docs/secure-identity-verification.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Setup
2+
1. Make sure you have a Chameleon Account and segment.com account
3+
2. Integrate Chameleon Account with Segment. https://help.trychameleon.com/en/articles/1161770-installing-using-segment
4+
3. Set Environment secret variable retrieved here https://app.trychameleon.com/settings/integrations/segment. Run the following command
5+
`export CHAMELEON_VERIFICATION_SECRET=<Your Chameleon Secret>`
6+
4. Run community app
7+
8+
## Verification
9+
1. Log in to topcoder-dev account
10+
2. Access http://local.topcoder-dev.com/challenges
11+
3. You will notice in the network tab there will be 2 requests POST to https://api.segment.io/v1/i, one will send it to segment and one will send only to chameleon (with request payload `{ integrations: { All: false, Chameleon: true }}`)
12+
13+
Repeat the proses and log in to different account and make sure the `uid_hash` is different for each different user.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
},
3838
"dependencies": {
3939
"@hapi/joi": "^16.1.4",
40+
"@optimizely/react-sdk": "^2.5.0",
4041
"@topcoder-platform/tc-auth-lib": "topcoder-platform/tc-auth-lib#1.0.4",
4142
"aos": "^2.3.4",
4243
"atob": "^2.1.1",
1.95 KB
Loading
1.52 KB
Loading
1.88 KB
Loading

0 commit comments

Comments
 (0)