Skip to content

Commit

Permalink
Merge pull request #1366 from torusresearch/feat/alpha-config
Browse files Browse the repository at this point in the history
Add alpha config to develop
  • Loading branch information
chaitanyapotti authored Dec 15, 2020
2 parents 76cb1eb + 8163ce8 commit 94fd9a7
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 24 deletions.
56 changes: 33 additions & 23 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,24 +136,37 @@ jobs:
paths:
- torus-website/app/dist
- <<: *step_save_cache
build-lrc:
deploy-testing:
<<: *job_common_base
steps:
- attach_workspace:
at: ~/
- add_ssh_keys
- run:
name: "Deploy Over SSH"
command: |
ssh-keyscan -H testing.tor.us >> ~/.ssh/known_hosts
tar czf - dist/ | ssh [email protected] "rm -rf ~/testing-torus-website/* && tar -zxf - -C ~/testing-torus-website/"
# ------------------------
# alpha configurations
# ------------------------
build-alpha:
<<: *job_common
resource_class: large
steps:
- checkout:
path: ~/torus-website
- <<: *step_restore_cache
- <<: *step_setup_global_packages
- run:
name: "Build code for torus lrc website"
name: "Build code for torus alpha website"
command: |
npm run build:lrc
npm run build:alpha-branches
- persist_to_workspace:
root: ~/
paths:
- torus-website/app/dist
- <<: *step_save_cache
deploy-testing:
deploy-alpha:
<<: *job_common_base
steps:
- attach_workspace:
Expand All @@ -162,19 +175,11 @@ jobs:
- run:
name: "Deploy Over SSH"
command: |
ssh-keyscan -H testing.tor.us >> ~/.ssh/known_hosts
tar czf - dist/ | ssh [email protected] "rm -rf ~/testing-torus-website/* && tar -zxf - -C ~/testing-torus-website/"
deploy-lrc:
<<: *job_common_base
steps:
- attach_workspace:
at: ~/
- add_ssh_keys
- run:
name: "Deploy Over SSH"
command: |
ssh-keyscan -H lrc.tor.us >> ~/.ssh/known_hosts
tar czf - dist/ | ssh [email protected] "rm -rf ~/lrc-torus-website/* && tar -zxf - -C ~/lrc-torus-website/"
ssh-keyscan -H "$CIRCLE_BRANCH".tor.us >> ~/.ssh/known_hosts
tar czf - dist/ | ssh ubuntu@"$CIRCLE_BRANCH".tor.us "rm -rf ~/"$CIRCLE_BRANCH"-torus-website/* && tar -zxf - -C ~/"$CIRCLE_BRANCH"-torus-website/"
# ------------------------
# alpha configurations
# ------------------------

