6
6
trigger : none
7
7
8
8
pool :
9
- vmImage : ' Ubuntu 16.04'
9
+ vmImage : " Ubuntu 16.04"
10
10
11
11
variables :
12
- GOVERSION : ' 1.13.10'
13
- System.Debug : false
14
-
15
- jobs :
16
- - job : setup
17
- steps :
18
- - script : ./build/doc-only-build.sh
19
- name : BUILD
20
- displayName : ' Check Doc Only Build'
21
-
22
- - job : test
23
- dependsOn : setup
24
- condition : eq(dependencies.setup.outputs['BUILD.DOCS_ONLY'], 'false')
25
- steps :
26
- - task : GoTool@0
27
- inputs :
28
- version : ' $(GOVERSION)'
29
- - script : build/azure-pipelines.setup-go-workspace.sh
30
- displayName : ' Set up the Go workspace'
31
-
32
- - script : |
33
- make verify
34
- workingDirectory: '$(System.DefaultWorkingDirectory)'
35
- displayName: 'Verify'
36
-
37
- - script : |
38
- make test-unit
39
- workingDirectory: '$(System.DefaultWorkingDirectory)'
40
- displayName: 'Unit Test'
41
-
42
- - job : compile
43
- dependsOn : setup
44
- condition : eq(dependencies.setup.outputs['BUILD.DOCS_ONLY'], 'false')
45
- steps :
46
- - task : GoTool@0
47
- inputs :
48
- version : ' $(GOVERSION)'
49
- - script : build/azure-pipelines.setup-go-workspace.sh
50
- displayName : ' Set up the Go workspace'
51
-
52
- - script : |
53
- make xbuild-all
54
- workingDirectory: '$(System.DefaultWorkingDirectory)'
55
- displayName: 'Cross Compile'
56
-
57
- - job : validate_example_bundles
58
- dependsOn : setup
59
- condition : eq(dependencies.setup.outputs['BUILD.DOCS_ONLY'], 'false')
60
- steps :
61
- - task : GoTool@0
62
- inputs :
63
- version : ' $(GOVERSION)'
64
- - script : build/azure-pipelines.setup-go-workspace.sh
65
- displayName : ' Set up the Go workspace'
66
-
67
- - script : |
68
- make build
69
- workingDirectory: '$(System.DefaultWorkingDirectory)'
70
- displayName: 'Build'
71
-
72
- - script : |
73
- sudo make ajv
74
- make build-bundle validate-bundle
75
- workingDirectory: '$(System.DefaultWorkingDirectory)'
76
- displayName: 'Validate Example Bundles'
77
-
78
- - job : integration_test
79
- dependsOn : setup
80
- condition : eq(dependencies.setup.outputs['BUILD.DOCS_ONLY'], 'false')
81
- steps :
82
- - task : GoTool@0
83
- inputs :
84
- version : ' $(GOVERSION)'
85
- - script : build/azure-pipelines.setup-go-workspace.sh
86
- displayName : ' Set up the Go workspace'
87
-
88
- - script : |
89
- make build
90
- workingDirectory: '$(System.DefaultWorkingDirectory)'
91
- displayName: 'Build'
92
-
93
- - script : ./build/run-integration-tests.sh
94
- workingDirectory : ' $(System.DefaultWorkingDirectory)'
95
- displayName : ' Integration Test'
96
-
97
- - job : cli_test
98
- dependsOn : setup
99
- condition : eq(dependencies.setup.outputs['BUILD.DOCS_ONLY'], 'false')
100
- steps :
101
- - task : GoTool@0
102
- inputs :
103
- version : ' $(GOVERSION)'
104
- - script : build/azure-pipelines.setup-go-workspace.sh
105
- displayName : ' Set up the Go workspace'
106
-
107
- - script : |
108
- make build
109
- workingDirectory: '$(System.DefaultWorkingDirectory)'
110
- displayName: 'Build'
111
-
112
- - script : |
113
- make test-cli
114
- workingDirectory: '$(System.DefaultWorkingDirectory)'
115
- displayName: 'CLI Test'
12
+ GOVERSION : " 1.13.10"
13
+
14
+ stages :
15
+ - stage : Setup
16
+ jobs :
17
+ - job : pr_type
18
+ displayName : " Determine PR Type"
19
+ steps :
20
+ - bash : ./build/doc-only-build.sh
21
+ name : BUILD
22
+ displayName : " Is Doc Only?"
23
+
24
+ - stage : Validate
25
+ dependsOn : Setup
26
+ condition : eq(dependencies.Setup.outputs['pr_type.BUILD.DOCS_ONLY'], 'false')
27
+ jobs :
28
+ - job : build
29
+ displayName : " Native Compile"
30
+ steps :
31
+ - task : GoTool@0
32
+ displayName : " Set Go Version"
33
+ inputs :
34
+ version : " $(GOVERSION)"
35
+ - script : go run mage.go ConfigureAgent
36
+ displayName : " Configure Agent"
37
+ - bash : make build
38
+ displayName : " Native Build"
39
+ - task : PublishPipelineArtifact@0
40
+ displayName : " Publish Native Binaries"
41
+ inputs :
42
+ targetPath : $(System.DefaultWorkingDirectory)/bin
43
+ archiveFilePatterns : " **"
44
+ artifactName : " build-bin"
45
+ - job : xbuild
46
+ displayName : " Cross Compile"
47
+ steps :
48
+ - task : GoTool@0
49
+ displayName : " Set Go Version"
50
+ inputs :
51
+ version : " $(GOVERSION)"
52
+ - script : go run mage.go ConfigureAgent
53
+ displayName : " Configure Agent"
54
+ - bash : make xbuild-all
55
+ displayName : " Cross Compile"
56
+ - task : PublishPipelineArtifact@0
57
+ displayName : " Publish Release Binaries"
58
+ inputs :
59
+ targetPath : $(System.DefaultWorkingDirectory)/bin
60
+ archiveFilePatterns : " **"
61
+ artifactName : " xbuild-bin"
62
+ - job : unit_test
63
+ displayName : " Unit Test"
64
+ steps :
65
+ - task : GoTool@0
66
+ displayName : " Set Go Version"
67
+ inputs :
68
+ version : " $(GOVERSION)"
69
+ - script : go run mage.go ConfigureAgent
70
+ displayName : " Configure Agent"
71
+ - bash : make verify
72
+ displayName : " Verify"
73
+ - bash : make test-unit
74
+ displayName : " Unit Test"
75
+ - job : integration_test
76
+ displayName : " Integration Test"
77
+ dependsOn : build
78
+ steps :
79
+ - task : DownloadPipelineArtifact@2
80
+ displayName : " Download Bin"
81
+ inputs :
82
+ source : current
83
+ artifact : build-bin
84
+ path : bin
85
+ - task : GoTool@0
86
+ displayName : " Set Go Version"
87
+ inputs :
88
+ version : " $(GOVERSION)"
89
+ - script : go run mage.go ConfigureAgent SetBinExecutable
90
+ displayName : " Configure Agent"
91
+ - bash : ./build/run-integration-tests.sh
92
+ displayName : " Integration Test"
93
+ - job : build_examples
94
+ displayName : " Build Examples"
95
+ dependsOn : build
96
+ steps :
97
+ - task : DownloadPipelineArtifact@2
98
+ displayName : " Download Native Porter Binaries"
99
+ inputs :
100
+ source : current
101
+ artifact : build-bin
102
+ path : bin
103
+ - script : go run mage.go SetBinExecutable
104
+ displayName : " Setup Bin"
105
+ - bash : |
106
+ set -e
107
+ sudo make ajv
108
+ make build-bundle validate-bundle
109
+ displayName: "Validate Examples"
110
+ - job : e2e_test
111
+ displayName : " Run E2E tests on"
112
+ dependsOn : xbuild
113
+ strategy :
114
+ matrix :
115
+ windows :
116
+ poolName : " windows"
117
+ vmImage : " "
118
+ linux :
119
+ poolName : " Azure Pipelines"
120
+ vmImage : " ubuntu-latest"
121
+ pool :
122
+ name : $(poolName)
123
+ vmImage : $(vmImage)
124
+ steps :
125
+ - task : DownloadPipelineArtifact@2
126
+ displayName : " Download Cross-Compiled Porter Binaries"
127
+ inputs :
128
+ source : current
129
+ artifact : xbuild-bin
130
+ path : bin
131
+ - task : GoTool@0
132
+ displayName : " Set Go Version"
133
+ inputs :
134
+ version : " $(GOVERSION)"
135
+ - script : go run mage.go ConfigureAgent UseXBuildBinaries
136
+ displayName : " Configure Agent"
137
+ - script : mage TestE2E
138
+ displayName : " Run E2E Tests"
0 commit comments