From 99e084662453f0981f07dbb96c7351d96cdb8594 Mon Sep 17 00:00:00 2001 From: Joao Pedro Truchinski Borba Date: Fri, 16 Aug 2024 11:30:17 -0300 Subject: [PATCH 1/3] feat: adding sonarqube --- .github/workflows/sonarqube-scan.yaml | 29 +++++++++++++++++++++++++++ pom.xml | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/sonarqube-scan.yaml diff --git a/.github/workflows/sonarqube-scan.yaml b/.github/workflows/sonarqube-scan.yaml new file mode 100644 index 0000000..ce56de0 --- /dev/null +++ b/.github/workflows/sonarqube-scan.yaml @@ -0,0 +1,29 @@ +name: Sonarqube Scan Test + +on: + pull_request: + branches: + - main + +jobs: + sonarqube: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Install SonarScanner + run: | + wget https://cdn3.gnarususercontent.com.br/3361-desenvolvimento-seguro/sonar-scanner-cli-5.0.1.3006-linux.zip + unzip sonar-scanner-cli-5.0.1.3006-linux.zip + + - name: Run SonarScanner + run: | + ./sonar-scanner-5.0.1.3006-linux/bin/sonar-scanner -X \ + -Dsonar.projectKey=AsaasSdk \ + -Dsonar.sources=. \ + -Dsonar.host.url=http://localhost:9000 \ + -Dsonar.login=$SONARQUBE_TOKEN + env: + SONARQUBE_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} \ No newline at end of file diff --git a/pom.xml b/pom.xml index ad7c065..fe6f356 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 io.github.jpdev01 asaassdk - 1.3-SNAPSHOT + 1.4-SNAPSHOT jar From 7fd8ce8c90a9fc8cec4a9914d261634173b7b0c5 Mon Sep 17 00:00:00 2001 From: Joao Pedro Truchinski Borba Date: Fri, 16 Aug 2024 13:06:01 -0300 Subject: [PATCH 2/3] upd: set branch sonar --- .github/workflows/sonarqube-scan.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sonarqube-scan.yaml b/.github/workflows/sonarqube-scan.yaml index ce56de0..7a482e1 100644 --- a/.github/workflows/sonarqube-scan.yaml +++ b/.github/workflows/sonarqube-scan.yaml @@ -3,7 +3,7 @@ name: Sonarqube Scan Test on: pull_request: branches: - - main + - sonnar jobs: sonarqube: From 5da33f6f8aab1b6b8f6ad4cb067286d5c8bf7a21 Mon Sep 17 00:00:00 2001 From: Joao Pedro Truchinski Borba Date: Fri, 16 Aug 2024 14:12:14 -0300 Subject: [PATCH 3/3] upd: sobe sonarqube na aws --- .github/workflows/sonarqube-scan.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sonarqube-scan.yaml b/.github/workflows/sonarqube-scan.yaml index 7a482e1..fbbd9a4 100644 --- a/.github/workflows/sonarqube-scan.yaml +++ b/.github/workflows/sonarqube-scan.yaml @@ -23,7 +23,8 @@ jobs: ./sonar-scanner-5.0.1.3006-linux/bin/sonar-scanner -X \ -Dsonar.projectKey=AsaasSdk \ -Dsonar.sources=. \ - -Dsonar.host.url=http://localhost:9000 \ + -Dsonar.host.url=$SONARQUBE_AWS_HOST \ -Dsonar.login=$SONARQUBE_TOKEN env: + SONARQUBE_AWS_HOST: ${{ secrets.SONARQUBE_AWS_HOST }} SONARQUBE_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} \ No newline at end of file