Skip to content
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

[Integration][SonarQube] Added support for querying projects via the GA API #1146

Merged
merged 72 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from 64 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
7ddf910
Added logs to sonarqube integration
lordsarcastic Nov 15, 2024
a38a15b
Bumped integration version
lordsarcastic Nov 15, 2024
f82b31f
Ran formatting
lordsarcastic Nov 15, 2024
02b5051
Make use of internal API optional
lordsarcastic Nov 18, 2024
81a4be9
Updated changelog
lordsarcastic Nov 18, 2024
1e635db
Made fixes based on comment
lordsarcastic Nov 19, 2024
cabc3d9
Made fixes based on comment
lordsarcastic Nov 19, 2024
3333924
Chore: Added logs
lordsarcastic Nov 19, 2024
7d9adc2
Made default vlaue for enpoint in get_components
lordsarcastic Nov 19, 2024
5073d7f
Added pagination to projects
mk-armah Nov 20, 2024
8f0babc
Merge branch 'main' into add-sonarqube-logs
mk-armah Nov 20, 2024
a075851
added more logs
mk-armah Nov 20, 2024
3152725
Merge branch 'add-sonarqube-logs' of https://github.com/port-labs/oce…
mk-armah Nov 20, 2024
8793c85
Merge remote-tracking branch 'origin/main' into add-sonarqube-logs
lordsarcastic Nov 20, 2024
c4e167b
Feature: replaced all internal calls with GA calls
lordsarcastic Nov 20, 2024
230c288
Merge remote-tracking branch 'origin/main' into add-sonarqube-logs
lordsarcastic Nov 20, 2024
91fe625
Chore: Bumped integration version
lordsarcastic Nov 20, 2024
6145e0f
Implemented all tests
lordsarcastic Nov 22, 2024
86ab531
Chore: Fixed comments
lordsarcastic Nov 22, 2024
64d0ec4
Merge remote-tracking branch 'origin/main' into add-sonarqube-logs
lordsarcastic Nov 22, 2024
3722134
Bumped integration version
lordsarcastic Nov 22, 2024
84532d9
Merge branch 'main' into add-sonarqube-logs
PeyGis Nov 25, 2024
fca1bb4
Merge branch 'main' into add-sonarqube-logs
PeyGis Nov 25, 2024
e046aea
Chore: Implemented different kind for ga projects
lordsarcastic Nov 27, 2024
2e9d816
Merge branch 'add-sonarqube-logs' of github.com:port-labs/ocean into …
lordsarcastic Nov 27, 2024
d71570f
Merge remote-tracking branch 'origin/main' into add-sonarqube-logs
lordsarcastic Nov 27, 2024
942a423
Chore: Increased test count
lordsarcastic Nov 29, 2024
2829f18
Removed project kind mapping from defaults
lordsarcastic Nov 29, 2024
f63ff6b
Merge branch 'main' into add-sonarqube-logs
PeyGis Dec 2, 2024
1df9dd1
Update integrations/sonarqube/.port/resources/port-app-config.yaml
PeyGis Dec 2, 2024
5a05a96
Merge remote-tracking branch 'origin/main' into add-sonarqube-logs
lordsarcastic Dec 3, 2024
07e5d4d
Mocks event context for required tests
shariff-6 Dec 3, 2024
a1cc4d8
Merge branch 'main' of https://github.com/port-labs/ocean into add-so…
shariff-6 Dec 3, 2024
d874bc9
Chore: Try extra fix for failing tests
lordsarcastic Dec 3, 2024
2fe448e
Merge branch 'add-sonarqube-logs' of github.com:port-labs/ocean into …
lordsarcastic Dec 3, 2024
901d001
Chore: Fixed all tests
lordsarcastic Dec 3, 2024
02ee6b8
Chore: Remove failing full sync test
lordsarcastic Dec 4, 2024
168c716
Merge remote-tracking branch 'origin/main' into add-sonarqube-logs
lordsarcastic Dec 4, 2024
361e38b
Chore: bumped version
lordsarcastic Dec 4, 2024
5bbbc22
Chore: Bumped ocean dependency version
lordsarcastic Dec 4, 2024
0e239a8
Chore: uPdate poetry lock file
lordsarcastic Dec 4, 2024
d0926a4
Chore: Fix organisaztion id absense in off premise
lordsarcastic Dec 4, 2024
24d6e21
chore: fixed failing tests
lordsarcastic Dec 4, 2024
00fda07
Merge remote-tracking branch 'origin/main' into add-sonarqube-logs
lordsarcastic Dec 4, 2024
b3cf433
Chore: bumped integration version
lordsarcastic Dec 4, 2024
39d973d
Merge branch 'main' into add-sonarqube-logs
PeyGis Dec 9, 2024
ced640b
Fix: fixed selectors bug
lordsarcastic Dec 9, 2024
a653079
Merge remote-tracking branch 'origin/main' into add-sonarqube-logs
lordsarcastic Dec 9, 2024
e458efb
optimize fetching of projects in issues and analysis
PeyGis Dec 10, 2024
3794ae5
lint code
PeyGis Dec 10, 2024
c441707
Merge branch 'main' into add-sonarqube-logs
PeyGis Dec 10, 2024
f3ac6ba
Merge branch 'add-sonarqube-logs' of https://github.com/port-labs/oce…
PeyGis Dec 10, 2024
d407786
Merge branch 'main' into add-sonarqube-logs
PeyGis Dec 10, 2024
8ea3896
Merge remote-tracking branch 'origin/main' into add-sonarqube-logs
lordsarcastic Dec 10, 2024
c7334e9
Bumped integration version
lordsarcastic Dec 10, 2024
7fa0861
Chore: Made fixes to integration
lordsarcastic Dec 11, 2024
02c0dce
Merge remote-tracking branch 'origin/main' into add-sonarqube-logs
lordsarcastic Dec 11, 2024
17a0848
Merge branch 'main' into add-sonarqube-logs
Tankilevitch Dec 12, 2024
7a52d72
Chore: Changed ga_projects to projects_ga
lordsarcastic Dec 16, 2024
ec55488
Merge branch 'add-sonarqube-logs' of github.com:port-labs/ocean into …
lordsarcastic Dec 16, 2024
ef2676a
Merge remote-tracking branch 'origin/main' into add-sonarqube-logs
lordsarcastic Dec 16, 2024
e66965f
Restored projection for component projects kind
lordsarcastic Dec 16, 2024
a37f756
Merge remote-tracking branch 'origin/main' into add-sonarqube-logs
lordsarcastic Dec 18, 2024
e673d75
Chore: Added layer of to ensure consistency
lordsarcastic Dec 18, 2024
b8b5014
Chore: Fixed comments
lordsarcastic Dec 18, 2024
84ff365
Chore: Added alias for qualifier
lordsarcastic Dec 19, 2024
3456ca3
Fixed pagination bug
lordsarcastic Dec 20, 2024
0e1d1e4
Added changelog
lordsarcastic Dec 20, 2024
d348db5
Merge branch 'main' into add-sonarqube-logs
Tankilevitch Dec 22, 2024
f7a6b4e
Merge branch 'main' into add-sonarqube-logs
lordsarcastic Dec 23, 2024
cdcd1b6
Fixed changelog
lordsarcastic Dec 23, 2024
fe758d4
Bump integration version
lordsarcastic Dec 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions integrations/sonarqube/.port/resources/blueprints.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,19 @@
"icon": "Git",
"title": "Main Branch"
},
"tags": {
"type": "array",
"title": "Tags"
"mainBranchLastAnalysisDate": {
"type": "string",
"format": "date-time",
"icon": "Clock",
"title": "Main Branch Last Analysis Date"
},
"revision": {
"type": "string",
"title": "Revision"
},
"managed": {
"type": "boolean",
"title": "Managed"
}
},
"required": []
Expand Down
12 changes: 7 additions & 5 deletions integrations/sonarqube/.port/resources/port-app-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
createMissingRelatedEntities: true
deleteDependentEntities: true
resources:
- kind: projects
- kind: projects_ga
selector:
query: 'true'
apiFilters:
filter:
qualifier: TRK
qualifiers:
- TRK
metrics:
- code_smells
- coverage
Expand All @@ -27,15 +27,17 @@ resources:
organization: .organization
link: .__link
qualityGateStatus: .__branch.status.qualityGateStatus
lastAnalysisDate: .__branch.analysisDate
lastAnalysisDate: .analysisDate
numberOfBugs: .__measures[]? | select(.metric == "bugs") | .value
numberOfCodeSmells: .__measures[]? | select(.metric == "code_smells") | .value
numberOfVulnerabilities: .__measures[]? | select(.metric == "vulnerabilities") | .value
numberOfHotSpots: .__measures[]? | select(.metric == "security_hotspots") | .value
numberOfDuplications: .__measures[]? | select(.metric == "duplicated_files") | .value
coverage: .__measures[]? | select(.metric == "coverage") | .value
mainBranch: .__branch.name
tags: .tags
lordsarcastic marked this conversation as resolved.
Show resolved Hide resolved
mainBranchLastAnalysisDate: .__branch.analysisDate
revision: .revision
managed: .managed
- kind: analysis
selector:
query: 'true'
Expand Down
1 change: 1 addition & 0 deletions integrations/sonarqube/.port/spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ features:
section: Code Quality & Security
resources:
- kind: projects
- kind: projects_ga
- kind: saas_analysis
- kind: onprem_analysis
- kind: issues
Expand Down
9 changes: 9 additions & 0 deletions integrations/sonarqube/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

<!-- towncrier release notes start -->

## 0.1.121 (2024-12-16)


### Improvements

- Increased logs presence in integration
- Replaced calls to internal API for projects to GA version, making the use of internal APIs optional


## 0.1.120 (2024-12-15)


Expand Down
Loading
Loading