Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit fb8dffc

Browse files
author
sachin-maheshwari
authored
Merge pull request #17 from topcoder-platform/feature/auth0-proxy-server-ms13
MS v1.3 and Auth0 proxy changes
2 parents f3f0117 + 2f85eb5 commit fb8dffc

File tree

4 files changed

+31
-10
lines changed

4 files changed

+31
-10
lines changed

.circleci/config.yml

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,17 @@ defaults: &defaults
55
install_dependency: &install_dependency
66
name: Installation of build and deployment dependencies.
77
command: |
8-
apk add --no-cache bash
8+
apk add --no-cache bash curl
99
apk add --no-cache jq py-pip sudo
1010
sudo pip install awscli --upgrade
1111
sudo pip install docker-compose
12+
install_deploysuite: &install_deploysuite
13+
name: Installation of install_deploysuite.
14+
command: |
15+
git clone --branch v1.3 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
16+
cp ./../buildscript/master_deploy.sh .
17+
cp ./../buildscript/buildenv.sh .
18+
cp ./../buildscript/awsconfiguration.sh .
1219
restore_cache_settings_for_build: &restore_cache_settings_for_build
1320
key: docker-node-modules-lp-{{ checksum "package-lock.json" }}
1421

@@ -25,15 +32,21 @@ jobs:
2532
- checkout
2633
- setup_remote_docker
2734
- run: *install_dependency
35+
- run: *install_deploysuite
2836
- restore_cache: *restore_cache_settings_for_build
2937
- run: ./build.sh
3038
- save_cache: *save_cache_settings
3139
- deploy:
3240
name: Running MasterScript.
3341
command: |
34-
git clone --branch v1.1 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
35-
cp ./../buildscript/master_deploy.sh .
36-
./master_deploy.sh -d ECS -e DEV -t latest -s leaderboard-processor -i leaderboard-processor
42+
#git clone --branch v1.1 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
43+
#cp ./../buildscript/master_deploy.sh .
44+
#./master_deploy.sh -d ECS -e DEV -t latest -s leaderboard-processor -i leaderboard-processor
45+
./awsconfiguration.sh DEV
46+
source awsenvconf
47+
./buildenv.sh -e DEV -b dev-leaderboard-processor-deployvar
48+
source buildenvvar
49+
./master_deploy.sh -d ECS -e DEV -t latest -s dev-global-appvar,dev-leaderboard-processor-appvar -i leaderboard-processor
3750
3851
# Build & Deploy against production backend
3952
"build-prod":
@@ -42,28 +55,35 @@ jobs:
4255
- checkout
4356
- setup_remote_docker
4457
- run: *install_dependency
58+
- run: *install_deploysuite
4559
- restore_cache: *restore_cache_settings_for_build
4660
- run: ./build.sh
4761
- save_cache: *save_cache_settings
4862
- deploy:
4963
name: Running MasterScript.
5064
command: |
51-
git clone --branch v1.1 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
52-
cp ./../buildscript/master_deploy.sh .
53-
./master_deploy.sh -d ECS -e PROD -t latest -s leaderboard-processor -i leaderboard-processor
65+
#git clone --branch v1.1 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
66+
#cp ./../buildscript/master_deploy.sh .
67+
#./master_deploy.sh -d ECS -e PROD -t latest -s leaderboard-processor -i leaderboard-processor
68+
./awsconfiguration.sh PROD
69+
source awsenvconf
70+
./buildenv.sh -e PROD -b prod-leaderboard-processor-deployvar
71+
source buildenvvar
72+
./master_deploy.sh -d ECS -e PROD -t latest -s prod-global-appvar,prod-leaderboard-processor-appvar -i leaderboard-processor
5473
5574
workflows:
5675
version: 2
5776
build:
5877
jobs:
5978
# Development builds are executed on "develop" branch only.
6079
- "build-dev":
80+
context : org-global
6181
filters:
6282
branches:
6383
only:
64-
- circleci
6584
- develop
6685
- "build-prod":
86+
context : org-global
6787
filters:
6888
branches:
6989
only:

config/default.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@ module.exports = {
2929
TOKEN_CACHE_TIME: process.env.TOKEN_CACHE_TIME,
3030
AUTH0_CLIENT_ID: process.env.AUTH0_CLIENT_ID,
3131
AUTH0_CLIENT_SECRET: process.env.AUTH0_CLIENT_SECRET,
32+
AUTH0_PROXY_SERVER_URL: process.env.AUTH0_PROXY_SERVER_URL,
3233
MONGODB_URL: process.env.MONGODB_URL || 'mongodb://localhost:27017/leaderboardDB'
3334
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"mongoose": "^5.3.3",
3030
"no-kafka": "^3.2.4",
3131
"superagent": "^3.8.3",
32-
"tc-core-library-js": "appirio-tech/tc-core-library-js.git#feature/m2mtoken",
32+
"tc-core-library-js": "appirio-tech/tc-core-library-js.git#v2.6",
3333
"topcoder-healthcheck-dropin": "^1.0.3",
3434
"winston": "^3.1.0"
3535
},

src/common/helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const _ = require('lodash')
77
const request = require('superagent')
88
const m2mAuth = require('tc-core-library-js').auth.m2m
99

10-
const m2m = m2mAuth(_.pick(config, ['AUTH0_URL', 'AUTH0_AUDIENCE', 'TOKEN_CACHE_TIME']))
10+
const m2m = m2mAuth(_.pick(config, ['AUTH0_URL', 'AUTH0_AUDIENCE', 'TOKEN_CACHE_TIME', 'AUTH0_PROXY_SERVER_URL']))
1111

1212
/*
1313
* Check if the Group ID is configured to be processed

0 commit comments

Comments
 (0)