Skip to content
Snippets Groups Projects
Commit 6b2b48f7 authored by Emmanuel Bruno's avatar Emmanuel Bruno
Browse files

adds bfranch name detection for CI.

parent cab046da
No related branches found
No related tags found
No related merge requests found
name: 'Java CI Sonar' name: 'Java CI Sonar'
description: 'Run sonar against Build a Java CI project with maven and Docker' description: 'Run sonar against Build a Java CI project with maven and Docker'
runs: runs:
using: "composite" using: "composite"i
steps: steps:
- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v4.3.2
# build the project in a docker container with a specific maven settings.xml # build the project in a docker container with a specific maven settings.xml
# it uses env variables from github secrets for the credentials # it uses env variables from github secrets for the credentials
# to github, dockerhub and sonar. # to github, dockerhub and sonar.
- name: run sonar with Maven in docker - name: run sonar with Maven in docker
run: ${{ github.action_path }}/mvn.sh sonar:sonar -D sonar.branch.name=${GITHUB_HEAD_REF-${GITHUB_REF##*/}} -DskipTests=true -Dsonar.language=java -Dsonar.report.export.path=sonar-report.json -Dsonar.host.url=${{ env.SONAR_URL }} -Dsonar.login=${{ env.SONAR_TOKEN }} --activate-profiles sonar run: ${{ github.action_path }}/mvn.sh sonar:sonar -D sonar.branch.name=${{ env.GITHUB_REF_SLUG }} -DskipTests=true -Dsonar.language=java -Dsonar.report.export.path=sonar-report.json -Dsonar.host.url=${{ env.SONAR_URL }} -Dsonar.login=${{ env.SONAR_TOKEN }} --activate-profiles sonar
shell: bash shell: bash
- name: Deploy Maven Artifacts - name: Deploy Maven Artifacts
run: ${{ github.action_path }}/mvn.sh deploy run: ${{ github.action_path }}/mvn.sh deploy
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment