Skip to content

Commit

Permalink
Update and rename build.yml to sonarqube-scanner.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
psyenduck authored Nov 2, 2024
1 parent b3615fc commit 92dc632
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 51 deletions.
51 changes: 0 additions & 51 deletions .github/workflows/build.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/sonarqube-scanner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CI/CD workflow for Maven Build and Sonar Code scan
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK 20
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '17'
- name: Build with Maven
run: mvn clean install -f pom.xml
- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master
with:
projectBaseDir: .
args: >
-Dsonar.organization=my-org
-Dsonar.projectKey=psyenduck_jenkins_bb884f99-57a6-45b3-bb59-0a99eca0871b
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

0 comments on commit 92dc632

Please sign in to comment.