Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
293 commits
Select commit Hold shift + click to select a range
f29b507
renaming
YaroslavRosnovskyi Feb 1, 2025
8561daf
updated update-iteration to action to run everyday
YaroslavRosnovskyi Feb 2, 2025
79111c6
Merge branch 'release/1.2.0' into feature/issue-960
YaroslavRosnovskyi Feb 2, 2025
f9e1be7
Add TrustServerCertificate option to DbUpdate connection string
Feb 2, 2025
13d68d8
removed primary constructor in TimelineClient.cs
lisaaksionova Feb 3, 2025
123ef49
removed primary constructor TickerStringClient.cs
lisaaksionova Feb 3, 2025
b521e7b
uncomment hangfire jobs
sashapanasiuk5 Feb 3, 2025
24c93bf
add missing script
sashapanasiuk5 Feb 3, 2025
59fa60d
changed TeamMemberExtracter to correspond new logic
lisaaksionova Feb 3, 2025
b2a0bb5
Merge branch 'feature/issue-956' of https://github.com/ita-social-pro…
lisaaksionova Feb 3, 2025
1bbb229
Merge branch 'release/1.2.0' into feature/issue-956
lisaaksionova Feb 3, 2025
f230844
fixed timeline item extraction
lisaaksionova Feb 3, 2025
baee2b2
Merge branch 'feature/issue-956' of https://github.com/ita-social-pro…
lisaaksionova Feb 3, 2025
1073e99
include entire ScriptsMigration folder
sashapanasiuk5 Feb 3, 2025
e1b924f
fix sql scipt
sashapanasiuk5 Feb 3, 2025
e4e474c
deleted unnecessary TransactLink DTO
lisaaksionova Feb 3, 2025
52fc481
fix appsettings
sashapanasiuk5 Feb 3, 2025
ed5503b
resolved merge conflicts
lisaaksionova Feb 3, 2025
b5b89c1
changed favourites repository file location
lisaaksionova Feb 3, 2025
defcc5c
remove old appsetting and add new for integration tests
sashapanasiuk5 Feb 3, 2025
dc37ae8
Merge branch 'release/1.2.0' into feature/issue-960
YaroslavRosnovskyi Feb 3, 2025
ffe168a
change connection string for tests
sashapanasiuk5 Feb 4, 2025
888729a
fixed logs truncation, removed useless logs
YaroslavRosnovskyi Feb 5, 2025
f998009
added email configuration for integration tests
YaroslavRosnovskyi Feb 5, 2025
e2529bb
sonar fixes
YaroslavRosnovskyi Feb 5, 2025
30f44ea
feat: added new error messages to resource files
YuliiaAndreieva Feb 6, 2025
6e7b95b
fix: updated CreateStreetcodeHandler.cs with check on null
YuliiaAndreieva Feb 6, 2025
2e27511
fix: added checking for valid pagination params and filters in GetAll…
YuliiaAndreieva Feb 6, 2025
bf51713
fix: changed integration tests bc of changes in the handler
YuliiaAndreieva Feb 6, 2025
3cd100e
fix: initialized collections to avoid null references in streetcode c…
YuliiaAndreieva Feb 6, 2025
bae06e3
fix: small fix with string.Empty
YuliiaAndreieva Feb 6, 2025
1fdaff8
feat: added unit tests for creating streetcode
YuliiaAndreieva Feb 6, 2025
617658d
feat: added unit tests for updating streetcode
YuliiaAndreieva Feb 6, 2025
740dbd1
feat: added unit tests for GetAllStreetcodesHandler
YuliiaAndreieva Feb 6, 2025
be900e3
feat: added unit tests for UpdateStatusStreetcodeByIdHandler
YuliiaAndreieva Feb 6, 2025
2c8f3b0
feat: refactored tests for DeleteStreetcodeHandler
YuliiaAndreieva Feb 6, 2025
d477c89
feat: added tests for DeleteSoftStreetcodeHandler
YuliiaAndreieva Feb 6, 2025
bfc6518
feat: added tests for GetAllStreetcodesCatalogHandler.cs
YuliiaAndreieva Feb 6, 2025
3912dce
feat: added tests for GetAllStreetcodesMainPageHandler.cs
YuliiaAndreieva Feb 6, 2025
e381145
feat: added tests for GetAllPublishedHandler.cs
YuliiaAndreieva Feb 6, 2025
3a138cc
fix: refactored GetAllPublishedHandlerTests.cs
YuliiaAndreieva Feb 6, 2025
279c329
feat: added tests for GetAllStreetcodesShortHandler
YuliiaAndreieva Feb 6, 2025
9ad1745
fix: updated old tests with new style
YuliiaAndreieva Feb 6, 2025
fd6f89e
feat: added tests for GetStreetcodesCountHandler.cs
YuliiaAndreieva Feb 6, 2025
2be2b80
feat: added tests for GetPageOfStreetcodesMainPageHandler.cs
YuliiaAndreieva Feb 6, 2025
43e0036
feat: added tests for GetStreetcodeShortByIdHandler
YuliiaAndreieva Feb 6, 2025
516873e
feat: added tests for GetStreetcodeUrlByQrIdHandler
YuliiaAndreieva Feb 6, 2025
4393e46
feat: added tests for StreetcodeWithUrlExustHandler
YuliiaAndreieva Feb 6, 2025
6813226
new test cases
YaroslavRosnovskyi Feb 6, 2025
2f4d4a4
fix: changed props name in streetcode create/update dtos
YuliiaAndreieva Feb 9, 2025
ee8d74b
fix: small method fix in base localizer
YuliiaAndreieva Feb 9, 2025
ec57dc4
feat: added new localizer mocks
YuliiaAndreieva Feb 9, 2025
a6d3fed
fix: updated files with new prop name
YuliiaAndreieva Feb 9, 2025
e79f425
fix: added checking for null and count in CreateStreetcodeHandler.cs …
YuliiaAndreieva Feb 9, 2025
c6f3140
fix: refactored tests according to warnings
YuliiaAndreieva Feb 9, 2025
af0dcca
fix: changed handlers and tests to new code style
YuliiaAndreieva Feb 9, 2025
c682854
fix: removed this. from streetcode validator tests
YuliiaAndreieva Feb 9, 2025
a237f50
fix: fixed sonar warnings in streetcode validator tests
YuliiaAndreieva Feb 9, 2025
0786c11
fix: fixed troubles with namespace and deleted unnecessary dependenci…
YuliiaAndreieva Feb 9, 2025
f259e72
feat: added tests for related figure handler
YuliiaAndreieva Feb 9, 2025
407854e
fix: changed methods to static
YuliiaAndreieva Feb 9, 2025
43cd55b
fix: fixed new sonar warnings
YuliiaAndreieva Feb 9, 2025
784a437
fixed exsiting tests, added new ones
YaroslavRosnovskyi Feb 10, 2025
edd0ee0
added google login test
YaroslavRosnovskyi Feb 10, 2025
d78ba4e
regenerated sql scripts
YaroslavRosnovskyi Feb 11, 2025
40dadd3
changed jenkins configuration
YaroslavRosnovskyi Feb 11, 2025
6c91088
removed paralel execution
YaroslavRosnovskyi Feb 11, 2025
fadf4c9
add validation for the day of publishing the news
vlad-zhadan Feb 11, 2025
43c81ae
Made enhancements in old code
Michael-Kolpakov Feb 12, 2025
4d884ce
Setuped localizer and mapper mocks
Michael-Kolpakov Feb 12, 2025
da6997e
Implemented unit tests for Fact handlers
Michael-Kolpakov Feb 12, 2025
2620e1b
Implemented unit tests for Related Term handlers
Michael-Kolpakov Feb 12, 2025
a7a5dc5
Implemented unit tests for Term handlers
Michael-Kolpakov Feb 12, 2025
f761df0
Implemented unit tests for Text handlers
Michael-Kolpakov Feb 12, 2025
e01fb0f
Implemented integration tests for Fact endpoints
Michael-Kolpakov Feb 12, 2025
421de08
Implemented integration tests for Related Terms endpoints
Michael-Kolpakov Feb 12, 2025
21f91ae
Implemented integration tests for Term endpoints
Michael-Kolpakov Feb 12, 2025
6d3c033
Implemented integration tests for Text endpoints
Michael-Kolpakov Feb 12, 2025
22872b2
changed favourites data structure
lisaaksionova Feb 12, 2025
423d1e4
changed favourites repository
lisaaksionova Feb 12, 2025
1ae98a8
added favourites migration
lisaaksionova Feb 12, 2025
7f47d22
renamed Dto class
lisaaksionova Feb 12, 2025
5d657ef
added localized error messages to handlers
lisaaksionova Feb 12, 2025
1d53d1f
added validation & new endpoint to streetcode controller
lisaaksionova Feb 12, 2025
11fbc3b
changed & added new unit tests
lisaaksionova Feb 12, 2025
6b5ed4c
generated favourites sql script
lisaaksionova Feb 12, 2025
59f747e
Merge branch 'release/1.2.0' into feature/issue-2076
YuliiaAndreieva Feb 14, 2025
a36001c
fix: small fix in handler
YuliiaAndreieva Feb 14, 2025
1433c5b
fixed payload for refresh token
YaroslavRosnovskyi Feb 15, 2025
ef301f6
fixed tests
YaroslavRosnovskyi Feb 15, 2025
a9c5628
Changed "Вакансія" to "Позиція" in shared resources.
IlliaBonkovskyi Feb 15, 2025
14b3333
fix: fixed integration tests according to new logic with streetcode e…
YuliiaAndreieva Feb 15, 2025
b135879
added empty position list test to ticker string
lisaaksionova Feb 16, 2025
77a0ee2
added empty toponym list test
lisaaksionova Feb 16, 2025
48cd32c
fix: deleted nullability in GetRelatedFiguresByStreetcodeIdHandler.cs
YuliiaAndreieva Feb 16, 2025
50e050c
fix: deleted warnings and updated tests for relatedFigure
YuliiaAndreieva Feb 16, 2025
b27d8bc
fix: updated streetcode handlers with file-scoped namespaces and reco…
YuliiaAndreieva Feb 16, 2025
b3e50a9
fix: added to all tests Assert.Multiple
YuliiaAndreieva Feb 16, 2025
ddc5320
deleted tests which duplicated existing unit tests
lisaaksionova Feb 16, 2025
d194344
fix: small fix for test in mapping
YuliiaAndreieva Feb 16, 2025
914e816
changed incorrect endpoint url
lisaaksionova Feb 16, 2025
15d094a
fixed DistinctBy operation.
lisaaksionova Feb 16, 2025
d93fb23
Merge branch 'release/1.2.0' into feature/issue-2109
YuliiaAndreieva Feb 16, 2025
d829265
Merge pull request #2115 from ita-social-projects/feature/issue-2094
YuliiaAndreieva Feb 16, 2025
f169ad0
fixed tests
YaroslavRosnovskyi Feb 16, 2025
1a724cb
fix: changed tests to common code style with file-scoped namespace an…
YuliiaAndreieva Feb 16, 2025
6c371ed
Setuped localizer and mapper mocks
Michael-Kolpakov Feb 12, 2025
17eb7c2
added unit test for historical context update failure
lisaaksionova Feb 16, 2025
35aaedb
removed extraction logic of dependent entities
lisaaksionova Feb 16, 2025
ca29df4
added missed arrange/act/assert comments
lisaaksionova Feb 16, 2025
90924f2
deleted unnecessary allow multiple attribute
lisaaksionova Feb 16, 2025
4a4401a
made _teamMember and _image private fields as private autoproperties
lisaaksionova Feb 17, 2025
8fa66a1
fixed SA1513 and SA1516 warnings
lisaaksionova Feb 17, 2025
9a2c0f6
made 1 tab less for constructor.
lisaaksionova Feb 17, 2025
3a52470
removed unnecessary data type specification
lisaaksionova Feb 17, 2025
698511d
deleted unnecessary using
lisaaksionova Feb 17, 2025
a1d26ed
added missing dispose function
lisaaksionova Feb 17, 2025
2c840c6
removed this prefix
lisaaksionova Feb 17, 2025
85517ef
Setuped localizer and mapper mocks
Michael-Kolpakov Feb 12, 2025
d17d800
Merge branch 'release/1.2.0' into feature/issue-960
YaroslavRosnovskyi Feb 17, 2025
1802cd1
fixed dotnet coverage version
YaroslavRosnovskyi Feb 17, 2025
5e5efb7
Merge branch 'feature/issue-960' of https://github.com/ita-social-pro…
YaroslavRosnovskyi Feb 17, 2025
5475c6e
Merge branch 'release/1.2.0' into feature/issue-2109
YuliiaAndreieva Feb 17, 2025
41df5f2
fixed readability issues
YaroslavRosnovskyi Feb 17, 2025
1cf9440
fixed readablity issues
YaroslavRosnovskyi Feb 17, 2025
1bccf02
fixed library version update
YaroslavRosnovskyi Feb 17, 2025
3dde710
Merge branch 'release/1.2.0' into feature/issue-2197
YaroslavRosnovskyi Feb 17, 2025
ae16a83
Merge pull request #2298 from ita-social-projects/feature/issue-2197
YaroslavRosnovskyi Feb 17, 2025
8b61a81
Merge branch 'release/1.2.0' into feature/issue-2107
YuliiaAndreieva Feb 17, 2025
245f3cf
Merge pull request #2120 from ita-social-projects/feature/issue-2107
YuliiaAndreieva Feb 17, 2025
7861e87
changed name, surname and username max chars, changed uppercase restr…
YaroslavRosnovskyi Feb 17, 2025
cf231ae
Solved problem with absent (null) image fields in request response
Michael-Kolpakov Feb 18, 2025
51489a0
Fixed problems in unit test test-cases
Michael-Kolpakov Feb 18, 2025
0e8962e
Merge branch 'release/1.2.0' into feature/issue-2109
YuliiaAndreieva Feb 18, 2025
347c148
Merge pull request #2110 from ita-social-projects/feature/issue-2109
YuliiaAndreieva Feb 18, 2025
39ed291
Update expression condition
Feb 18, 2025
8271d36
changed version for dotnet-coverage
YaroslavRosnovskyi Feb 19, 2025
99f65b3
Merge branch 'feature/issue-1681' of https://github.com/ita-social-pr…
YaroslavRosnovskyi Feb 19, 2025
74c192a
Merge branch 'release/1.2.0' into Feature/issue-2017
ilko-dev Feb 19, 2025
023b8f9
Implemented loading of tags to Streetcode in GetAll endpoint
IlliaBonkovskyi Feb 20, 2025
9d0f556
changed regex for email
YaroslavRosnovskyi Feb 20, 2025
0d0078d
fixed tests
YaroslavRosnovskyi Feb 20, 2025
3b8b27c
Merge branch 'release/1.2.0' into feature/issue-2327
YaroslavRosnovskyi Feb 20, 2025
1799ead
fix: fixed code styles
YuliiaAndreieva Feb 20, 2025
dfcc9c9
Merge branch 'release/1.2.0' into feature/issue-2076
YaroslavRosnovskyi Feb 20, 2025
7a88519
changed according to pr comments
lisaaksionova Feb 21, 2025
79b60eb
Merge branch 'release/1.2.0' into feature/issue-1937
lisaaksionova Feb 21, 2025
a629af7
Merge branch 'release/1.2.0' into feature/issue-956
lisaaksionova Feb 21, 2025
557ba7d
Merge pull request #2195 from ita-social-projects/feature/issue-2076
YuliiaAndreieva Feb 21, 2025
357f80e
Merge branch 'release/1.2.0' into feature/issue-956
YuliiaAndreieva Feb 21, 2025
e58e0a1
Merge branch 'release/1.2.0' into feature/issue-1930
YuliiaAndreieva Feb 21, 2025
035b158
Merge branch 'release/1.2.0' into Feature/issue-2017
YuliiaAndreieva Feb 21, 2025
4c2d87d
removed parallel test execution
YaroslavRosnovskyi Feb 22, 2025
f2ebe5e
Merge branch 'feature/issue-956' of https://github.com/ita-social-pro…
YaroslavRosnovskyi Feb 22, 2025
4f13d2d
temporarily removed dispose due to memory leak
YaroslavRosnovskyi Feb 22, 2025
6863240
temporarily removed
YaroslavRosnovskyi Feb 22, 2025
69dfb0f
password validation for update password
YaroslavRosnovskyi Feb 23, 2025
45cfdc2
Merge branch 'feature/issue-2327' of https://github.com/ita-social-pr…
YaroslavRosnovskyi Feb 23, 2025
fae0cb3
returning empty enumerable of update partners to prevent errors
lisaaksionova Feb 24, 2025
a138af7
changed Toponym to var
lisaaksionova Feb 24, 2025
4bf4341
removed unnecessary using
lisaaksionova Feb 24, 2025
37da8ce
changed function name in test
lisaaksionova Feb 24, 2025
135d482
deleted unnecessary using in GetAllHistoricalContextTest.cs
lisaaksionova Feb 24, 2025
16e3a42
fixed spacing
lisaaksionova Feb 24, 2025
89ec4ab
fixed spacing & removed unnecessary code
lisaaksionova Feb 24, 2025
e928953
removed unnecessary usings
lisaaksionova Feb 24, 2025
d587019
refactored code style in getAllTransactLinksHandlerTests
lisaaksionova Feb 24, 2025
946d82a
fixing commit history
lisaaksionova Feb 24, 2025
c9ef3ce
readability improvements
YaroslavRosnovskyi Feb 26, 2025
674d012
resolved conflicts
YaroslavRosnovskyi Feb 26, 2025
78a6478
update user extracter
YaroslavRosnovskyi Feb 26, 2025
27811fe
improved memory allocation
YaroslavRosnovskyi Feb 26, 2025
fe2d476
Revert "temporarily removed dispose due to memory leak"
YaroslavRosnovskyi Feb 26, 2025
74ec01c
Revert "temporarily removed"
YaroslavRosnovskyi Feb 26, 2025
21f4d97
removed dispose
YaroslavRosnovskyi Feb 26, 2025
ea4cf59
fixed streetcode tests
YaroslavRosnovskyi Feb 26, 2025
d9fc7f7
removed dispose
YaroslavRosnovskyi Feb 26, 2025
e7bb158
Revert "removed parallel test execution"
YaroslavRosnovskyi Feb 26, 2025
5bc9f06
revert jenkinsfile
YaroslavRosnovskyi Feb 26, 2025
fbdfcb1
updated jenkins config
YaroslavRosnovskyi Feb 26, 2025
8a16a0d
Revert "updated jenkins config"
YaroslavRosnovskyi Feb 26, 2025
5ce404d
changed config
YaroslavRosnovskyi Feb 26, 2025
0a720d6
fixed config
YaroslavRosnovskyi Feb 26, 2025
dd3f8cc
added no build
YaroslavRosnovskyi Feb 26, 2025
0b646dc
Solved merge conflicts
Michael-Kolpakov Mar 1, 2025
e1b44e7
Completed proposed code adjustments
Michael-Kolpakov Mar 1, 2025
3cee21d
Merge branch 'release/1.2.0' into feature/issue-2252
Michael-Kolpakov Mar 1, 2025
90b855f
commented out webparsing utils
YaroslavRosnovskyi Mar 3, 2025
efaed16
changed build scripts
YaroslavRosnovskyi Mar 3, 2025
2466ac7
fixed tests
YaroslavRosnovskyi Mar 3, 2025
a7652a8
fixed mapping
YaroslavRosnovskyi Mar 3, 2025
76d1b18
fixed related figures mapping
YaroslavRosnovskyi Mar 3, 2025
ba6fe06
changed scripts
YaroslavRosnovskyi Mar 3, 2025
436ea56
changed nuke scripts
YaroslavRosnovskyi Mar 3, 2025
0cdcbe3
updated scripts
YaroslavRosnovskyi Mar 3, 2025
1d8aa71
fixed scripts
YaroslavRosnovskyi Mar 3, 2025
839b57a
fixed encryption, improved memory allocation
YaroslavRosnovskyi Mar 3, 2025
d69226f
add message to shared resources
vlad-zhadan Mar 4, 2025
6c4dd82
Merge branch 'release/1.2.0' into feature/issue-1930
vlad-zhadan Mar 4, 2025
dd7d8de
fix test for validation
vlad-zhadan Mar 4, 2025
b599b93
Merge pull request #2104 from ita-social-projects/feature/issue-956
Michael-Kolpakov Mar 4, 2025
0041f1a
Merge branch 'release/1.2.0' into feature/issue-1930
Michael-Kolpakov Mar 4, 2025
da32909
Merge branch 'release/1.2.0' into feature/issue-960
YaroslavRosnovskyi Mar 4, 2025
6e7b91a
fixed merge conflicts
YaroslavRosnovskyi Mar 4, 2025
1fa7891
Merge pull request #2106 from ita-social-projects/feature/issue-960
Michael-Kolpakov Mar 4, 2025
f755e52
Merge branch 'release/1.2.0' into feature/issue-2302
Michael-Kolpakov Mar 4, 2025
94afbc9
Merge branch 'release/1.2.0' into feature/issue-2252
Michael-Kolpakov Mar 4, 2025
b5d890f
Merge pull request #2335 from ita-social-projects/feature/issue-2252
Michael-Kolpakov Mar 4, 2025
3db98bb
Merge branch 'release/1.2.0' into Feature/issue-2017
Michael-Kolpakov Mar 4, 2025
4662777
revoke functionality separate enpoints for getting all and published new
vlad-zhadan Mar 4, 2025
f9ca838
Merge branch 'feature/issue-1930' into feature/issue-1930
vlad-zhadan Mar 4, 2025
260dfb3
Merge pull request #2357 from ita-social-projects/Feature/issue-2017
Michael-Kolpakov Mar 4, 2025
030cff5
Merge branch 'release/1.2.0' into feature/issue-1810
Michael-Kolpakov Mar 4, 2025
543086b
Merge pull request #2396 from ita-social-projects/feature/issue-1810
Michael-Kolpakov Mar 4, 2025
1ea3064
Merge branch 'release/1.2.0' into feature/issue-2419
Michael-Kolpakov Mar 4, 2025
1e37228
Merge pull request #2484 from ita-social-projects/feature/issue-2419
Michael-Kolpakov Mar 4, 2025
c9dba8f
Merge pull request #2102 from ita-social-projects/feature/issue-1681
Michael-Kolpakov Mar 4, 2025
843ed10
Resolved merge conflicts
Michael-Kolpakov Mar 5, 2025
42cea08
Some namespaces adjustments
Michael-Kolpakov Mar 5, 2025
b5fe7b8
Merge pull request #2276 from ita-social-projects/feature/issue-2077
Michael-Kolpakov Mar 5, 2025
6bf133c
Remove unnecessary Images/GetAll endpoint
Michael-Kolpakov Mar 5, 2025
e809e83
Merge branch 'release/1.2.0' into feature/issue-1937
YuliiaAndreieva Mar 5, 2025
f8f15b9
fix: fixed code style
YuliiaAndreieva Mar 5, 2025
627990f
merged 1.2.0
YaroslavRosnovskyi Mar 5, 2025
1036150
Merge pull request #2364 from ita-social-projects/feature/issue-2327
YaroslavRosnovskyi Mar 5, 2025
c401ab8
Merge branch 'release/1.2.0' into feature/issue-2302
YaroslavRosnovskyi Mar 5, 2025
f42f9ac
Merge pull request #2328 from ita-social-projects/feature/issue-2302
YaroslavRosnovskyi Mar 5, 2025
6a89209
Merge branch 'release/1.2.0' into feature/issue-2299
YaroslavRosnovskyi Mar 5, 2025
b40fbdb
removed test for removed endpoint
YaroslavRosnovskyi Mar 5, 2025
63c4600
Merge branch 'feature/issue-2299' of https://github.com/ita-social-pr…
YaroslavRosnovskyi Mar 5, 2025
b742697
Merge branch 'release/1.2.0' into Feature/issue-2301
YuliiaAndreieva Mar 5, 2025
ff2ea47
Merge pull request #2363 from ita-social-projects/Feature/issue-2301
YuliiaAndreieva Mar 5, 2025
719f855
Merge branch 'release/1.2.0' into feature/issue-1937
YuliiaAndreieva Mar 5, 2025
b167ad6
Merge pull request #2287 from ita-social-projects/feature/issue-1937
YuliiaAndreieva Mar 5, 2025
7fe3ed4
Merge branch 'release/1.2.0' into feature/issue-2299
YaroslavRosnovskyi Mar 5, 2025
f59222a
Merge pull request #2512 from ita-social-projects/feature/issue-2299
YaroslavRosnovskyi Mar 5, 2025
2e44ef7
Merge branch 'release/1.2.0' into feature/issue-1930
YaroslavRosnovskyi Mar 5, 2025
6111363
fix adding rstrinction authrize for getting all news
vlad-zhadan Mar 6, 2025
ef5233f
Merge pull request #2269 from ita-social-projects/feature/issue-1930
YaroslavRosnovskyi Mar 6, 2025
6075159
added seed
YaroslavRosnovskyi Mar 6, 2025
d61678e
fixed data seeding
YaroslavRosnovskyi Mar 7, 2025
4e1aee9
Merge pull request #2516 from ita-social-projects/hotfix/1
YaroslavRosnovskyi Mar 9, 2025
a3c0421
merge 1.2.1 into 1.2.2
YaroslavRosnovskyi Mar 9, 2025
2977b0e
fixed scripts
YaroslavRosnovskyi Mar 10, 2025
c45fcad
modified dockerfile
YaroslavRosnovskyi Mar 10, 2025
7613291
modified script
YaroslavRosnovskyi Mar 10, 2025
8850507
Revert "modified script"
YaroslavRosnovskyi Mar 10, 2025
91456b3
modified jenkins
YaroslavRosnovskyi Mar 10, 2025
90b88c7
modified jenkins
YaroslavRosnovskyi Mar 10, 2025
4c4cb5b
modified dockerfile
YaroslavRosnovskyi Mar 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/update-iteration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Move Tasks To New Iteration

