forked from astrizhachuk/epf-transmitter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
32 lines (30 loc) · 1.03 KB
/
.gitlab-ci.yml
File metadata and controls
32 lines (30 loc) · 1.03 KB
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
.job_image: &job_image
image:
name: ${CI_REGISTRY}/devops/sonar-scanner-cli:latest
entrypoint: [""]
tags:
- docker
push:
stage: test
<<: *job_image
script: sonar-scanner
-D"sonar.host.url=${SONAR_SERVER}"
-D"sonar.projectVersion=$(grep -oPm1 "(?<=<version>)[^<]+" GitlabServices/src/Configuration/Configuration.mdo)"
-D"sonar.login=${SONAR_LOGIN}"
-D"sonar.branch.name=${CI_COMMIT_REF_NAME}"
rules:
- if: '$CI_COMMIT_REF_NAME == "master"'
when: always
merge_request:
stage: test
<<: *job_image
script: sonar-scanner
-D"sonar.host.url=${SONAR_SERVER}"
-D"sonar.projectVersion=$(grep -oPm1 "(?<=<version>)[^<]+" GitlabServices/src/Configuration/Configuration.mdo)"
-D"sonar.login=${SONAR_LOGIN}"
-D"sonar.pullrequest.key=${CI_MERGE_REQUEST_IID}"
-D"sonar.pullrequest.branch=${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}"
-D"sonar.pullrequest.base=${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}"
rules:
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"'
when: always