-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DOPS-3309: Add sonar & defectdojo analysis (#440)
* Add sonar & defectdojo analysis Signed-off-by: BAStos525 <[email protected]> * fix sonar key Signed-off-by: BAStos525 <[email protected]> * ci: redice gradlew commands amount Signed-off-by: BAStos525 <[email protected]> --------- Signed-off-by: BAStos525 <[email protected]> Signed-off-by: BAStos525 <[email protected]>
- Loading branch information
Showing
10 changed files
with
94 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
|
@@ -23,8 +23,26 @@ jobs: | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Build with Gradle | ||
run: ./gradlew build | ||
- name: Build with Gradle & Sonarqube analysis | ||
run: | | ||
./gradlew build | ||
./gradlew jacocoTestReport | ||
./gradlew sonar -Dsonar.token=${{ secrets.SONAR_TOKEN }} | ||
- name: DefectDojo | ||
if: always() | ||
uses: C4tWithShell/[email protected] | ||
with: | ||
token: ${{ secrets.DEFECTOJO_TOKEN }} | ||
defectdojo_url: ${{ secrets.DEFECTOJO_URL }} | ||
product_type: iroha2 | ||
engagement: ${{ github.ref_name }} | ||
tools: "SonarQube API Import,Github Vulnerability Scan" | ||
sonar_projectKey: iroha2-java | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
github_repository: ${{ github.repository }} | ||
product: ${{ github.repository }} | ||
environment: Test | ||
reports: '{"Github Vulnerability Scan": "github.json"}' | ||
- name: Cleanup Gradle Cache | ||
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions. | ||
# Restoring these files from a GitHub Actions cache might cause problems for future builds. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
jacocoTestReport { | ||
mustRunAfter(":admin-client:jacocoTestReport") | ||
mustRunAfter(":block:jacocoTestReport") | ||
mustRunAfter(":client:jacocoTestReport") | ||
mustRunAfter(":codegen:jacocoTestReport") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters