-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
73 lines (54 loc) · 2.19 KB
/
azure-pipelines.yml
File metadata and controls
73 lines (54 loc) · 2.19 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
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
variables:
- name: SONAR_PROJECT_KEY
value: 'com.mobven.ios.mmb.sb'
- name: SONAR_PROJECT_NAME
value: 'MMB_Kit'
- name: SONAR_KEY
value: '77e23545c9e2f20f96a93b0ffd8b83811471fcb3'
- name: SONAR_URL
value: 'http://farm.mobven.com:9000'
- name: COVERAGE_PATH
value: '$(Pipeline.Workspace)/s/sonarqube-generic-coverage.xml'
- name: ts
value: ' '
- name: PROJECT_ICON
value: 'https://www.amchamksv.org/wp-content/uploads/2018/05/bkt.png'
- name: SLACK_SH
value: '/Users/mobven/Desktop/slack-message-broker.sh'
- name: SLACK_DATA
value: '$(SONAR_PROJECT_NAME) $(Build.BuildNumber) https://www.youtube.com/watch?v=OB09mmZvlsw "Onur POLAT" $(Build.SourceBranch) $(PROJECT_ICON)'
- group: common
pool: 'Default'
steps:
- script: |
bash $(SLACK_SH) Preparation 0 $(SLACK_DATA) 1> /Users/mobven/Desktop/test.txt 2>&1 </dev/null
displayName: Preparation
- task: VariableSetTask@1
inputs:
VariableName: 'ts'
Value: '$(cat /Users/mobven/Desktop/test.txt)'
IsSecret: false
- script: |
bash $(SLACK_SH) Build $(ts) $(SLACK_DATA)
rm -rf sonar-reports
rm -rf reports/*
displayName: 'Build'
- script: |
bash $(SLACK_SH) Test $(ts) $(SLACK_DATA)
xcodebuild -scheme MobKitCore -sdk iphonesimulator -derivedDataPath Build/ -destination 'platform=iOS Simulator,name=iPhone 11,OS=13.4' test -enableCodeCoverage YES
displayName: 'Test'
- script: |
bash $(SLACK_SH) 'Code Coverage' $(ts) $(SLACK_DATA)
bash xccov-to-sonarqube-generic.sh Build/Logs/Test/*.xcresult/ > sonarqube-generic-coverage.xml
displayName: 'Code Coverage'
- script: |
bash $(SLACK_SH) 'Quality Check' $(ts) $(SLACK_DATA)
sonar-scanner -Dsonar.host.url=$(SONAR_URL) -Dsonar.login=$(SONAR_KEY) -Dsonar.projectKey=$(SONAR_PROJECT_KEY) -Dsonar.projectName=$(SONAR_PROJECT_NAME) -Dsonar.coverageReportPaths=$(COVERAGE_PATH) -Dsonar.cfamily.build-wrapper-output.bypass=true
displayName: 'Quality Check'
- script: |
bash $(SLACK_SH) 'Quality Gate' $(ts) $(SLACK_DATA)
# bash quality-gates-checker.sh $(SONAR_KEY) $(SONAR_URL) $(Pipeline.Workspace)/s/.scannerwork/report-task.txt
displayName: 'Quality Gate'
- script: |
bash $(SLACK_SH) Success $(ts) $(SLACK_DATA)
displayName: Finish