-
Notifications
You must be signed in to change notification settings - Fork 207
88 lines (85 loc) · 3.4 KB
/
sonar-scanner.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: sonar-scanner
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonar-scanner_ru:
if: github.repository == 'vbondarevsky/Connector'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
with:
fetch-depth: 0
- name: Extract version
shell: bash
run: echo "##[set-output name=version;]` cat ./src/ru/CommonModules/КоннекторHTTP/Ext/Module.bsl | grep -oP '(?<=Версия:.)[\d|.]*'`"
id: extract_version
- name: Setup sonarqube
uses: warchant/setup-sonar-scanner@v3
- name: Run SonarQube on push
if: github.event_name == 'push'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: sonar-scanner
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
-Dsonar.host.url=https://sonar.openbsl.ru
-Dsonar.branch.name=${GITHUB_REF#refs/heads/}
-Dsonar.projectVersion=${{ steps.extract_version.outputs.version }}
-Dproject.settings=sonar-project.properties_ru
- name: Run SonarQube on pull request
if: github.event_name == 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: sonar-scanner
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
-Dsonar.host.url=https://sonar.openbsl.ru
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }}
-Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }}
-Dsonar.scm.revision=${{ github.event.pull_request.head.sha }}
-Dproject.settings=sonar-project.properties_ru
sonar-scanner_en:
if: github.repository == 'vbondarevsky/Connector'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
with:
fetch-depth: 0
- name: Extract version
shell: bash
run: echo "##[set-output name=version;]` cat ./src/en/CommonModules/HTTPConnector/Ext/Module.bsl | grep -oP '(?<=Version:.)[\d|.]*'`"
id: extract_version
- name: Setup sonarqube
uses: warchant/setup-sonar-scanner@v3
- name: Run SonarQube on push
if: github.event_name == 'push'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: sonar-scanner
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
-Dsonar.host.url=https://sonar.openbsl.ru
-Dsonar.branch.name=${GITHUB_REF#refs/heads/}
-Dsonar.projectVersion=${{ steps.extract_version.outputs.version }}
-Dproject.settings=../myproject.properties
-Dproject.settings=sonar-project.properties_en
- name: Run SonarQube on pull request
if: github.event_name == 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: sonar-scanner
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
-Dsonar.host.url=https://sonar.openbsl.ru
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }}
-Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }}
-Dsonar.scm.revision=${{ github.event.pull_request.head.sha }}
-Dproject.settings=sonar-project.properties_en