workflows:
version: 2
Expand Down Expand Up @@ -248,16 +253,21 @@ workflows:
branches:
only:
- develop
- build-lrc:
# ------------------------
# alpha configurations
# ------------------------
- build-alpha:
filters:
branches:
only:
- develop
- deploy-lrc:
- /^alpha.*/
- lrc
- deploy-alpha:
requires:
- build-lrc
- build-alpha
- test-coverage
filters:
branches:
only:
- develop
- /^alpha.*/
- lrc
53 changes: 53 additions & 0 deletions app/.env.basealpha
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# base config
NODE_ENV=production
# node list
VUE_APP_PROXY_ADDRESS=0x4023d2a0D330bF11426B12C6144Cfb96B7fa6183
VUE_APP_PROXY_NETWORK=ropsten
# client ids
VUE_APP_GOOGLE_CLIENT_ID=221898609709-obfn3p63741l5333093430j3qeiinaa8.apps.googleusercontent.com
VUE_APP_APPLE_CLIENT_ID=m1Q0gvDfOyZsJCZ3cucSQEe9XMvl9d9L
VUE_APP_DISCORD_CLIENT_ID=682533837464666198
VUE_APP_FACEBOOK_CLIENT_ID=617201755556395
VUE_APP_GITHUB_CLIENT_ID=PC2a4tfNRvXbT48t89J5am0oFM21Nxff
VUE_APP_KAKAO_CLIENT_ID=wpkcc7alGJjEgjaL6q5AWRqgRWHFsdTL
VUE_APP_LINE_CLIENT_ID=WN8bOmXKNRH1Gs8k475glfBP5gDZr9H1
VUE_APP_LINKEDIN_CLIENT_ID=59YxSgx79Vl3Wi7tQUBqQTRTxWroTuoc
VUE_APP_REDDIT_CLIENT_ID=DjMpvEBI5dS3pQ
VUE_APP_TWITCH_CLIENT_ID=f5and8beke76mzutmics0zu4gw10dj
VUE_APP_TWITTER_CLIENT_ID=A7H8kkcmyFRlusJQ9dZiqBLraG2yWIsO
VUE_APP_WEIBO_CLIENT_ID=dhFGlWQMoACOI5oS5A1jFglp772OAWr1
VUE_APP_WECHAT_CLIENT_ID=cewDD3i6F1vtHeV1KIbaxUZ8vJQjJZ8V
VUE_APP_HOSTED_EMAIL_PASSWORDLESS_CLIENT_ID=P7PJuBCXIHP41lcyty0NEb7Lgf7Zme8Q
# normal verifiers
VUE_APP_GOOGLE_VERIFIER=google-lrc
VUE_APP_APPLE_VERIFIER=torus-auth0-apple-lrc
VUE_APP_DISCORD_VERIFIER=discord-lrc
VUE_APP_FACEBOOK_VERIFIER=facebook-lrc
VUE_APP_GITHUB_VERIFIER=torus-auth0-github-lrc
VUE_APP_KAKAO_VERIFIER=torus-auth0-kakao-lrc
VUE_APP_LINE_VERIFIER=torus-auth0-line-lrc
VUE_APP_LINKEDIN_VERIFIER=torus-auth0-linkedin-lrc
VUE_APP_REDDIT_VERIFIER=reddit-lrc
VUE_APP_TWITCH_VERIFIER=twitch-lrc
VUE_APP_TWITTER_VERIFIER=torus-auth0-twitter-lrc
VUE_APP_WEIBO_VERIFIER=torus-auth0-weibo-lrc
VUE_APP_WECHAT_VERIFIER=torus-auth0-wechat-lrc
VUE_APP_HOSTED_EMAIL_PASSWORDLESS_VERIFIER=torus-auth0-email-passwordless-lrc
# tkey linked login verifiers
VUE_APP_GOOGLE_LINKED_VERIFIER=tkey-google-lrc
VUE_APP_APPLE_LINKED_VERIFIER=tkey-auth0-apple-lrc
VUE_APP_DISCORD_LINKED_VERIFIER=tkey-discord-lrc
VUE_APP_FACEBOOK_LINKED_VERIFIER=tkey-facebook-lrc
VUE_APP_GITHUB_LINKED_VERIFIER=tkey-auth0-github-lrc
VUE_APP_KAKAO_LINKED_VERIFIER=tkey-auth0-kakao-lrc
VUE_APP_LINE_LINKED_VERIFIER=tkey-auth0-line-lrc
VUE_APP_LINKEDIN_LINKED_VERIFIER=tkey-auth0-linkedin-lrc
VUE_APP_REDDIT_LINKED_VERIFIER=tkey-reddit-lrc
VUE_APP_TWITCH_LINKED_VERIFIER=tkey-twitch-lrc
VUE_APP_TWITTER_LINKED_VERIFIER=tkey-auth0-twitter-lrc
VUE_APP_WEIBO_LINKED_VERIFIER=tkey-auth0-weibo-lrc
VUE_APP_WECHAT_LINKED_VERIFIER=tkey-auth0-wechat-lrc
VUE_APP_HOSTED_EMAIL_PASSWORDLESS_LINKED_VERIFIER=tkey-auth0-email-passwordless-lrc
# tkey linked login verifier sub identifier
VUE_APP_LINKED_VERIFIER_SUBIDENTIFIER=torus
VUE_APP_LOGIN_DOMAIN=https://torus-test.auth0.com
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build:dev": "cross-env VUE_APP_TORUS_BUILD_ENV=development npm run pre-build && vue-cli-service build --mode development",
"build:binance": "cross-env VUE_APP_TORUS_BUILD_ENV=binance npm run pre-build && vue-cli-service build --mode binance && npm run post-build",
"build:testing": "cross-env VUE_APP_TORUS_BUILD_ENV=testing npm run pre-build && vue-cli-service build --mode testing",
"build:lrc": "cross-env VUE_APP_TORUS_BUILD_ENV=lrc npm run pre-build && vue-cli-service build --mode lrc",
"build:alpha-branches": ". ./scripts/buildAlpha.sh",
"dev": "cross-env NODE_ENV=development VUE_APP_TORUS_BUILD_ENV=development node server.js",
"locale": "node ./scripts/importLocales.js",
"lint:js": "eslint --fix 'src/**/*.js'",
Expand Down
13 changes: 13 additions & 0 deletions app/scripts/buildAlpha.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export VUE_APP_TORUS_BUILD_ENV="$CIRCLE_BRANCH"
export VUE_APP_BASE_ROUTE="https://"$CIRCLE_BRANCH".tor.us"
if [ "$CIRCLE_BRANCH" = "lrc" ]
then
export BUILD_MODE="$CIRCLE_BRANCH"
else
export BUILD_MODE="basealpha"
fi

echo $VUE_APP_TORUS_BUILD_ENV
echo $VUE_APP_BASE_ROUTE
echo $BUILD_MODE
cross-env VUE_APP_TORUS_BUILD_ENV="$CIRCLE_BRANCH" npm run pre-build && vue-cli-service build --mode "$BUILD_MODE"

0 comments on commit 94fd9a7

Please sign in to comment.