forked from Trustie/forgeplus
Merge pull request 'update sonar' (#373) from KingChan/forgeplus:standalone_develop into standalone_develop
This commit is contained in:
commit
6d51061f49
|
@ -46,33 +46,31 @@ class Api::V1::SonarqubesController < Api::V1::BaseController
|
|||
filepath: '.gitea/workflows/SonarScanner.yaml',
|
||||
branch: params[:branch],
|
||||
new_branch: nil,
|
||||
content: "
|
||||
name: Sonar Scanner
|
||||
jobs:
|
||||
sonarqube:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: #{checkout_url}
|
||||
with:
|
||||
# Disabling shallow clones is recommended for improving the relevancy of reporting
|
||||
fetch-depth: 1
|
||||
single-branch: true
|
||||
- name: curl doxygen
|
||||
run: |
|
||||
curl -X GET #{doxygen_url}/generate?repo=#{@project.repository.url}
|
||||
|
||||
- name: new properties
|
||||
run: |
|
||||
cat <<EOF > sonar-project.properties
|
||||
#{sonar_content}
|
||||
EOF
|
||||
|
||||
- name: SonarQube Scan
|
||||
uses: #{scanner_url}
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
|
||||
",
|
||||
content: <<-YAML
|
||||
name: Sonar Scanner
|
||||
jobs:
|
||||
sonarqube:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: #{checkout_url}
|
||||
with:
|
||||
fetch-depth: 1
|
||||
single-branch: true
|
||||
- name: curl doxygen
|
||||
run: |
|
||||
curl -X GET #{doxygen_url}/generate?repo=#{@project.repository.url}
|
||||
- name: new properties
|
||||
run: |
|
||||
cat <<EOF > sonar-project.properties
|
||||
#{sonar_content}
|
||||
EOF
|
||||
- name: SonarQube Scan
|
||||
uses: #{scanner_url}
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
|
||||
YAML
|
||||
,
|
||||
message: 'Add .gitea/workflows/SonarScanner.yaml',
|
||||
committer: {
|
||||
email: @owner.mail,
|
||||
|
|
|
@ -39,6 +39,6 @@ module SonarService
|
|||
lines << "sonar.cxx.errorRecoveryEnabled=true"
|
||||
end
|
||||
|
||||
lines.join("\n")
|
||||
lines
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue