Skip to content

Build Service on branch feature/MARP-975-Display-compatibility-range-in-Marketplace-Items triggered by tvtphuc-axonivy #1157

Build Service on branch feature/MARP-975-Display-compatibility-range-in-Marketplace-Items triggered by tvtphuc-axonivy

Build Service on branch feature/MARP-975-Display-compatibility-range-in-Marketplace-Items triggered by tvtphuc-axonivy #1157

name: Service CI Build
run-name: Build Service on branch ${{github.ref_name}} triggered by ${{github.actor}}
on:
push:
paths:
- 'marketplace-service/**'
workflow_dispatch:
jobs:
build:
name: Executes Tests
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Tests with Maven
run: mvn clean install --file ./marketplace-service/pom.xml
analysis:
name: Sonarqube analysis
needs: build
runs-on: self-hosted
env:
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_PROJECT_KEY : ${{ secrets.SONAR_PROJECT_KEY }}
steps:
- name: Remove unused sonar images
run: docker image prune -af
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Run SonarQube Scanner
run: |
mvn -B verify sonar:sonar --file ./marketplace-service/pom.xml \
-Dsonar.host.url=${{ env.SONAR_HOST_URL }} \
-Dsonar.projectKey=${{ env.SONAR_PROJECT_KEY }} \
-Dsonar.projectName="AxonIvy Market Service" \
-Dsonar.token=${{ env.SONAR_TOKEN }} \
- name: SonarQube Quality Gate check
id: sonarqube-quality-gate-check
uses: sonarsource/sonarqube-quality-gate-action@master
timeout-minutes: 5
with:
scanMetadataReportFile: ./marketplace-service/target/sonar/report-task.txt
args: -Dsonar.projectKey=${{ env.SONAR_PROJECT_KEY }}