From d57f98e445233edd14376c6289a69e639e8e8254 Mon Sep 17 00:00:00 2001 From: Hoan Nguyen Date: Fri, 5 Jul 2024 14:53:22 +0700 Subject: [PATCH] Fix actions build --- .github/workflows/service-ci-build.yml | 10 +++++----- .github/workflows/service-dev-build.yml | 8 ++++---- .github/workflows/ui-ci-build.yml | 2 +- .github/workflows/ui-dev-build.yml | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/service-ci-build.yml b/.github/workflows/service-ci-build.yml index 86a8ff9ed..e384445d2 100644 --- a/.github/workflows/service-ci-build.yml +++ b/.github/workflows/service-ci-build.yml @@ -1,5 +1,5 @@ -name: CI Build -run-name: Build on branch ${{github.ref_name}} triggered by ${{github.actor}} +name: Service CI Build +run-name: Build Service on branch ${{github.ref_name}} triggered by ${{github.actor}} on: push: @@ -19,7 +19,7 @@ jobs: distribution: 'temurin' cache: maven - name: Tests with Maven - run: mvn clean install + run: mvn clean install --file ./marketplace-service/pom.xml analysis: name: Sonarqube analysis needs: build @@ -36,7 +36,7 @@ jobs: distribution: 'temurin' - name: Run SonarQube Scanner run: | - mvn -B verify sonar:sonar \ + 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" \ @@ -46,5 +46,5 @@ jobs: uses: sonarsource/sonarqube-quality-gate-action@master timeout-minutes: 5 with: - scanMetadataReportFile: target/sonar/report-task.txt + scanMetadataReportFile: ./marketplace-service/target/sonar/report-task.txt args: -Dsonar.projectKey=${{ env.SONAR_PROJECT_KEY }} diff --git a/.github/workflows/service-dev-build.yml b/.github/workflows/service-dev-build.yml index 137e06a6c..716ebe4b5 100644 --- a/.github/workflows/service-dev-build.yml +++ b/.github/workflows/service-dev-build.yml @@ -1,4 +1,4 @@ -name: DEV Build +name: Service DEV Build run-name: Build and Deploy Marketplace-Service on branch ${{github.ref_name}} by ${{github.actor}} on: @@ -21,8 +21,8 @@ jobs: cache: maven - name: Update configuration env: - APP_PROPERTIES_FILE: 'src/main/resources/application.properties' - GITHUB_TOKEN_FILE: 'src/main/resources/github.token' + APP_PROPERTIES_FILE: './marketplace-service/src/main/resources/application.properties' + GITHUB_TOKEN_FILE: './marketplace-service/src/main/resources/github.token' MONGODB_HOST: ${{ secrets.MONGODB_HOST }} MONGODB_DATABASE: ${{ secrets.MONGODB_DATABASE }} GH_TOKEN: ${{ secrets.GH_TOKEN }} @@ -31,7 +31,7 @@ jobs: sed -i "s/^spring.data.mongodb.database=.*$/spring.data.mongodb.database=$MONGODB_DATABASE/" $APP_PROPERTIES_FILE sed -i '1d;$d' $GITHUB_TOKEN_FILE && echo $GH_TOKEN > $GITHUB_TOKEN_FILE - name: Build with Maven - run: mvn clean package -DskipTests + run: mvn clean package -DskipTests --file ./marketplace-service/pom.xml - name: Prepare deployment directory run: mkdir -p deployment && cp target/*.war deployment/ - name: Copy WAR to Tomcat server diff --git a/.github/workflows/ui-ci-build.yml b/.github/workflows/ui-ci-build.yml index 8a437d1f4..8137daf8b 100644 --- a/.github/workflows/ui-ci-build.yml +++ b/.github/workflows/ui-ci-build.yml @@ -1,4 +1,4 @@ -name: CI Build +name: UI CI Build run-name: Build on branch ${{github.ref_name}} triggered by ${{github.actor}} on: diff --git a/.github/workflows/ui-dev-build.yml b/.github/workflows/ui-dev-build.yml index cb34d8665..506278838 100644 --- a/.github/workflows/ui-dev-build.yml +++ b/.github/workflows/ui-dev-build.yml @@ -1,4 +1,4 @@ -name: Dev Build +name: UI Dev Build run-name: Build and Deploy Marketplace-UI on branch ${{github.ref_name}} by ${{github.actor}} on: