Skip to content

Commit

Permalink
Update CI env to SonarQube 9.9 requirements
Browse files Browse the repository at this point in the history
Signed-off-by: Sébastien Dinot <[email protected]>
  • Loading branch information
sdinot committed Mar 7, 2024
1 parent a8fe2cf commit 4391c52
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,28 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 8
distribution: 'temurin'
java-version: 11
- name: Build with Maven
run: mvn -B -U -f pom.xml install checkstyle:checkstyle
- name: SonarQube scan
run: |
if [ $PROJECT_KEY != 'Hipparchus-Math/hipparchus' ] ; then export KEY_OPTION="-Dsonar.projectKey=${PROJECT_KEY/\//:}" ; fi
if [ $PROJECT_KEY != 'Hipparchus-Math/hipparchus' ] ; then export PROJECT_NAME="$PROJECT_NAME ($PROJECT_KEY)" ; fi
mvn -B -f pom.xml sonar:sonar -Dsonar.login=$SONARQUBE_TOKEN -Dsonar.branch.name=${GITHUB_REF##*/} $KEY_OPTION -Dsonar.projectName="$PROJECT_NAME"
mvn -B -f pom.xml sonar:sonar \
-Dsonar.host.url=$SONARQUBE_HOST_URL \
-Dsonar.login=$SONARQUBE_TOKEN \
-Dsonar.branch.name=${GITHUB_REF##*/} \
-Dsonar.projectName="$PROJECT_NAME" \
-Dsonar.qualitygate.wait=true \
$KEY_OPTION
env:
SONARQUBE_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
SONARQUBE_HOST_URL: ${{ vars.SONARQUBE_HOST_URL }}
PROJECT_KEY: ${{ github.repository }}
PROJECT_NAME: 'Hipparchus'
KEY_OPTION: ''
Expand Down
2 changes: 0 additions & 2 deletions hipparchus-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,6 @@
<hipparchus.hamcrest.version>2.2</hipparchus.hamcrest.version>
<hipparchus.reflow-velocity-tools.version>2.0.0</hipparchus.reflow-velocity-tools.version>
<hipparchus.mathjax.enable>&lt;script src=&quot;https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js&quot; id=&quot;MathJax-script&quot;&gt;&lt;/script&gt;</hipparchus.mathjax.enable>
<!-- sonar related properties -->
<sonar.host.url>https://sonar.orekit.org/</sonar.host.url>
</properties>

<build>
Expand Down

0 comments on commit 4391c52

Please sign in to comment.