From 6ae8ca83f3bfa65c7765924799fd6855f3a2949e Mon Sep 17 00:00:00 2001
From: Saikrishna Bairamoni
<84093461+SaikrishnaBairamoni@users.noreply.github.com>
Date: Tue, 13 Feb 2024 16:40:38 -0500
Subject: [PATCH 1/2] Add CI.yml to build and run sonarscan
---
.github/workflows/ci.yml | 24 ++++++++++++++++++++++++
pom.xml | 2 ++
2 files changed, 26 insertions(+)
create mode 100644 .github/workflows/ci.yml
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..0a1930f
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,24 @@
+name: CI
+on:
+ pull_request:
+ types: [opened, reopened, synchronize]
+ push:
+ branches: [develop, master]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+ - name: Set up JDK
+ uses: actions/setup-java@v4
+ with:
+ java-version: "21"
+ distribution: "temurin"
+ - name: Run Sonar
+ env:
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
+ run: |
+ mvn -e -X clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.projectKey=usdot-jpo-ode_jpo-s3-deposit -Dsonar.projectName=jpo-s3-deposit -Dsonar.organization=usdot-jpo-ode -Dsonar.host.url=https://sonarcloud.io -Dsonar.branch.name=$GITHUB_REF_NAME
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 7b23662..1c273cb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,6 +10,8 @@
21
21
+ usdot-jpo-ode
+ https://sonarcloud.io
From d4bbbf5e198318e4ebe280779e9d6d66b2f75962 Mon Sep 17 00:00:00 2001
From: Saikrishna Bairamoni
<84093461+SaikrishnaBairamoni@users.noreply.github.com>
Date: Fri, 23 Feb 2024 10:51:05 -0500
Subject: [PATCH 2/2] Remove duplicate sonar properties as we have in Ci.yml
---
pom.xml | 2 --
1 file changed, 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index 1c273cb..7b23662 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,8 +10,6 @@
21
21
- usdot-jpo-ode
- https://sonarcloud.io