Skip to content

Commit c17442e

Browse files
Merge branch 'develop' into fix-topgear-profile
2 parents 2d43f2b + 68eed92 commit c17442e

File tree

75 files changed

+2645
-218
lines changed

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

+2645
-218
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,14 +289,14 @@ workflows:
289289
filters:
290290
branches:
291291
only:
292-
- fix-topgear-profile
292+
- free
293293
# This is beta env for production soft releases
294294
- "build-prod-beta":
295295
context : org-global
296296
filters:
297297
branches:
298298
only:
299-
- fix-topgear-profile
299+
- free
300300
# This is stage env for production QA releases
301301
- "build-prod-staging":
302302
context : org-global

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

__tests__/shared/components/challenge-listing/__snapshots__/index.jsx.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ exports[`Matches shallow shapshot 1 shapshot 1 1`] = `
88
<Connect(Container)
99
setFilterState={[MockFunction]}
1010
/>
11+
<Banner />
1112
<div
1213
className="src-shared-components-challenge-listing-___style__tc-content-wrapper___1MqlF"
1314
>
@@ -64,6 +65,7 @@ exports[`Matches shallow shapshot 2 shapshot 2 1`] = `
6465
<Connect(Container)
6566
setFilterState={[MockFunction]}
6667
/>
68+
<Banner />
6769
<div
6870
className="src-shared-components-challenge-listing-___style__tc-content-wrapper___1MqlF"
6971
>

build.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ 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 \
36+
--build-arg PLATFORM_SITE_URL=$PLATFORM_SITE_URL \
3537
--build-arg SERVER_API_KEY=$SERVER_API_KEY \
3638
--build-arg TC_M2M_CLIENT_ID=$TC_M2M_CLIENT_ID \
3739
--build-arg TC_M2M_CLIENT_SECRET=$TC_M2M_CLIENT_SECRET \
@@ -48,6 +50,7 @@ docker build -t $TAG \
4850
--build-arg GROWSURF_API_KEY=$GROWSURF_API_KEY \
4951
--build-arg GROWSURF_CAMPAIGN_ID=$GROWSURF_CAMPAIGN_ID \
5052
--build-arg GSHEETS_API_KEY=$GSHEETS_API_KEY \
53+
--build-arg OPTIMIZELY_SDK_KEY=$OPTIMIZELY_SDK_KEY \
5154
--build-arg COMMUNITY_APP_URL=$COMMUNITY_APP_URL .
5255

5356
# 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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ module.exports = {
140140
HOWTOCOMPETEINMARATHON: 'https://www.topcoder.com/thrive/articles/How%20To%20Compete%20in%20a%20Marathon%20Match',
141141
USABLECODEDEV: 'https://www.topcoder.com/thrive/articles/Usable%20Code%20in%20Dev%20Challenges',
142142
EXTENSIONVSCODE: 'https://marketplace.visualstudio.com/items?itemName=Topcoder.topcoder-workflow&ssr=false#overview',
143+
TEMPLATES_REPO: 'https://github.com/topcoder-platform-templates',
143144
},
144145

145146
IOS: 'https://ios.topcoder-dev.com',
@@ -425,4 +426,8 @@ module.exports = {
425426
DEBOUNCE_ON_CHANGE_TIME: 150,
426427
},
427428
ENABLE_RECOMMENDER: true,
429+
OPTIMIZELY: {
430+
SDK_KEY: '7V4CJhurXT3Y3bnzv1hv1',
431+
},
432+
PLATFORM_SITE_URL: 'https://platform.topcoder.com',
428433
};

config/development.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ module.exports = {
44
URL: {
55
USER_SETTINGS: '', /* No dev server is available for saved searches */
66
},
7+
PLATFORM_SITE_URL: 'https://platform.topcoder-dev.com',
78
};
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",

src/assets/images/banner-close.svg

Lines changed: 8 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)