-
Notifications
You must be signed in to change notification settings - Fork 21
[PROD RELEASE V6] #1288
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
[PROD RELEASE V6] #1288
Changes from all commits
1b1cda4
134cfc9
97fe588
6988cda
d67cbad
e1d363f
3ba8525
2e0ef09
ccf5b42
435c684
25398d8
bf53be5
016c2a4
88e8fb1
6d61a18
d2308d3
7876dca
0b3922b
14eb524
e996e50
f94713d
6ad92b3
68bfb67
b24ae08
75874b6
790b39e
2d7c28b
59dcc30
8a04d28
172052a
bb61977
152ed65
aa612f8
bc1e341
fddba32
651f0f6
e97c0db
effae6e
aab03b5
c6ebadb
ad798e5
d3054eb
1ce2e63
44c223a
cd550ac
6bf4091
b08f16a
2ac2749
2cfb5f1
53877bb
eb789c1
86e5a98
3dd0f3e
00ff845
55c1d16
a4cfad3
2d36c9a
8e85eba
ebe37a7
28f9462
1bfa7b8
3a17f40
7899b5d
8e2254c
5ef27c5
33bca02
7ef1d05
278892f
149b6d7
52f36cc
fc8e91c
98f93b7
f39eccd
afd10db
cde9241
036c04f
5db7501
05f9757
ddbd5ab
d8cdb2e
0d152b8
f14a9d0
72701bb
a434ecf
0eed814
2408f74
9785cd3
e0a8b00
8c0f17a
2c04c42
d0958e9
fe2b934
58ac9ec
4e1537b
733f20e
3aa7a53
c7fbf65
a14a892
5e3f4b6
f74fca9
2b777f7
3db9e9d
34740f8
aeb2ec0
e74549c
edbce6f
4ea10b4
43ed942
cdf93cf
45baff9
1d2e188
524ca46
0c03c18
a2786c7
860bd1e
59e0415
54f1de0
1f5df32
105a947
2d0726e
6f043bb
8131b3f
3dd9bb8
db41d8a
773cadf
9944d26
0c4cf29
1eb5cae
14fbe40
5d94f8f
eed2f5f
ab3b2d1
d6aa47a
a65ef7d
bd7477f
1364dbd
8aeeb13
383480e
18a4042
5f68c79
9b1890c
399862d
c9ea539
7a93c34
8c944bf
d55d4af
d2891bf
6cf5fa7
0c55447
b00e66e
7378d26
f113220
a831af1
b4736a9
7c8c791
8e96cb8
baa7ac4
d6ad95d
8e44e46
e669fb3
1d52f66
1513897
c29aa96
52bebec
bdaff02
7575141
0b83fb8
89e6003
035989e
9758798
a8a6d32
e0e3051
0e8502d
4cdc040
49c1347
b0b97d5
bab9630
9346445
9cf3196
0701221
5a9ff51
bbdd191
69a7641
57d4568
c216c81
372df44
ae47522
f3c9d00
71c080e
3f50487
3c2085c
b979710
976c4f3
ee9d824
1d7e43e
9194eed
595c11c
fa41894
5b6928f
fe27eb2
37b1181
da5d4f6
1450018
88ff920
7a8f7dc
2386d72
27ec4b4
67a2a6a
137a580
9955d88
b45a19f
9f80f06
c90f16f
f28f45b
78fb03d
a2c3252
3e38b26
0d1ef7c
f232dfd
5c69dd9
f904736
c0041f7
bed5fdd
a67129b
3a8bb21
cbc0120
52d750f
52c1685
40b2018
2e7c888
2d9458d
8e53f50
b33e1d5
dbd3a51
11321b8
8d1f45f
95c7aee
acfc2b4
fa1273d
ca933dc
0e87246
f3c3fa8
5295494
27418e1
2410959
d933676
147b220
45f9452
534bfd9
7b8dfb2
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 |
|---|---|---|
|
|
@@ -26,10 +26,11 @@ install_dependency: &install_dependency | |
| install_deploysuite: &install_deploysuite | ||
| name: Installation of install_deploysuite. | ||
| command: | | ||
| git clone --branch v1.4.13 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 . | ||
|
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. [💡 |
||
|
|
||
| restore_cache_settings_for_build: &restore_cache_settings_for_build | ||
| key: connect-node-modules-{{ checksum "yarn.lock" }} | ||
|
|
@@ -48,14 +49,16 @@ running_yarn_eslint: &running_yarn_eslint | |
| running_yarn_build: &running_yarn_build | ||
| name: Running Yarn Build | ||
| command: | | ||
| source buildenvvar | ||
| # source buildenvvar | ||
| source buildvar_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. [❗❗ |
||
| yarn install | ||
| yarn build | ||
|
|
||
| running_yarn_sb_build: &running_yarn_sb_build | ||
| name: Running Yarn Storybook Build | ||
| command: | | ||
| source buildenvvar | ||
| # source buildenvvar | ||
| source buildvar_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. [❗❗ |
||
| yarn sb:build | ||
|
|
||
| workspace_persist: &workspace_persist | ||
|
|
@@ -70,7 +73,9 @@ build_configuration_fetch: &build_configuration_fetch | |
| 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 | ||
|
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. [❗❗ |
||
| source buildvar_env | ||
| aws s3 cp s3://tc-platform-${LOGICAL_ENV}/securitymanager/${LOGICAL_ENV}-platform-ui.env ./.environments/.env.${LOGICAL_ENV}.local | ||
|
|
||
| lint_steps: &lint_steps # Initialization. | ||
|
|
@@ -98,8 +103,10 @@ deploy_steps: &deploy_steps | |
| command: | | ||
| ./awsconfiguration.sh $DEPLOY_ENV | ||
| source awsenvconf | ||
| ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-deployvar | ||
| source buildenvvar | ||
| # ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-deployvar | ||
| # source buildenvvar | ||
| ./psvar-processor.sh -t appenv -p /config/${APPNAME}/deployvar | ||
| source deployvar_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. [❗❗ |
||
| ./master_deploy.sh -d CFRONT -e $DEPLOY_ENV -c $ENABLE_CACHE | ||
|
|
||
| jobs: | ||
|
|
@@ -221,9 +228,10 @@ workflows: | |
| - dev | ||
| - LVT-256 | ||
| - CORE-635 | ||
| - feat/review | ||
| - feat/system-admin | ||
| - pm-1365_1 | ||
| - PM-959_tc-finance-integration | ||
| - feat/v6 | ||
| - pm-2074_1 | ||
|
|
||
| - deployQa: | ||
| context: org-global | ||
|
|
@@ -242,4 +250,4 @@ workflows: | |
| filters: &filters-prod | ||
| branches: | ||
| only: | ||
| - master | ||
| - master | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| name: Trivy Scanner | ||
|
|
||
| permissions: | ||
| contents: read | ||
| security-events: write | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - dev | ||
| pull_request: | ||
| jobs: | ||
| trivy-scan: | ||
| name: Use Trivy | ||
| runs-on: ubuntu-24.04 | ||
|
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. [ |
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Run Trivy scanner in repo mode | ||
| uses: aquasecurity/trivy-action@0.33.1 | ||
| with: | ||
| scan-type: "fs" | ||
| ignore-unfixed: true | ||
| format: "sarif" | ||
| output: "trivy-results.sarif" | ||
| severity: "CRITICAL,HIGH,UNKNOWN" | ||
|
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. [ |
||
| scanners: vuln,secret,misconfig,license | ||
| github-pat: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Upload Trivy scan results to GitHub Security tab | ||
| uses: github/codeql-action/upload-sarif@v3 | ||
| with: | ||
| sarif_file: "trivy-results.sarif" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ | |
| node_modules | ||
| /.pnp | ||
| .pnp.js | ||
| .yarn | ||
|
|
||
| # testing | ||
| /coverage | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| * @jmgasper @kkartunov |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,8 @@ | ||
| const path = require('path'); | ||
|
|
||
| const tsconfigPath = path.resolve(__dirname, '../tsconfig.json'); | ||
|
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. [❗❗ |
||
| const tsconfigRoot = path.resolve(__dirname, '..'); | ||
|
|
||
| module.exports = { | ||
| root: true, | ||
| overrides: [ | ||
|
|
@@ -25,8 +30,8 @@ module.exports = { | |
| parser: '@typescript-eslint/parser', | ||
| parserOptions: { | ||
| useJSXTextNode: true, | ||
| project: './tsconfig.json', | ||
| tsconfigRootDir: '.', | ||
| project: tsconfigPath, | ||
| tsconfigRootDir: tsconfigRoot, | ||
| tsx: true, | ||
| jsx: true, | ||
| sourceType: 'module', | ||
|
|
@@ -40,7 +45,19 @@ module.exports = { | |
| ], | ||
| settings: { | ||
| 'import/resolver': { | ||
| typescript: {}, | ||
| typescript: { | ||
| project: tsconfigPath, | ||
|
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. [❗❗ |
||
| }, | ||
| node: { | ||
| extensions: [ | ||
| '.js', | ||
| '.jsx', | ||
| '.ts', | ||
| '.tsx', | ||
| '.d.ts', | ||
| '.json', | ||
| ], | ||
| }, | ||
| }, | ||
| }, | ||
| rules: { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| import { EnvironmentConfig } from '~/config' | ||
| // (removed) CES Survey/Userflow integrations | ||
|
|
||
| export const CES_SURVEY_ID = EnvironmentConfig.USERFLOW_SURVEYS.ACCOUNT_SETTINGS | ||
| // Mark this file as a module for TS isolatedModules | ||
| export {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| export * from './accounts-swr' | ||
| export * from './components' | ||
| export * from './assets' | ||
| export * from './userflow-survey' |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,6 @@ import { | |
| useCountryLookup, | ||
| UserProfile, | ||
| } from '~/libs/core' | ||
| import { triggerSurvey } from '~/apps/accounts/src/lib' | ||
|
|
||
|
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. [ |
||
| import styles from './MemberAddress.module.scss' | ||
|
|
||
|
|
@@ -88,7 +87,6 @@ const MemberAddress: FC<MemberAddressProps> = (props: MemberAddressProps) => { | |
| .then(() => { | ||
| toast.success('Your account has been updated.', { position: toast.POSITION.BOTTOM_RIGHT }) | ||
| setFormErrors({}) | ||
| triggerSurvey() | ||
| }) | ||
| .catch(() => { | ||
|
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. [ |
||
| toast.error('Something went wrong. Please try again.', { position: toast.POSITION.BOTTOM_RIGHT }) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,9 +15,10 @@ import { | |
| useMemberTraits, | ||
| UserProfile, | ||
| UserTrait, | ||
| UserTraitIds, | ||
| UserTraits, | ||
| } from '~/libs/core' | ||
| import { SettingSection, triggerSurvey } from '~/apps/accounts/src/lib' | ||
| import { SettingSection } from '~/apps/accounts/src/lib' | ||
|
|
||
| import { UserAndPassFromConfig } from './user-and-pass.form.config' | ||
| import styles from './UserAndPassword.module.scss' | ||
|
|
@@ -76,13 +77,13 @@ const UserAndPassword: FC<UserAndPasswordProps> = (props: UserAndPasswordProps) | |
| data: [{ | ||
| userConsent: !userConsent, | ||
| }], | ||
| traitId: UserTraitIds.personalization, | ||
|
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. [❗❗ |
||
| }, | ||
| }]) | ||
| .then(() => { | ||
| setUserConsent(!userConsent) | ||
| mutateTraits() | ||
| toast.success('User consent updated successfully.') | ||
| triggerSurvey() | ||
| }) | ||
| .catch(() => { | ||
| toast.error('Failed to update user consent.') | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,6 @@ import { toast } from 'react-toastify' | |
|
|
||
| import { updateOrCreateMemberTraitsAsync, useMemberTraits, UserProfile, UserTraits } from '~/libs/core' | ||
| import { Button, Collapsible, FormToggleSwitch } from '~/libs/ui' | ||
| import { triggerSurvey } from '~/apps/accounts/src/lib' | ||
|
|
||
| import { communitiesConfig } from './communities-config' | ||
| import styles from './Communities.module.scss' | ||
|
|
@@ -49,7 +48,6 @@ const Communities: FC<CommunitiesProps> = (props: CommunitiesProps) => { | |
| setMemberCommunities(updatedCommunities) | ||
| mutateTraits() | ||
| toast.success('Communities updated successfully.') | ||
| triggerSurvey() | ||
| }) | ||
| .catch(() => { | ||
|
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. [❗❗ |
||
| toast.error('Failed to update user Communities.') | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,6 @@ import { | |
| DesignTrackIcon, | ||
| DevelopmentTrackIcon, | ||
| SettingSection, | ||
| triggerSurvey, | ||
| } from '~/apps/accounts/src/lib' | ||
|
|
||
| import styles from './Tracks.module.scss' | ||
|
|
@@ -21,6 +20,7 @@ interface TracksProps { | |
| const Tracks: FC<TracksProps> = (props: TracksProps) => { | ||
| const [memberTracks, setMemberTracks]: [TC_TRACKS[], Dispatch<TC_TRACKS[]>] | ||
| = useState<TC_TRACKS[]>(props.profile.tracks || []) | ||
| const [isUpdating, setIsUpdating] = useState<boolean>(false) | ||
|
|
||
| const memberProfileContext: ProfileContextData = useContext(profileContext) | ||
|
|
||
|
|
@@ -29,6 +29,11 @@ const Tracks: FC<TracksProps> = (props: TracksProps) => { | |
| }, [props.profile]) | ||
|
|
||
| function handleTracksChange(type: TC_TRACKS): void { | ||
| if (isUpdating) { | ||
|
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. [❗❗ |
||
| return | ||
| } | ||
|
|
||
| setIsUpdating(true) | ||
| const hasTrack: boolean = memberTracks.includes(type) | ||
| let updatedTracks: TC_TRACKS[] | ||
|
|
||
|
|
@@ -54,11 +59,13 @@ const Tracks: FC<TracksProps> = (props: TracksProps) => { | |
| } as any, | ||
| }) | ||
| toast.success('Your profile has been updated.') | ||
| triggerSurvey() | ||
| }) | ||
| .catch(() => { | ||
| toast.error('Failed to update your profile.') | ||
| }) | ||
| .finally(() => { | ||
| setIsUpdating(false) | ||
| }) | ||
| } | ||
|
|
||
| return ( | ||
|
|
@@ -83,6 +90,7 @@ const Tracks: FC<TracksProps> = (props: TracksProps) => { | |
| name='designTrack' | ||
| onChange={bind(handleTracksChange, this, 'DESIGN')} | ||
| value={!!memberTracks.includes('DESIGN')} | ||
| disabled={isUpdating} | ||
|
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. [💡 |
||
| /> | ||
| )} | ||
| /> | ||
|
|
@@ -98,6 +106,7 @@ const Tracks: FC<TracksProps> = (props: TracksProps) => { | |
| name='devTrack' | ||
| onChange={bind(handleTracksChange, this, 'DEVELOP')} | ||
| value={!!memberTracks.includes('DEVELOP')} | ||
| disabled={isUpdating} | ||
| /> | ||
| )} | ||
| /> | ||
|
|
@@ -113,6 +122,7 @@ const Tracks: FC<TracksProps> = (props: TracksProps) => { | |
| name='dsTrack' | ||
| onChange={bind(handleTracksChange, this, 'DATA_SCIENCE')} | ||
| value={!!memberTracks.includes('DATA_SCIENCE')} | ||
| disabled={isUpdating} | ||
| /> | ||
| )} | ||
| /> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[⚠️
correctness]The branch version for
tc-deploy-scriptshas been updated fromv1.4.13tov1.4.17. Ensure that the changes in the new branch version are compatible with the current setup and do not introduce breaking changes.