Skip to content

Commit

Permalink
Create build.yml (#2646)
Browse files Browse the repository at this point in the history
* Create build.yml
* Create sonar-project.properties
  • Loading branch information
jlind23 authored May 10, 2023
1 parent fe80178 commit 662fb46
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Build
on: workflow_dispatch
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
19 changes: 19 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
sonar.organization=elastic-1
sonar.projectKey=elastic-agent
sonar.host.url=https://sonarcloud.io

sonar.sources=.
sonar.exclusions=**/*_test.go, .git/**, dev-tools/**, /magefile.go, changelog/**, _meta/**, deploy/**, docs/**, img/**
sonar.tests=.
sonar.test.inclusions=**/*_test.go

sonar.go.tests.reportPaths=build/TEST-go-unit.out.json
sonar.go.coverage.reportPaths=**/build/TEST-*.cov
sonar.go.exclusions=**/vendor/**,**/*_mock.go

sonar.sourceEncoding=UTF-8

#Prevent C analysis
sonar.c.file.suffixes=-
sonar.cpp.file.suffixes=-
sonar.objc.file.suffixes=-

0 comments on commit 662fb46

Please sign in to comment.