-
Notifications
You must be signed in to change notification settings - Fork 1
/
bc15-pipeline-single-app.yml
95 lines (75 loc) · 2.04 KB
/
bc15-pipeline-single-app.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
89
90
91
92
93
94
95
name: $(Build.BuildId)
variables:
AppVersion: '1.0.[yyyyWW].*'
MainAppFolderName: '<Main App Folder name>'
# $(licenseFile) is defined outside of this file
BCLicenseFile: $(licenseFile)
steps:
# Create Docker container
- task: ALOpsDockerStart@1
inputs:
docker_image: mcr.microsoft.com/businesscentral/sandbox
docker_pull: false
- task: ALOpsDockerWait@1
inputs:
search_string: 'Ready for connections!'
# Import developer license
- task: ALOpsLicenseImport@1
displayName: 'ALOps License Import'
inputs:
usedocker: true
license_path: $(BCLicenseFile)
# Publish Test App packages first before compilation
- task: ALOpsAppPublish@1
displayName: 'Publish Test App packages'
inputs:
usedocker: true
skip_verification: true
installaltesttool: true
install_al_app_names: |
Tests-TestLibraries
System Application Test
System Application Test Library
Any
Library Assert
Test Runner
# Compile Main App
- task: ALOpsAppCompiler@1
displayName: 'Compile Main App'
inputs:
usedocker: true
nav_app_version: $(AppVersion)
failed_on_warnings: true
targetproject: ./$(MainAppFolderName)/app.json
# Publish Main App
- task: ALOpsAppPublish@1
displayName: 'Publish Main App'
inputs:
usedocker: true
nav_artifact_app_filter: '*.app'
skip_verification: true
# Run automated tests
- task: ALOpsAppTest@1
displayName: 'Run TestSuite'
inputs:
usedocker: true
show_available_tests: false
import_testtoolkit: false
installaltesttool: false
testpage: '130455'
failed_test_action: Warning
continueOnError: true
# Publish Test Results
- task: PublishTestResults@2
displayName: 'Publish Test Results **/TestResults.xml'
inputs:
testResultsFormat: XUnit
testResultsFiles: '**/TestResults.xml'
testRunTitle: 'BC Test Results: $(Build.BuildId)'
# Remove Docker container
- task: ALOpsDockerRemove@1
displayName: 'Remove Docker Container'
inputs:
usedocker: true
enabled: true
condition: always()