Skip to content

Commit

Permalink
FDP-2756: Setting maven options if build containers
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleHoffman committed Dec 6, 2024
1 parent ea57b85 commit 3ea01b0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ jobs:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Build
run: mvn -T1C -B verify
- name: Sonarcloud analyse
- name: Set maven options
id: maven_options
if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers')
run: echo "-DskipTestJarWithDependenciesAssembly=false" >> $GITHUB_OUTPUT
- name: Build and analyse
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -T1C -B org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=gxf -Dsonar.projectKey=OSGP_open-smart-grid-platform
run: mvn -T1C -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=gxf -Dsonar.projectKey=OSGP_open-smart-grid-platform ${{ steps.maven_options.outputs }}
- name: Staging war files
run: mkdir staging && find . -name \*.war -not -path './staging/*' -exec cp -prv --parents '{}' 'staging/' ';'
if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers')
Expand Down

0 comments on commit 3ea01b0

Please sign in to comment.