-
Notifications
You must be signed in to change notification settings - Fork 43
37 lines (35 loc) · 1.33 KB
/
maven.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Java CI with Maven
on: [ push ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 11
- name: Build with Maven
run: mvn -B -U -f pom.xml install checkstyle:checkstyle
- name: SonarQube scan
run: |
export PROJECT_NAME="Hipparchus ($GITHUB_REPOSITORY)"
export PROJECT_KEY=${GITHUB_REPOSITORY/\//:}
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.projectKey="$PROJECT_KEY" \
-Dsonar.qualitygate.wait=true
env:
SONARQUBE_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
SONARQUBE_HOST_URL: ${{ vars.SONARQUBE_HOST_URL }}
- name: Deployment
if: ( github.repository == 'Hipparchus-Math/hipparchus' ) && ( ( github.ref == 'refs/heads/master' ) || startsWith( github.ref, 'refs/heads/release-' ) )
run: mvn -B -U -f pom.xml -s .CI/maven-settings.xml deploy -Pci-deploy -DskipTests=true
env:
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}