-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sander Verbruggen <[email protected]>
- Loading branch information
1 parent
bd3d8c4
commit 6de6676
Showing
2 changed files
with
21 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
@@ -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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters