Skip to content

Commit

Permalink
ci: run Sonar pipeline in macos
Browse files Browse the repository at this point in the history
This should decrease the pipeline's execution time

Signed-off-by: Marc Nuri <marc@marcnuri.com>
  • Loading branch information
manusa committed Apr 30, 2024
1 parent c435a0f commit b46c5f1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
name: Sonar Scanner

env:
MAVEN_ARGS: -B -C -V -ntp -Dhttp.keepAlive=false -e
MAVEN_OPTIONS: -B -C -V -ntp -Dhttp.keepAlive=false -e

on:
push:
Expand All @@ -40,7 +40,7 @@ permissions:
jobs:
sonar:
name: Sonar
runs-on: ubuntu-latest
runs-on: macos-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_LOGIN_TOKEN: ${{ secrets.SONAR_LOGIN_TOKEN }}
Expand All @@ -55,5 +55,5 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
- name: Maven Sonar
run: ./mvnw ${MAVEN_ARGS} clean install sonar:sonar -Psonar
- name: Sonar
run: make clean sonar
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

MAVEN_OPTIONS=
MAVEN_OPTIONS ?=

.PHONY: clean-java
clean-java:
Expand All @@ -26,3 +26,7 @@ clean: clean-java
.PHONY: generate-model
generate-model:
cd kubernetes-model-generator && ./generateModel.sh

.PHONY: sonar
sonar:
mvn $(MAVEN_OPTIONS) clean install sonar:sonar -Psonar

0 comments on commit b46c5f1

Please sign in to comment.