-
Notifications
You must be signed in to change notification settings - Fork 51
V6 -> develop #1694
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V6 -> develop #1694
Changes from 117 commits
a7c776a
ef828a5
ffdc6ef
3dcb310
fc0e045
67f2fed
b8229b5
2a4abb9
66e70f5
5791794
299251c
2f7bad2
abdc179
114986d
5f37507
d56a1ce
866d9c8
ca279a8
5fe8b9f
445377b
2cf363f
e05594d
9b17d61
82aac16
c0799c2
098c918
aa2c591
93d5eff
e6edb31
ac9299d
d494a46
75248d3
48494ed
469a67d
2434bac
27a8d35
431c299
505201a
63cb77b
d73c557
4347f53
93117e2
f0b5e55
94620dd
1b3ffdc
9a3fd18
28704a6
f0ad47d
4b90526
d6eb29c
6fc88b1
0d621d3
e10dbc6
6d2c237
55723a4
0b4f6cf
261533a
2eccf36
c6b7f67
1eca2d3
33aa667
2766d34
e69b522
7803d87
52316c6
4af15d8
6a3e8c8
7f3d972
cb9214a
1348da3
7bd29dc
8fdd9bc
90a8e6e
61336b3
232eeb4
29b9492
c3edee5
1bfd21f
a189372
73c7173
8065f03
7b51f7a
7ca953a
f47ca8a
3c84892
0420c1d
156e400
ffe2aa6
0ade63d
eb25aea
43137fb
0d9ea23
9aeb827
28d474e
2fcfd15
b3febaa
298ffc7
ce8e856
5752cdd
458fed1
fb0bfd1
d5e490f
0376535
ab56ef2
3dbab05
b49c684
4b3b2a8
f02cc59
12d46df
f40c129
93f960a
2bf7c3a
ade1e0f
4dbe5e9
849cc5a
3cb58bd
b431ddc
422201e
8d3bd42
a23b3cb
7696d7b
574a7d0
a0dafc0
8d10db5
fd88e8c
6826244
b115531
008abb9
7ead801
03dabbe
2c19018
0b5f7d7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,10 +37,11 @@ install_test_dependency: &install_test_dependency | |
| install_deploysuite: &install_deploysuite | ||
| name: Installation of install_deploysuite. | ||
| command: | | ||
| git clone --branch v1.4.15 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript | ||
| git clone --branch v1.4.17 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript | ||
| cp ./../buildscript/master_deploy.sh . | ||
| cp ./../buildscript/buildenv.sh . | ||
| cp ./../buildscript/awsconfiguration.sh . | ||
| cp ../buildscript/psvar-processor.sh . | ||
|
|
||
| restore_cache_settings_for_build: &restore_cache_settings_for_build | ||
| key: docker-node-modules-28-10-2020-{{ checksum "package-lock.json" }} | ||
|
|
@@ -59,22 +60,27 @@ builddeploy_steps: &builddeploy_steps | |
| name: "configuring environment" | ||
| command: | | ||
| ./awsconfiguration.sh $DEPLOY_ENV | ||
| ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-buildvar | ||
| #./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-buildvar | ||
| source awsenvconf | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [❗❗ |
||
| ./psvar-processor.sh -t appenv -p /config/${APPNAME}/buildvar | ||
| echo awsenvconf >.dockerignore | ||
| echo buildenvvar >>.dockerignore | ||
| echo buildvar_env >>.dockerignore | ||
| - run: | ||
| name: "building image" | ||
| command: | | ||
| source buildenvvar | ||
| source buildvar_env | ||
| ./build.sh ${APPNAME} | ||
| - deploy: | ||
| name: Running MasterScript. | ||
| command: | | ||
| #./awsconfiguration.sh $DEPLOY_ENV | ||
| source awsenvconf | ||
| ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-deployvar | ||
| source buildenvvar | ||
| ./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-appvar -i ${APPNAME} -p FARGATE | ||
| #./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-deployvar | ||
| #source buildenvvar | ||
| ./psvar-processor.sh -t appenv -p /config/${APPNAME}/deployvar | ||
| source deployvar_env | ||
| #./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-appvar -i ${APPNAME} -p FARGATE | ||
| ./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -j /config/common/global-appvar,/config/${APPNAME}/appvar -i ${APPNAME} -p FARGATE | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [❗❗ |
||
| #curl --request POST \ | ||
| #--url https://circleci.com/api/v2/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pipeline \ | ||
| #--header "Circle-Token: ${CIRCLE_TOKEN}" \ | ||
|
|
@@ -93,13 +99,15 @@ smoke_testing: &smoke_testing # Initialization. | |
| name: "configuring environment" | ||
| command: | | ||
| ./awsconfiguration.sh $DEPLOY_ENV | ||
| ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-buildvar | ||
| #./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-buildvar | ||
| ./psvar-processor.sh -t appenv -p /config/${APPNAME}/buildvar | ||
| - run: | ||
| name: "Run automation" | ||
| no_output_timeout: 20m | ||
| command: | | ||
| source awsenvconf | ||
| source buildenvvar | ||
| #source buildenvvar | ||
| source buildvar_env | ||
| ./test-automation/smoketest.sh | ||
| - store_artifacts: | ||
| path: ./test-automation/test-results | ||
|
|
@@ -113,7 +121,7 @@ jobs: | |
| LOGICAL_ENV: "dev" | ||
| NODE_ENV: "development" | ||
| BABEL_ENV: "development" | ||
| APPNAME: "challenge-engine-ui" | ||
| APPNAME: "challenge-engine-ui-v6" | ||
| steps: *builddeploy_steps | ||
|
|
||
| "build-prod": | ||
|
|
@@ -123,23 +131,23 @@ jobs: | |
| LOGICAL_ENV: "prod" | ||
| NODE_ENV: "production" | ||
| BABEL_ENV: "production" | ||
| APPNAME: "challenge-engine-ui" | ||
| APPNAME: "challenge-engine-ui-v6" | ||
| steps: *builddeploy_steps | ||
|
|
||
| "smoke-testing-dev": | ||
| <<: *test_defaults | ||
| environment: | ||
| DEPLOY_ENV: "DEV" | ||
| LOGICAL_ENV: "dev" | ||
| APPNAME: "challenge-engine-ui" | ||
| APPNAME: "challenge-engine-ui-v6" | ||
| steps: *smoke_testing | ||
|
|
||
| "smoke-testing-prod": | ||
| <<: *test_defaults | ||
| environment: | ||
| DEPLOY_ENV: "PROD" | ||
| LOGICAL_ENV: "prod" | ||
| APPNAME: "challenge-engine-ui" | ||
| APPNAME: "challenge-engine-ui-v6" | ||
| steps: *smoke_testing | ||
|
|
||
| workflows: | ||
|
|
@@ -152,7 +160,7 @@ workflows: | |
| context: org-global | ||
| filters: &filters-dev | ||
| branches: | ||
| only: ["develop", "PM-803_wm-regression-fixes", "PM-902_show-all-projects-on-challenge-page", "pm-1365"] | ||
| only: ["v6"] | ||
jmgasper marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| # Production builds are exectuted only on tagged commits to the | ||
| # master branch. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,6 +27,8 @@ yarn-error.log* | |
| *.env | ||
| *.pem | ||
| *.vscode | ||
| *.pem | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [💡 |
||
| *.vscode | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [💡 |
||
|
|
||
| # e2e test case | ||
| test-automation/temp | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 127525 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 12.17.0 | ||
| 22 | ||
jmgasper marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,24 +1,49 @@ | ||
| #!/bin/bash | ||
| set -eo pipefail | ||
|
|
||
| APP_NAME=$1 | ||
| UPDATE_CACHE="" | ||
| LOCK_FILE_LOCAL="" | ||
| LOCK_FILE_NAME="" | ||
| UPDATE_CACHE=0 | ||
|
|
||
| echo "NODE ENV: $NODE_ENV" | ||
| echo "BABEL ENV: $BABEL_ENV" | ||
| docker compose -f docker/docker-compose.yml build --build-arg NODE_ENV=$NODE_ENV --build-arg BABEL_ENV=$BABEL_ENV --build-arg FILE_PICKER_API_KEY=$FILE_PICKER_API_KEY --build-arg FORCE_DEV=$FORCE_DEV $APP_NAME | ||
| docker create --name app $APP_NAME:latest | ||
|
|
||
| if [ -d node_modules ] | ||
| then | ||
| mv package-lock.json old-package-lock.json | ||
| docker cp app:/$APP_NAME/package-lock.json package-lock.json | ||
| set +eo pipefail | ||
| UPDATE_CACHE=$(cmp package-lock.json old-package-lock.json) | ||
| set -eo pipefail | ||
| else | ||
| # Build the container image | ||
| docker compose -f docker/docker-compose.yml build \ | ||
| --build-arg NODE_ENV=$NODE_ENV \ | ||
| --build-arg BABEL_ENV=$BABEL_ENV \ | ||
| --build-arg FILE_PICKER_API_KEY=$FILE_PICKER_API_KEY \ | ||
| --build-arg FORCE_DEV=$FORCE_DEV \ | ||
| $APP_NAME | ||
|
|
||
| # Create a throwaway container for copying artifacts | ||
| docker create --name app $APP_NAME:latest >/dev/null | ||
|
|
||
| # Determine which lockfile to compare (pnpm preferred, fallback to npm) | ||
| if [ -f pnpm-lock.yaml ]; then | ||
| LOCK_FILE_NAME="pnpm-lock.yaml" | ||
| elif [ -f package-lock.json ]; then | ||
| LOCK_FILE_NAME="package-lock.json" | ||
| fi | ||
|
|
||
| if [ -z "$LOCK_FILE_NAME" ] || [ ! -d node_modules ]; then | ||
| UPDATE_CACHE=1 | ||
| else | ||
| # Compare lockfile from container with local copy | ||
| cp "$LOCK_FILE_NAME" ".old-$LOCK_FILE_NAME" | ||
| docker cp "app:/$APP_NAME/$LOCK_FILE_NAME" "$LOCK_FILE_NAME" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| set +e | ||
| cmp "$LOCK_FILE_NAME" ".old-$LOCK_FILE_NAME" >/dev/null 2>&1 | ||
| CMP_STATUS=$? | ||
| set -e | ||
| if [ $CMP_STATUS -ne 0 ]; then | ||
| UPDATE_CACHE=1 | ||
| fi | ||
| fi | ||
|
|
||
| if [ "$UPDATE_CACHE" == 1 ] | ||
| then | ||
| docker cp app:/$APP_NAME/node_modules . | ||
| fi | ||
| if [ "$UPDATE_CACHE" -eq 1 ]; then | ||
| echo "Lockfile changed or node_modules missing; refreshing local node_modules from container..." | ||
| rm -rf node_modules | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| docker cp "app:/$APP_NAME/node_modules" . | ||
| fi | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,35 +2,43 @@ const DOMAIN = 'topcoder-dev.com' | |
| const DEV_API_HOSTNAME = `https://api.${DOMAIN}` | ||
|
|
||
| const API_V5 = `${DEV_API_HOSTNAME}/v5` | ||
| const API_V6 = `${DEV_API_HOSTNAME}/v6` | ||
|
|
||
| module.exports = { | ||
| API_V2: `${DEV_API_HOSTNAME}/v2`, | ||
| API_V3: `${DEV_API_HOSTNAME}/v3`, | ||
| API_V4: `${DEV_API_HOSTNAME}/v4`, | ||
| API_V5, | ||
| API_V6, | ||
| ACCOUNTS_APP_CONNECTOR_URL: `https://accounts-auth0.${DOMAIN}`, | ||
| ACCOUNTS_APP_LOGIN_URL: `https://accounts-auth0.${DOMAIN}`, | ||
| COMMUNITY_APP_URL: `https://www.${DOMAIN}`, | ||
| MEMBER_API_URL: `${DEV_API_HOSTNAME}/v5/members`, | ||
| CHALLENGE_API_URL: `${DEV_API_HOSTNAME}/v5/challenges`, | ||
| COMMUNITY_APP_URL: `https://www-v6.${DOMAIN}`, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| MEMBER_API_URL: `${DEV_API_HOSTNAME}/v6/members`, | ||
| CHALLENGE_API_URL: `${DEV_API_HOSTNAME}/v6/challenges`, | ||
| CHALLENGE_DEFAULT_REVIEWERS_URL: `${DEV_API_HOSTNAME}/v6/challenge/default-reviewers`, | ||
| CHALLENGE_API_VERSION: '1.1.0', | ||
| CHALLENGE_TIMELINE_TEMPLATES_URL: `${DEV_API_HOSTNAME}/v5/timeline-templates`, | ||
| CHALLENGE_TYPES_URL: `${DEV_API_HOSTNAME}/v5/challenge-types`, | ||
| CHALLENGE_TRACKS_URL: `${DEV_API_HOSTNAME}/v5/challenge-tracks`, | ||
| CHALLENGE_PHASES_URL: `${DEV_API_HOSTNAME}/v5/challenge-phases`, | ||
| CHALLENGE_TIMELINES_URL: `${DEV_API_HOSTNAME}/v5/challenge-timelines`, | ||
| CHALLENGE_TIMELINE_TEMPLATES_URL: `${DEV_API_HOSTNAME}/v6/timeline-templates`, | ||
| CHALLENGE_TYPES_URL: `${DEV_API_HOSTNAME}/v6/challenge-types`, | ||
| CHALLENGE_TRACKS_URL: `${DEV_API_HOSTNAME}/v6/challenge-tracks`, | ||
| CHALLENGE_PHASES_URL: `${DEV_API_HOSTNAME}/v6/challenge-phases`, | ||
| CHALLENGE_TIMELINES_URL: `${DEV_API_HOSTNAME}/v6/challenge-timelines`, | ||
| COPILOTS_URL: 'https://copilots-v6.topcoder-dev.com/copilots', | ||
| PROJECT_API_URL: `${DEV_API_HOSTNAME}/v5/projects`, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| GROUPS_API_URL: `${DEV_API_HOSTNAME}/v5/groups`, | ||
| GROUPS_API_URL: `${DEV_API_HOSTNAME}/v6/groups`, | ||
| TERMS_API_URL: `${DEV_API_HOSTNAME}/v5/terms`, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| RESOURCES_API_URL: `${DEV_API_HOSTNAME}/v5/resources`, | ||
| RESOURCE_ROLES_API_URL: `${DEV_API_HOSTNAME}/v5/resource-roles`, | ||
| SUBMISSIONS_API_URL: `${DEV_API_HOSTNAME}/v5/submissions`, | ||
| REVIEW_TYPE_API_URL: `${DEV_API_HOSTNAME}/v5/reviewTypes`, | ||
| RESOURCES_API_URL: `${DEV_API_HOSTNAME}/v6/resources`, | ||
| RESOURCE_ROLES_API_URL: `${DEV_API_HOSTNAME}/v6/resource-roles`, | ||
| SUBMISSIONS_API_URL: `${DEV_API_HOSTNAME}/v6/submissions`, | ||
| REVIEW_TYPE_API_URL: `${DEV_API_HOSTNAME}/v6/reviewTypes`, | ||
| REVIEWS_API_URL: `${DEV_API_HOSTNAME}/v6/reviews`, | ||
| SCORECARDS_API_URL: `${DEV_API_HOSTNAME}/v6/scorecards`, | ||
| WORKFLOWS_API_URL: `${DEV_API_HOSTNAME}/v6/workflows`, | ||
| SUBMISSION_REVIEW_APP_URL: `https://submission-review.${DOMAIN}/challenges`, | ||
| STUDIO_URL: `https://studio.${DOMAIN}`, | ||
| CONNECT_APP_URL: `https://connect.${DOMAIN}`, | ||
| DIRECT_PROJECT_URL: `https://www.${DOMAIN}/direct`, | ||
| ONLINE_REVIEW_URL: `https://software.${DOMAIN}`, | ||
| REVIEW_APP_URL: `https://review.${DOMAIN}`, | ||
| DEFAULT_TERM_UUID: '317cd8f9-d66c-4f2a-8774-63c612d99cd4', // Terms & Conditions of Use at TopCoder | ||
| DEFAULT_NDA_UUID: 'e5811a7b-43d1-407a-a064-69e5015b4900', // NDA v3.0 | ||
| SUBMITTER_ROLE_UUID: '732339e7-8e30-49d7-9198-cccf9451e221', | ||
|
|
@@ -49,10 +57,6 @@ module.exports = { | |
| FILE_PICKER_REGION: 'us-east-1', | ||
| FILE_PICKER_CNAME: 'fs.topcoder.com', | ||
| FILE_PICKER_LOCATION: 's3', | ||
| // if idle for this many minutes, show user a prompt saying they'll be logged out | ||
| IDLE_TIMEOUT_MINUTES: 10, | ||
| // duration to show the prompt saying user will be logged out, before actually logging out the user | ||
| IDLE_TIMEOUT_GRACE_MINUTES: 5, | ||
| MULTI_ROUND_CHALLENGE_TEMPLATE_ID: 'd4201ca4-8437-4d63-9957-3f7708184b07', | ||
| UNIVERSAL_NAV_URL: 'https://uni-nav.topcoder-dev.com/v1/tc-universal-nav.js', | ||
| HEADER_AUTH_URLS_HREF: `https://accounts-auth0.${DOMAIN}?utm_source=community-app-main`, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,18 @@ | ||
| module.exports = (() => { | ||
| let env = process.env.NODE_ENV || 'development' | ||
| if (process.env.FORCE_DEV) env = 'development' | ||
| // for security reason don't let to require any arbitrary file defined in process.env | ||
|
|
||
| // Only allow specific files to be required for security reasons | ||
| if (env === 'production') { | ||
| return require('./production') | ||
| } | ||
|
|
||
| // Support explicit local environment (mirrors platform-ui local setup) | ||
| const hostEnv = process.env.HOST_ENV | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| if (env === 'local' || hostEnv === 'local') { | ||
| return require('./local') | ||
| } | ||
|
|
||
| // Default to development | ||
| return require('./development') | ||
| })() | ||
Uh oh!
There was an error while loading. Please reload this page.