-
Notifications
You must be signed in to change notification settings - Fork 127
/
ci.yml
142 lines (137 loc) · 6.04 KB
/
ci.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.
trigger:
batch: true
branches:
include:
- master
- main
- feature/*
- release/*
- hotfix/*
paths:
include:
- cmake-modules/
- eng/
- CMakeLists.txt
- sdk/core
- doc/
- samples/
- .vscode/
- .github/
- '*.md'
- /**/*.md
pr:
branches:
include:
- master
- main
- feature/*
- release/*
- hotfix/*
paths:
include:
- cmake-modules/
- eng/
- CMakeLists.txt
- sdk/core
- doc/
- samples/
- .github/
- '*.md'
- /**/*.md
extends:
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
ServiceDirectory: core
# CI has static code analysis disabled, while LiveTest will have it enabled
# In the case of changes to core we want to re-run all CI tests for all
# libraries to check for potential regressions everywhere.
CtestRegex: azure-core.|json-test
LiveTestCtestRegex: azure-core.|json-test
LiveTestTimeoutInMinutes: 90 # default is 60 min. We need a little longer on worst case for Win+jsonTests
LineCoverageTarget: 88
BranchCoverageTarget: 68
# PreTestSteps:
# - pwsh: |
# docker build -t squid-local $(Build.SourcesDirectory)/sdk/core/azure-core/test/ut/proxy_tests/localproxy
# docker build -t squid-local.passwd $(Build.SourcesDirectory)/sdk/core/azure-core/test/ut/proxy_tests/localproxy.passwd
# $(Build.SourcesDirectory)/sdk/core/azure-core/test/ut/proxy_tests/runproxy.ps1
# displayName: Launch Linux Docker container proxy
# # If we're on Ubuntu and running proxy tests, build and launch a local squid proxy
# condition: and(succeeded(), contains(variables['Agent.OS'], 'linux'), variables.RunProxyTests, contains(variables.CmakeArgs, 'BUILD_TESTING=ON'))
#
# - pwsh: eng/scripts/Install-WSL.ps1
# displayName: Install WSL on Windows hosts when proxy tests are enabled..
# condition: and(succeeded(), contains(variables['Agent.OS'], 'windows'), variables.RunProxyTests, contains(variables.CmakeArgs, 'BUILD_TESTING=ON'))
#
# - pwsh: ./run_wsl_proxy.ps1
# displayName: Launch WSL Proxy Server.
# workingDirectory: $(Build.SourcesDirectory)/sdk/core/azure-core/test/ut/proxy_tests
# condition: and(succeeded(), contains(variables['Agent.OS'], 'windows'), variables.RunProxyTests, contains(variables.CmakeArgs, 'BUILD_TESTING=ON'))
#
# # Verify that the proxy servers are running locally whenever we're expected to run proxy tests.
# - pwsh: ./verify_proxy.ps1
# workingDirectory: $(Build.SourcesDirectory)/sdk/core/azure-core/test/ut/proxy_tests
# displayName: Verify Proxy Server Working Correctly.
# condition: and(succeeded(), variables.RunProxyTests, contains(variables.CmakeArgs, 'BUILD_TESTING=ON'))
# PostTestSteps:
# - pwsh: |
# docker ps -q -f ancestor=azsdkengsys.azurecr.io/mirror/ubuntu/squid | ForEach-Object { `
# docker stop $_ `
# }
# displayName: Shutdown Squid Proxy.
# condition: and(variables.RunProxyTests, contains(variables.CmakeArgs, 'BUILD_TESTING=ON'), contains(variables['OSVmImage'], 'linux'))
Artifacts:
- Name: azure-core
Path: azure-core
VcpkgPortName: azure-core-cpp
- Name: azure-core-tracing-opentelemetry
Path: azure-core-tracing-opentelemetry
VcpkgPortName: azure-core-tracing-opentelemetry-cpp
- Name: azure-core-amqp
Path: azure-core-amqp
VcpkgPortName: azure-core-amqp-cpp
# Since Azure Core will run all service's tests, it requires all the expected env vars from services
TestEnv:
# Key Vault
- Name: AZURE_KEYVAULT_URL
Value: "https://non-real-account.vault.azure.net"
- Name: AZURE_KEYVAULT_HSM_URL
Value: "https://non-real-account.managedhsm.azure.net/"
# Key Vault & Identity
- Name: AZURE_TENANT_ID
Value: "33333333-3333-3333-3333-333333333333"
- Name: AZURE_CLIENT_ID
Value: "non-real-client"
- Name: AZURE_CLIENT_SECRET
Value: "non-real-secret"
# Storage
- Name: AAD_TENANT_ID
Value: "33333333-3333-3333-3333-333333333333"
- Name: AAD_CLIENT_ID
Value: "non-real-client"
- Name: AAD_CLIENT_SECRET
Value: "non-real-secret"
- Name: STANDARD_STORAGE_CONNECTION_STRING
Value: "DefaultEndpointsProtocol=https;AccountName=notReal;AccountKey=3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333;EndpointSuffix=core.windows.net"
- Name: ADLS_GEN2_CONNECTION_STRING
Value: "DefaultEndpointsProtocol=https;AccountName=notReal;AccountKey=3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333;EndpointSuffix=core.windows.net"
- Name: PREMIUM_FILE_CONNECTION_STRING
Value: "DefaultEndpointsProtocol=https;AccountName=notReal;AccountKey=3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333;EndpointSuffix=core.windows.net"
# Attestation
- Name: LOCATION_SHORT_NAME
Value: "wus"
- Name: ATTESTATION_ISOLATED_URL
Value: https://NotRealAttestationInstanceiso.wus.attest.azure.net
- Name: ATTESTATION_AAD_URL
Value: https://NotRealAttestationInstanceaad.wus.attest.azure.net
# EventHubs
- Name: CHECKPOINTSTORE_STORAGE_CONNECTION_STRING
Value: "DefaultEndpointsProtocol=https;AccountName=notReal;AccountKey=3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333;EndpointSuffix=core.windows.net"
- Name: CHECKPOINTSTORE_STORAGE_URL
Value: "https://non-real-account.blob.core.windows.net/"
CMakeTestOptions:
- Name: Default
Value: ''
- Name: Test
Value: '-DBUILD_TESTING=ON'