on:
schedule:
# Runs "at 05:00 GMT+2, only on Thursday"
- cron: '0 3 * * 4'
# Runs "at 05:00 GMT+2, everyday"
- cron: '0 3 * * *'

jobs:
move-to-next-iteration:
Expand Down
26 changes: 26 additions & 0 deletions Dockerfile.dbupdate
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /app

# copy dependencies
COPY ./Streetcode/DbUpdate/DbUpdate.csproj ./DbUpdate/
COPY ./Streetcode/DbUpdate/*.cs ./DbUpdate/
COPY ./Streetcode/DbUpdate/appsettings.Local.json ./DbUpdate/
COPY ./Streetcode/DbUpdate/appsettings.IntegrationTests.json ./DbUpdate/
COPY ./Streetcode ./Streetcode/
COPY ./Streetcode/Streetcode.DAL/Persistence/ScriptsMigration ./Streetcode.DAL/Persistence/ScriptsMigration/

RUN dotnet restore ./DbUpdate/DbUpdate.csproj


# build
RUN dotnet build ./DbUpdate/DbUpdate.csproj -c Release -o /app/build

# publishishing application
FROM build AS publish
RUN dotnet publish ./DbUpdate/DbUpdate.csproj -c Release -o /app/publish

FROM mcr.microsoft.com/dotnet/runtime:7.0 AS runtime
WORKDIR /app
COPY --from=publish /app/publish .

CMD ["dotnet", "DbUpdate.dll"]
59 changes: 40 additions & 19 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
def CODE_VERSION = ''
def IS_IMAGE_BUILDED = false
def IS_DBUPDATE_IMAGE_BUILDED = false
def IS_IMAGE_PUSH = false
def IS_DBUPDATE_IMAGE_PUSH = false
def isSuccess
def preDeployFrontStage
def preDeployBackStage
Expand Down Expand Up @@ -45,9 +47,14 @@ pipeline {
stage('Setup dependencies') {
steps {
script {
sh 'dotnet tool update --global dotnet-coverage'
sh 'rm -rf ~/.dotnet/tools/dotnet-coverage || true'
sh 'rm -rf ~/.dotnet/tools/dotnet-sonarscanner || true'
sh 'rm -rf ~/.dotnet/tools/GitVersion.Tool || true'

sh 'dotnet tool update --global dotnet-coverage --version 17.13.1'
sh 'dotnet tool update --global dotnet-sonarscanner'
sh 'dotnet tool update --global GitVersion.Tool --version 5.12.0'

sh 'docker image prune --force --all --filter "until=72h"'
sh 'docker system prune --force --all --filter "until=72h"'

Expand Down Expand Up @@ -84,10 +91,10 @@ pipeline {
steps {
parallel(
Unit_test: {
sh 'dotnet test ./Streetcode/Streetcode.XUnitTest/Streetcode.XUnitTest.csproj --configuration Release'
sh 'dotnet test ./Streetcode/Streetcode.XUnitTest/Streetcode.XUnitTest.csproj --configuration Release --no-build'
},
Integration_test: {
sh 'dotnet test ./Streetcode/Streetcode.XIntegrationTest/Streetcode.XIntegrationTest.csproj --configuration Release'
sh 'dotnet test ./Streetcode/Streetcode.XIntegrationTest/Streetcode.XIntegrationTest.csproj --configuration Release --no-build'
}
)
}
Expand Down Expand Up @@ -116,8 +123,8 @@ pipeline {
/d:sonar.pullrequest.branch=$PR_BRANCH \
/d:sonar.pullrequest.base=$PR_BASE

dotnet build ./Streetcode/Streetcode.sln --configuration Release
dotnet-coverage collect "dotnet test ./Streetcode/Streetcode.sln --configuration Release" -f xml -o "coverage.xml"
dotnet build ./Streetcode/Streetcode.sln --configuration Release -p:WarningLevel=0
dotnet-coverage collect "dotnet test ./Streetcode/Streetcode.sln --configuration Release --no-build" -f xml -o "coverage.xml"
dotnet sonarscanner end /d:sonar.token=$SONAR
'''
} else {
Expand All @@ -129,55 +136,62 @@ pipeline {
/d:sonar.host.url="https://sonarcloud.io" \
/d:sonar.cs.vscoveragexml.reportsPaths="**/coverage.xml" \

dotnet build ./Streetcode/Streetcode.sln --configuration Release
dotnet-coverage collect "dotnet test ./Streetcode/Streetcode.sln --configuration Release" -f xml -o "coverage.xml"
dotnet build ./Streetcode/Streetcode.sln --configuration Release -p:WarningLevel=0
dotnet-coverage collect "dotnet test ./Streetcode/Streetcode.sln --configuration Release --no-build" -f xml -o "coverage.xml"
dotnet sonarscanner end /d:sonar.token=$SONAR
'''
}
}
}
}
}
stage('Build image') {
stage('Build images') {
when {
branch pattern: "release/[0-9].[0-9].[0-9]", comparator: "REGEXP"

}
steps {
script {
withCredentials([usernamePassword(credentialsId: 'docker-login-streetcode', passwordVariable: 'password', usernameVariable: 'username')]){
sh "docker build -t ${username}/streetcode:latest ."
// Build the backend image
sh "docker build -f Dockerfile -t ${username}/streetcode:${env.CODE_VERSION} ."
IS_IMAGE_BUILDED = true

// Build the dbupdate image
sh "docker build -f Dockerfile.dbupdate -t ${username}/dbupdate:${env.CODE_VERSION} ."
IS_DBUPDATE_IMAGE_BUILDED = true
}
}
}
}
stage('Push image') {
stage('Push images') {
when {
expression { IS_IMAGE_BUILDED == true }
expression { IS_IMAGE_BUILDED == true && IS_DBUPDATE_IMAGE_BUILDED == true }
}
steps {
script {
withCredentials([usernamePassword(credentialsId: 'docker-login-streetcode', passwordVariable: 'password', usernameVariable: 'username')]){
sh 'echo "${password}" | docker login -u "${username}" --password-stdin'
sh "docker push ${username}/streetcode:latest"
sh "docker tag ${username}/streetcode:latest ${username}/streetcode:${env.CODE_VERSION}"

sh "docker push ${username}/streetcode:${env.CODE_VERSION}"
IS_IMAGE_PUSH = true


sh "docker push ${username}/dbupdate:${env.CODE_VERSION}"
IS_DBUPDATE_IMAGE_PUSH = true

}
}
}
}
stage('Deploy Stage'){
when {
expression { IS_IMAGE_PUSH == true }
expression { IS_IMAGE_PUSH == true && IS_DBUPDATE_IMAGE_PUSH == true }
}
steps {
input message: 'Do you want to approve Staging deployment?', ok: 'Yes', submitter: 'admin_1, ira_zavushchak , dev'
script {
checkout scmGit(
branches: [[name: 'main']],
branches: [[name: 'feature/add-init-container']],
userRemoteConfigs: [[credentialsId: 'StreetcodeGithubCreds', url: '[email protected]:ita-social-projects/Streetcode-DevOps.git']])

preDeployBackStage = sh(script: 'docker container inspect $(docker container ls -aq) --format "{{.Config.Image}}" | grep "streetcodeua/streetcode:" | perl -pe \'($_)=/([0-9]+([.][0-9]+)+)/\'', returnStdout: true).trim()
Expand All @@ -195,7 +209,7 @@ pipeline {
sh 'docker system prune --force --filter "until=72h"'
sh """ export DOCKER_TAG_BACKEND=${env.CODE_VERSION}
export DOCKER_TAG_FRONTEND=${preDeployFrontStage}
docker stop backend frontend nginx loki certbot
docker stop backend frontend nginx loki certbot dbupdate
docker container prune -f
docker volume prune -f
docker network prune -f
Expand All @@ -207,7 +221,7 @@ pipeline {
}
stage('WHAT IS THE NEXT STEP') {
when {
expression { IS_IMAGE_PUSH == true }
expression { IS_IMAGE_PUSH == true && IS_DBUPDATE_IMAGE_PUSH == true }
}
steps {
script {
Expand All @@ -228,7 +242,7 @@ pipeline {
sh """
export DOCKER_TAG_BACKEND=${preDeployBackStage}
export DOCKER_TAG_FRONTEND=${preDeployFrontStage}
docker stop backend frontend nginx loki certbot
docker stop backend frontend nginx loki certbot dbupdate
docker container prune -f
docker volume prune -f
docker network prune -f
Expand All @@ -245,7 +259,9 @@ pipeline {
}
}
}

/*

stage('Deploy prod') {
agent {
label 'production'
Expand Down Expand Up @@ -286,7 +302,9 @@ pipeline {
}
}
}

*/

stage('Sync after release') {
when {
expression { isSuccess == '1' }
Expand Down Expand Up @@ -340,7 +358,9 @@ pipeline {
}
}
}

*/

}
post {
always {
Expand All @@ -349,3 +369,4 @@ post {
}
}
}

22 changes: 21 additions & 1 deletion Streetcode/DbUpdate/DbUpdate.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
<PackageReference Include="DbUp" Version="5.0.8" />
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
Expand All @@ -21,11 +25,27 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<None Remove="appsettings.Local.json" />
<Content Include="appsettings.Local.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<!-- <None Remove="appsettings.IntegrationTests.json" /> -->
<Content Include="appsettings.IntegrationTests.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Streetcode.WebApi\Streetcode.WebApi.csproj" />
<!-- Include the files you want to copy from the other project -->
<FilesToCopy Include="..\Streetcode.DAL\Persistence\ScriptsMigration\*.*" />
</ItemGroup>

<Target Name="CopyFiles" AfterTargets="Build">
<Copy SourceFiles="@(FilesToCopy)" DestinationFolder="$(OutputPath)\ScriptsMigration\" />
</Target>

<PropertyGroup>
<SonarQubeExclude>true</SonarQubeExclude>
Expand Down
33 changes: 16 additions & 17 deletions Streetcode/DbUpdate/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using DbUp;
using System.Reflection;
using DbUp;
using Microsoft.Extensions.Configuration;

public class Program
Expand All @@ -8,22 +9,20 @@ static int Main(string[] args)
string rootDirectory = GetRootFolderPath();
string pathToSqlScripts = Path.Combine(
rootDirectory,
"Streetcode",
"Streetcode.DAL",
"Persistence",
"ScriptsMigration");

var environment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? "Local";

var configuration = new ConfigurationBuilder()
.SetBasePath(Path.Combine(rootDirectory, "Streetcode", "Streetcode.WebApi"))
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
.SetBasePath(rootDirectory)
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
.AddJsonFile($"appsettings.{environment}.json", optional: true, reloadOnChange: true)
.AddEnvironmentVariables("STREETCODE_")
.Build();

var connectionString = configuration.GetConnectionString("DefaultConnection");

Console.WriteLine($"Connection string: {connectionString}");
var upgrader =
DeployChanges.To
.SqlDatabase(connectionString)
Expand All @@ -50,16 +49,16 @@ static int Main(string[] args)
return 0;
}

private static string GetRootFolderPath()
{
// By root folder we mean folder, that contains .gitignore file.
string currentDirectoryPath = Directory.GetCurrentDirectory();
var directory = new DirectoryInfo(currentDirectoryPath);
while (directory is not null && !directory.GetFiles(".gitignore").Any())
{
directory = directory.Parent;
}
return directory?.FullName ?? throw new NullReferenceException("Cannot find root folder");
private static string GetRootFolderPath()
{
string codeBase = Assembly.GetExecutingAssembly().CodeBase;
if (codeBase == null)
{
throw new NullReferenceException("Cannot find root folder");
}

UriBuilder uri = new UriBuilder(codeBase);
string path = Uri.UnescapeDataString(uri.Path);
return Path.GetDirectoryName(path) !;
}
}
5 changes: 5 additions & 0 deletions Streetcode/DbUpdate/appsettings.IntegrationTests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost,1455;Database=Streetcode_IntegrationTests_Db;User Id=sa;Password=sdlLKMCD234!@#lkcmds;MultipleActiveResultSets=True;TrustServerCertificate=true"
}
}
5 changes: 5 additions & 0 deletions Streetcode/DbUpdate/appsettings.Local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost, 1433;Database=test-db;User Id=sa;Password=Admin@1234;MultipleActiveResultSets=true;TrustServerCertificate=true"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace Streetcode.BLL.Attributes.Authentication
{
[AttributeUsage(AttributeTargets.Property)]
public class ValidEmailAttribute : ValidationAttribute
{
protected override ValidationResult? IsValid(object? value, ValidationContext validationContext)
Expand All @@ -19,7 +20,7 @@ public class ValidEmailAttribute : ValidationAttribute
return new ValidationResult("Attribute cannot be applied to non-string property");
}

if (!Regex.IsMatch(email, @"^[^@\s]+@[^@\s]+\.(com|net|org|gov|ua)$", RegexOptions.None, TimeSpan.FromMilliseconds(100)))
if (!Regex.IsMatch(email, @"^(?!.*\.\.)[a-zA-Z0-9_%+-]+(?:\.[a-zA-Z0-9_%+-]+)*@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$", RegexOptions.None, TimeSpan.FromMilliseconds(100)))
{
return new ValidationResult("Incorrect email address format");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Streetcode.BLL.DTO.Authentication.GoogleLogin
{
public class GoogleLoginRequest
{
public string IdToken { get; set; } = string.Empty;
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using Streetcode.BLL.Constants.Authentication;
using Streetcode.BLL.Attributes.Authentication;

namespace Streetcode.BLL.DTO.Authentication.Login;

public class LoginRequestDTO
{
[Required]
[EmailAddress]
[ValidEmail]
[DefaultValue(AuthConstants.Email)]
public string Login { get; set; } = null!;

Expand Down
Loading