Skip to content

Commit

Permalink
Merge pull request #4 from soramitsu/update/17.0
Browse files Browse the repository at this point in the history
Update sonar 10.4
  • Loading branch information
C4tWithShell authored Apr 18, 2024
2 parents babe2f1 + e12b77e commit db87863
Show file tree
Hide file tree
Showing 83 changed files with 557 additions and 972 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ SONARQUBE_VERSION=latest
DOCKERFILE=Dockerfile

# The version of the plugin to include in the image
PLUGIN_VERSION=1.16.1-SNAPSHOT
PLUGIN_VERSION=1.17.0
38 changes: 18 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Init
id: init
Expand All @@ -45,10 +45,10 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Set up Java ${{ matrix.java }}
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
java-package: jdk
Expand All @@ -68,7 +68,7 @@ jobs:
-
name: Archive artifact
if: success() && matrix.java == '17'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: snapshot
path: build/libs/*.jar
Expand All @@ -77,22 +77,17 @@ jobs:
needs: prep
if: github.event_name != 'pull_request' && needs.prep.outputs.release == 'true'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java:
- 17
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Java ${{ matrix.java }}
uses: actions/setup-java@v3
name: Set up Java
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
java-version: 17
java-package: jdk
distribution: 'zulu'
-
Expand Down Expand Up @@ -123,7 +118,7 @@ jobs:
-
name: Archive artifact
if: success()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: release
path: build/libs/*.jar
Expand All @@ -146,12 +141,12 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 17
java-package: jdk
Expand All @@ -165,11 +160,12 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
-
name: Sonar
name: Test and Sonar
if: ${{ env.SONAR_TOKEN != null }}
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
./gradlew sonarqube \
./gradlew test sonar \
-Dsonar.gradle.skipCompile=true \
-Dsonar.pullrequest.provider=github \
-Dsonar.pullrequest.github.repository=${{ github.repository }} \
-Dsonar.host.url=https://sonarcloud.io \
Expand All @@ -178,15 +174,17 @@ jobs:
-Dsonar.pullrequest.key=${{ github.event.number }} \
-Dsonar.pullrequest.base=${{ github.base_ref }}
elif [ "${{ needs.prep.outputs.release }}" = 'true' ]; then
./gradlew sonarqube \
./gradlew test sonar \
-Dsonar.gradle.skipCompile=true \
-Dsonar.pullrequest.provider=github \
-Dsonar.pullrequest.github.repository=${{ github.repository }} \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.organization=${SONAR_ORG_KEY} \
-Dsonar.projectKey=${SONAR_PROJECT_KEY} \
-Dsonar.projectVersion=${{ needs.prep.outputs.version }}
else
./gradlew sonarqube \
./gradlew test sonar \
-Dsonar.gradle.skipCompile=true \
-Dsonar.pullrequest.provider=github \
-Dsonar.pullrequest.github.repository=${{ github.repository }} \
-Dsonar.host.url=https://sonarcloud.io \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG SONARQUBE_VERSION

FROM gradle:7.3.3-jdk11-alpine as builder
FROM gradle:8.5-jdk17-alpine as builder

COPY . /home/build/project
WORKDIR /home/build/project
Expand Down
Loading

0 comments on commit db87863

Please sign in to comment.