Skip to content

Commit

Permalink
FDP-94: gradle/sonar fix
Browse files Browse the repository at this point in the history
Signed-off-by: Sander Verbruggen <[email protected]>
  • Loading branch information
sanderv authored and jasperkamerling committed Nov 15, 2023
1 parent bd3d8c4 commit 6de6676
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
30 changes: 19 additions & 11 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
# Copyright 2023 Alliander N.V.
# SPDX-FileCopyrightText: Contributors to the GXF project
#
# SPDX-License-Identifier: Apache-2.0

name: Gradle Pipeline
name: Build Pipeline

on:
push:
branches: [ "main" , "develop" ]
branches: [ "main" ]
tags: [ "v**" ]
pull_request:
branches: [ "main", "develop" ]
branches: [ "main" ]

jobs:
build:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -21,17 +24,22 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/gradle-build-action@v2.8.1
- name: Setup Gradle to generate and submit dependency graphs
uses: gradle/gradle-build-action@v2.9.0
with:
arguments: build integrationTest bootBuildImage sonar
dependency-graph: generate-and-submit
- name: Build with Gradle
run: ./gradlew build integrationTest bootBuildImage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run sonar analysis with Gradle
run: ./gradlew testCodeCoverageReport integrationTestCodeCoverageReport sonar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Publish Docker image
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' || github.ref_type == 'tag'
uses: gradle/[email protected]
with:
arguments: bootBuildImage -PpublishImage
if: github.ref == 'refs/heads/main' || github.ref_type == 'tag'
run: ./gradlew bootBuildImage -PpublishImage
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ subprojects {
apply(plugin = "io.spring.dependency-management")
apply(plugin = "eclipse")
apply(plugin = "org.jetbrains.kotlin.plugin.jpa")
apply(plugin = "jacoco")
apply(plugin = "jacoco-report-aggregation")

group = "org.gxf.soap-bridge"
version = rootProject.version
Expand Down

0 comments on commit 6de6676

Please sign in to comment.