* All eng/ folder changes necessary to enable 1es-templates for the azure-sdk-for-cpp
* Includes updates to all ci.yml files to reflect new syntax requirements from 1es-template changes to archetype-sdk-client
This commit is contained in:
Scott Beddall 2024-03-12 15:20:45 -07:00 коммит произвёл GitHub
Родитель 4affaf7b6a
Коммит 3658df22db
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
24 изменённых файлов: 427 добавлений и 300 удалений

10
.vscode/cspell.json поставляемый
Просмотреть файл

@ -112,6 +112,7 @@
"Ekus",
"EKUs",
"Entra",
"espt",
"euap",
"Favicon",
"fibonacci",
@ -144,10 +145,15 @@
"Kouhei",
"lcov",
"LIBCMTD",
"LINUXNEXTVMIMAGE",
"LINUXOS",
"LINUXVMIMAGE",
"Lohmann",
"LPBYTE",
"LPSTR",
"LPWSTR",
"MACVMIMAGE",
"mkdirp",
"MAKELANGID",
"mbedtls",
"mchelnokov",
@ -191,6 +197,7 @@
"pkcs",
"Pkcs",
"pscredential",
"psscriptanalyzer",
"PUCHAR",
"PVOID",
"pwsh",
@ -252,6 +259,9 @@
"westus",
"Wextra",
"Wgnu",
"WINDOWSOS",
"WINDOWSPREVIOUSVMIMAGE",
"WINDOWSVMIMAGE",
"Wunused",
"xbox",
"Xclang",

Просмотреть файл

@ -52,7 +52,7 @@ parameters:
default: true
jobs:
- template: /eng/common/pipelines/templates/jobs/archetype-sdk-tests-generate.yml
- template: /eng/common/pipelines/templates/jobs/generate-job-matrix.yml
parameters:
GenerateJobName: ${{ parameters.JobName }}_generate_matrix
MatrixConfigs:
@ -61,6 +61,8 @@ jobs:
Selection: all
GenerateVMJobs: true
JobTemplatePath: /eng/pipelines/templates/jobs/ci.tests.yml
OsVmImage: $(LINUXVMIMAGE)
Pool: $(LINUXPOOL)
AdditionalParameters:
DisplayName: ${{ parameters.JobName }}
Artifacts: ${{ parameters.Artifacts }}
@ -82,8 +84,9 @@ jobs:
- job:
displayName: Create API Review for ${{ artifact.name }}
pool:
name: azsdk-pool-mms-win-2022-general
vmImage: windows-2022
name: $(WINDOWSPOOL)
image: $(WINDOWSVMIMAGE)
os: windows
steps:
- task: Powershell@2
inputs:
@ -141,8 +144,9 @@ jobs:
- job: GenerateReleaseArtifacts
pool:
name: azsdk-pool-mms-win-2022-general
vmImage: windows-2022
name: $(WINDOWSPOOL)
image: $(WINDOWSVMIMAGE)
os: windows
variables:
VCPKG_DEFAULT_TRIPLET: 'x64-windows-static'
Package.EnableSBOMSigning: true
@ -328,17 +332,14 @@ jobs:
continueOnError: true
condition: and(succeeded(), eq(variables['VerifyChangeLogForRelease'], 'true'))
- task: PublishPipelineArtifact@1
inputs:
artifactName: packages
path: $(Build.ArtifactStagingDirectory)/packages
- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
parameters:
ArtifactPath: $(Build.ArtifactStagingDirectory)/packages
ArtifactName: packages
# After all docs artifacts are generated publish docs artifacts
- task: PublishPipelineArtifact@1
inputs:
artifactName: docs
path: $(Build.ArtifactStagingDirectory)/docs
- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
parameters:
ArtifactPath: $(Build.ArtifactStagingDirectory)/docs
ArtifactName: docs
- template: /eng/common/pipelines/templates/steps/eng-common-workflow-enforcer.yml
- template: /eng/pipelines/templates/steps/generate-and-publish-sbom.yml

Просмотреть файл

@ -55,10 +55,12 @@ parameters:
- name: DisplayName
type: string
default: Validate
- name: OSName
type: string
default: ''
jobs:
- job:
- job: ${{ parameters.DisplayName }}_${{ parameters.OSName }}
displayName: ${{ parameters.DisplayName }}
dependsOn: ${{ parameters.DependsOn }}
condition: and(succeededOrFailed(), ne(variables['Skip.Test'], 'true'), ne(${{ parameters.Matrix }}, '{}'))
@ -66,8 +68,14 @@ jobs:
matrix: $[ ${{ parameters.Matrix }} ]
maxParallel: 12
pool:
vmImage: $(OSVmImage)
name: $(Pool)
# 1es pipeline templates converts `image` to demands: ImageOverride under the hood
# which is incompatible with image selection in the default non-1es hosted pools
${{ if eq(parameters.OSName, 'macOS') }}:
vmImage: $(OSVmImage)
${{ else }}:
image: $(OSVmImage)
os: ${{ parameters.OSName }}
variables:
- name: CMOCKA_XML_FILE
value: "%g-test-results.xml"
@ -99,7 +107,7 @@ jobs:
steps:
- template: /eng/common/pipelines/templates/steps/verify-agent-os.yml
parameters:
AgentImage: $(OsVmImage)
AgentImage: ${{ parameters.OSName }}
- template: /eng/pipelines/templates/steps/fix-1es-image-apt-azure-sources.yml
@ -320,23 +328,10 @@ jobs:
condition: eq(variables['PublishMapFiles'], 'true')
displayName: Stage map files
- task: PublishPipelineArtifact@1
inputs:
artifactName: map-files-$(MapFileArtifactName)
path: $(Build.ArtifactStagingDirectory)
condition: eq(variables['PublishMapFiles'], 'true')
displayName : Publish map file artifacts
- pwsh: |
$artifactName = "$(Agent.JobName)"
$parts = $artifactName -split ' '
if ($parts[1]) {
$artifactName = $parts[1]
}
Write-Host "##vso[task.setvariable variable=BomArtifactName;]$artifactName"
displayName: Set bom file artifact name
condition: succeededOrFailed()
- template: /eng/pipelines/templates/steps/generate-and-publish-sbom.yml
- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
parameters:
BomArtifactName: $(BomArtifactName)
ArtifactPath: $(Build.ArtifactStagingDirectory)
ArtifactName: map-files-$(MapFileArtifactName)
CustomCondition: eq(variables['PublishMapFiles'], 'true')
SbomEnabled: false

Просмотреть файл

@ -19,7 +19,7 @@ parameters:
default: 120
jobs:
- template: /eng/common/pipelines/templates/jobs/archetype-sdk-tests-generate.yml
- template: /eng/common/pipelines/templates/jobs/generate-job-matrix.yml
parameters:
MatrixConfigs:
- Name: base
@ -27,13 +27,15 @@ jobs:
Selection: all
GenerateVMJobs: true
JobTemplatePath: /eng/pipelines/templates/jobs/cmake-generate.tests.yml
OsVmImage: $(LINUXVMIMAGE)
Pool: $(LINUXPOOL)
GenerateJobName: generate_matrix_cmake
AdditionalParameters:
Artifacts: ${{ parameters.Artifacts }}
ServiceDirectory: ${{ parameters.ServiceDirectory }}
CMakeTestOptions: ${{ parameters.CMakeTestOptions }}
- template: /eng/common/pipelines/templates/jobs/archetype-sdk-tests-generate.yml
- template: /eng/common/pipelines/templates/jobs/generate-job-matrix.yml
parameters:
MatrixConfigs:
- Name: base
@ -41,6 +43,8 @@ jobs:
Selection: all
GenerateVMJobs: true
JobTemplatePath: /eng/pipelines/templates/jobs/cmake-generate.tests.yml
OsVmImage: $(LINUXVMIMAGE)
Pool: $(LINUXPOOL)
GenerateJobName: generate_matrix_cmake_source
AdditionalParameters:
Artifacts: ${{ parameters.ArtifactsSource }}

Просмотреть файл

@ -31,9 +31,13 @@ parameters:
- name: TimeoutInMinutes
type: number
default: 120
- name: OSName
type: string
default: ''
jobs:
- job: ${{ parameters.JobName }}
- job:
displayName: ${{ parameters.JobName }}
timeoutInMinutes: ${{ parameters.TimeoutInMinutes }}
condition: >-
and(
@ -48,7 +52,13 @@ jobs:
pool:
name: $(Pool)
vmImage: $(OSVmImage)
# 1es pipeline templates converts `image` to demands: ImageOverride under the hood
# which is incompatible with image selection in the default non-1es hosted pools
${{ if eq(parameters.OSName, 'macOS') }}:
vmImage: $(OSVmImage)
${{ else }}:
image: $(OSVmImage)
os: ${{ parameters.OSName }}
${{ if eq(parameters.UsePlatformContainer, 'true') }}:
# Add a default so the job doesn't fail when the matrix is empty

Просмотреть файл

@ -39,15 +39,26 @@ parameters:
- name: PostTestSteps
type: stepList
default: []
- name: OSName
type: string
default: ''
jobs:
- job: ValidateLive
- job:
displayName: ValidateLive
dependsOn: ${{ parameters.DependsOn }}
condition: and(ne(variables['Skip.LiveTest'], 'true'), ne(${{ parameters.Matrix }}, '{}'))
timeoutInMinutes: ${{ parameters.TimeoutInMinutes }}
pool:
name: $(Pool)
vmImage: $(OSVmImage)
# 1es pipeline templates converts `image` to demands: ImageOverride under the hood
# which is incompatible with image selection in the default non-1es hosted pools
${{ if eq(parameters.OSName, 'macOS') }}:
vmImage: $(OSVmImage)
${{ else }}:
image: $(OSVmImage)
os: ${{ parameters.OSName }}
${{ if eq(parameters.UsePlatformContainer, 'true') }}:
# Add a default so the job doesn't fail when the matrix is empty
@ -58,18 +69,30 @@ jobs:
matrix: $[ ${{ parameters.Matrix }} ]
variables:
CMOCKA_XML_FILE: "%g-test-results.xml"
CMOCKA_MESSAGE_OUTPUT: "xml"
AZURE_ENABLE_STATIC_ANALYSIS: 1
BuildArgs: ""
VcpkgArgs: ""
WindowsCtestConfig: ""
CmakeEnvArg: ""
CmakeArgs: ""
AZURE_TEST_MODE: "LIVE"
AZURE_LOG_LEVEL: "verbose"
# Surface the ServiceDirectory parameter as an environment variable so tests can take advantage of it.
AZURE_SERVICE_DIRECTORY: ${{ parameters.ServiceDirectory }}
- template: /eng/pipelines/templates/variables/image.yml@self
- name: CMOCKA_XML_FILE
value: "%g-test-results.xml"
- name: CMOCKA_MESSAGE_OUTPUT
value: "xml"
- name: AZURE_ENABLE_STATIC_ANALYSIS
value: 1
- name: BuildArgs
value: ""
- name: VcpkgArgs
value: ""
- name: WindowsCtestConfig
value: ""
- name: CmakeEnvArg
value: ""
- name: CmakeArgs
value: ""
- name: AZURE_TEST_MODE
value: "LIVE"
- name: AZURE_LOG_LEVEL
value: "verbose"
# Surface the ServiceDirectory parameter as an environment variable so tests can take advantage of it.
- name: AZURE_SERVICE_DIRECTORY
value: ${{ parameters.ServiceDirectory }}
steps:
- checkout: self
@ -152,7 +175,7 @@ jobs:
export AZURE_CLIENT_ID=$(${{parameters.ServiceDirectory}}_CLIENT_ID)
export AZURE_TENANT_ID=$(${{parameters.ServiceDirectory}}_TENANT_ID)
export AZURE_CLIENT_SECRET=$(${{parameters.ServiceDirectory}}_CLIENT_SECRET)
ctest $(WindowsCtestConfig) -V --tests-regex "${{ parameters.CtestRegex }}" --no-compress-output -T Test
workingDirectory: build
displayName: ctest

Просмотреть файл

@ -24,7 +24,8 @@ stages:
pool:
name: azsdk-pool-mms-win-2022-general
vmImage: windows-2022
image: azsdk-pool-mms-win-2022-1espt
os: windows
strategy:
runOnce:
@ -65,7 +66,8 @@ stages:
pool:
name: azsdk-pool-mms-win-2022-general
vmImage: windows-2022
image: azsdk-pool-mms-win-2022-1espt
os: windows
strategy:
runOnce:
@ -95,7 +97,8 @@ stages:
dependsOn: TagRepository
pool:
name: azsdk-pool-mms-win-2022-general
vmImage: windows-2022
image: azsdk-pool-mms-win-2022-1espt
os: windows
variables:
VcpkgPrRepoOwner: Microsoft
@ -226,7 +229,8 @@ stages:
pool:
name: azsdk-pool-mms-win-2022-general
vmImage: windows-2022
image: azsdk-pool-mms-win-2022-1espt
os: windows
strategy:
runOnce:
@ -255,13 +259,17 @@ stages:
eq(variables['Build.Reason'],'Schedule')
)
)
variables:
- template: /eng/pipelines/templates/variables/image.yml
jobs:
- job: PublishDailyVcpkg
displayName: Publish to vcpkg daily branch
pool:
name: azsdk-pool-mms-win-2022-general
vmImage: windows-2022
name: $(WINDOWSPOOL)
image: $(WINDOWSVMIMAGE)
os: windows
steps:
- checkout: self

Просмотреть файл

@ -1,173 +1,214 @@
resources:
repositories:
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
parameters:
- name: ServiceDirectory
type: string
default: not-specified
- name: CtestRegex
type: string
default: .*
- name: CtestExcludeRegex
type: string
default: ''
- name: CoverageEnabled
type: boolean
default: true
- name: LiveTestCtestRegex
type: string
default: ''
- name: Artifacts
type: object
default: []
- name: ArtifactsSource
type: object
default: []
- name: CoverageReportPath
type: string
default: 'sdk/*/*/*cov_xml.xml'
- name: LiveTestTimeoutInMinutes
type: number
default: 120
- name: LineCoverageTarget
type: number
default: 95
- name: BranchCoverageTarget
type: number
default: 70
- name: TestEnv
type: object
default: []
- name: CMakeTestOptions
type: object
default: []
- name: CMakeSourceTestOptions
type: object
default: []
- name: Location
type: string
default: ''
- name: CloudConfig
type: object
default:
Public:
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
Preview:
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources-preview)
Canary:
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
Location: 'eastus2euap'
UsGov:
SubscriptionConfiguration: $(sub-config-gov-test-resources)
China:
SubscriptionConfiguration: $(sub-config-cn-test-resources)
- name: Clouds
type: string
default: Public
- name: SupportedClouds
type: string
default: Public
- name: UnsupportedClouds
type: string
default: ''
- name: PreTestSteps
type: stepList
default: []
- name: PostTestSteps
type: stepList
default: []
- name: CMakeGenerationTimeoutInMinutes
type: number
default: 120
- name: ServiceDirectory
type: string
default: not-specified
- name: CtestRegex
type: string
default: .*
- name: CtestExcludeRegex
type: string
default: ''
- name: CoverageEnabled
type: boolean
default: true
- name: LiveTestCtestRegex
type: string
default: ''
- name: Artifacts
type: object
default: []
- name: ArtifactsSource
type: object
default: []
- name: CoverageReportPath
type: string
default: 'sdk/*/*/*cov_xml.xml'
- name: LiveTestTimeoutInMinutes
type: number
default: 120
- name: LineCoverageTarget
type: number
default: 95
- name: BranchCoverageTarget
type: number
default: 70
- name: TestEnv
type: object
default: []
- name: CMakeTestOptions
type: object
default: []
- name: CMakeSourceTestOptions
type: object
default: []
- name: Location
type: string
default: ''
- name: CloudConfig
type: object
default:
Public:
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
Preview:
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources-preview)
Canary:
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
Location: 'eastus2euap'
UsGov:
SubscriptionConfiguration: $(sub-config-gov-test-resources)
China:
SubscriptionConfiguration: $(sub-config-cn-test-resources)
- name: Clouds
type: string
default: Public
- name: SupportedClouds
type: string
default: Public
- name: UnsupportedClouds
type: string
default: ''
- name: PreTestSteps
type: stepList
default: []
- name: PostTestSteps
type: stepList
default: []
- name: CMakeGenerationTimeoutInMinutes
type: number
default: 120
stages:
- stage: CMakeGeneration
jobs:
- template: /eng/pipelines/templates/jobs/cmake-generate-jobs.yml
parameters:
TimeoutInMinutes: ${{ parameters.CMakeGenerationTimeoutInMinutes }}
ServiceDirectory: ${{ parameters.ServiceDirectory }}
Artifacts: ${{ parameters.Artifacts }}
ArtifactsSource: ${{ parameters.ArtifactsSource }}
CMakeTestOptions: ${{ parameters.CMakeTestOptions }}
CMakeSourceTestOptions: ${{ parameters.CMakeSourceTestOptions }}
# PrePublishBuild runs a narrower set of fast builds. If these builds pass,
# Integration can launch immediately without awaiting more build and test jobs
- stage: PrePublishBuild
dependsOn: []
jobs:
- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml
parameters:
MatrixFile: eng/pipelines/templates/stages/platform-matrix-quick.json
JobName: QuickValidate
ServiceDirectory: ${{ parameters.ServiceDirectory }}
Artifacts: ${{ parameters.Artifacts }}
CtestRegex: ${{ parameters.CtestRegex }}
CtestExcludeRegex: ${{ parameters.CtestExcludeRegex }}
CoverageEnabled: ${{ parameters.CoverageEnabled }}
CoverageReportPath: ${{ parameters.CoverageReportPath }}
LineCoverageTarget: ${{ parameters.LineCoverageTarget }}
BranchCoverageTarget: ${{ parameters.BranchCoverageTarget }}
${{ if eq(parameters.ServiceDirectory, 'template') }}:
TestPipeline: true
TestEnv: ${{ parameters.TestEnv }}
PreTestSteps: ${{ parameters.PreTestSteps }}
PostTestSteps: ${{ parameters.PostTestSteps }}
RunMetaJobs: true
extends:
${{ if eq(variables['System.TeamProject'], 'internal') }}:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
${{ else }}:
template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
settings:
skipBuildTagsForGitHubPullRequests: true
sdl:
sourceAnalysisPool:
name: azsdk-pool-mms-win-2022-general
image: azsdk-pool-mms-win-2022-1espt
os: windows
eslint:
enabled: false
justificationForDisabling: 'ESLint injected task has failures because it uses an old version of mkdirp. We should not fail for tools not controlled by the repo. See: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=3499746'
psscriptanalyzer:
compiled: true
break: true
policy: M365
credscan:
suppressionsFile: $(Build.SourcesDirectory)/eng/CredScanSuppression.json
toolVersion: 2.3.12.23
binskim:
enabled: true
scanOutputDirectoryOnly: true
- stage: Build
dependsOn: []
jobs:
- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml
parameters:
MatrixFile: eng/pipelines/templates/stages/platform-matrix.json
JobName: Validate
ServiceDirectory: ${{ parameters.ServiceDirectory }}
Artifacts: ${{ parameters.Artifacts }}
CtestRegex: ${{ parameters.CtestRegex }}
CtestExcludeRegex: ${{ parameters.CtestExcludeRegex }}
CoverageEnabled: ${{ parameters.CoverageEnabled }}
CoverageReportPath: ${{ parameters.CoverageReportPath }}
LineCoverageTarget: ${{ parameters.LineCoverageTarget }}
BranchCoverageTarget: ${{ parameters.BranchCoverageTarget }}
${{ if eq(parameters.ServiceDirectory, 'template') }}:
TestPipeline: true
TestEnv: ${{ parameters.TestEnv }}
PreTestSteps: ${{ parameters.PreTestSteps }}
PostTestSteps: ${{ parameters.PostTestSteps }}
RunMetaJobs: false
stages:
- stage: CMakeGeneration
variables:
- template: /eng/pipelines/templates/variables/image.yml@self
jobs:
- template: /eng/pipelines/templates/jobs/cmake-generate-jobs.yml@self
parameters:
TimeoutInMinutes: ${{ parameters.CMakeGenerationTimeoutInMinutes }}
ServiceDirectory: ${{ parameters.ServiceDirectory }}
Artifacts: ${{ parameters.Artifacts }}
ArtifactsSource: ${{ parameters.ArtifactsSource }}
CMakeTestOptions: ${{ parameters.CMakeTestOptions }}
CMakeSourceTestOptions: ${{ parameters.CMakeSourceTestOptions }}
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(parameters.LiveTestCtestRegex, '')) }}:
- template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml
# Code coverage is enabled by default for live tests
parameters:
TimeoutInMinutes: ${{ parameters.LiveTestTimeoutInMinutes }}
ServiceDirectory: ${{ parameters.ServiceDirectory }}
CtestRegex: ${{ parameters.LiveTestCtestRegex }}
CoverageReportPath: ${{ parameters.CoverageReportPath }}
Location: ${{ parameters.Location }}
CloudConfig: ${{ parameters.CloudConfig }}
Clouds: ${{ parameters.Clouds }}
SupportedClouds: ${{ parameters.SupportedClouds }}
UnsupportedClouds: ${{ parameters.UnsupportedClouds }}
PreTestSteps: ${{ parameters.PreTestSteps }}
PostTestSteps: ${{ parameters.PostTestSteps }}
# PrePublishBuild runs a narrower set of fast builds. If these builds pass,
# Integration can launch immediately without awaiting more build and test jobs
- stage: PrePublishBuild
variables:
- template: /eng/pipelines/templates/variables/image.yml@self
dependsOn: []
jobs:
- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml@self
parameters:
MatrixFile: eng/pipelines/templates/stages/platform-matrix-quick.json
JobName: QuickValidate
ServiceDirectory: ${{ parameters.ServiceDirectory }}
Artifacts: ${{ parameters.Artifacts }}
CtestRegex: ${{ parameters.CtestRegex }}
CtestExcludeRegex: ${{ parameters.CtestExcludeRegex }}
CoverageEnabled: ${{ parameters.CoverageEnabled }}
CoverageReportPath: ${{ parameters.CoverageReportPath }}
LineCoverageTarget: ${{ parameters.LineCoverageTarget }}
BranchCoverageTarget: ${{ parameters.BranchCoverageTarget }}
${{ if eq(parameters.ServiceDirectory, 'template') }}:
TestPipeline: true
TestEnv: ${{ parameters.TestEnv }}
PreTestSteps: ${{ parameters.PreTestSteps }}
PostTestSteps: ${{ parameters.PostTestSteps }}
RunMetaJobs: true
- stage: Build
variables:
- template: /eng/pipelines/templates/variables/image.yml@self
dependsOn: []
jobs:
- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml@self
# Code coverage is enabled by default for live tests
parameters:
MatrixFile: eng/pipelines/templates/stages/platform-matrix.json
JobName: Validate
ServiceDirectory: ${{ parameters.ServiceDirectory }}
Artifacts: ${{ parameters.Artifacts }}
CtestRegex: ${{ parameters.CtestRegex }}
CtestExcludeRegex: ${{ parameters.CtestExcludeRegex }}
CoverageEnabled: ${{ parameters.CoverageEnabled }}
CoverageReportPath: ${{ parameters.CoverageReportPath }}
LineCoverageTarget: ${{ parameters.LineCoverageTarget }}
BranchCoverageTarget: ${{ parameters.BranchCoverageTarget }}
${{ if eq(parameters.ServiceDirectory, 'template') }}:
TestPipeline: true
TestEnv: ${{ parameters.TestEnv }}
PreTestSteps: ${{ parameters.PreTestSteps }}
PostTestSteps: ${{ parameters.PostTestSteps }}
RunMetaJobs: false
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(parameters.LiveTestCtestRegex, '')) }}:
- template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml@self
parameters:
TimeoutInMinutes: ${{ parameters.LiveTestTimeoutInMinutes }}
ServiceDirectory: ${{ parameters.ServiceDirectory }}
CtestRegex: ${{ parameters.LiveTestCtestRegex }}
CoverageReportPath: ${{ parameters.CoverageReportPath }}
Location: ${{ parameters.Location }}
CloudConfig: ${{ parameters.CloudConfig }}
Clouds: ${{ parameters.Clouds }}
SupportedClouds: ${{ parameters.SupportedClouds }}
UnsupportedClouds: ${{ parameters.UnsupportedClouds }}
PreTestSteps: ${{ parameters.PreTestSteps }}
PostTestSteps: ${{ parameters.PostTestSteps }}
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), not(endsWith(variables['Build.DefinitionName'], ' - tests'))) }}:
- template: archetype-cpp-release.yml@self
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
IntegrationDependsOn:
- PrePublishBuild
DependsOn:
- PrePublishBuild
- Build
# Only depend on `LiveTest` if there are live tests to execute
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(parameters.LiveTestCtestRegex, '')) }}:
# Pulled from stages/archetype-sdk-tests.yml to generate 'LiveTest_<cloud>'
- ${{ each cloud in parameters.CloudConfig }}:
- ${{ if or(contains(parameters.Clouds, cloud.key), and(contains(variables['Build.DefinitionName'], 'tests-weekly'), contains(parameters.SupportedClouds, cloud.key))) }}:
- ${{ if not(contains(parameters.UnsupportedClouds, cloud.key)) }}:
- LiveTest_${{ cloud.key }}
Artifacts: ${{ parameters.Artifacts }}
ArtifactName: packages
${{ if eq(parameters.ServiceDirectory, 'template') }}:
TestPipeline: true
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), not(endsWith(variables['Build.DefinitionName'], ' - tests'))) }}:
- template: archetype-cpp-release.yml
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
IntegrationDependsOn:
- PrePublishBuild
DependsOn:
- PrePublishBuild
- Build
# Only depend on `LiveTest` if there are live tests to execute
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(parameters.LiveTestCtestRegex, '')) }}:
# Pulled from stages/archetype-sdk-tests.yml to generate 'LiveTest_<cloud>'
- ${{ each cloud in parameters.CloudConfig }}:
- ${{ if or(contains(parameters.Clouds, cloud.key), and(contains(variables['Build.DefinitionName'], 'tests-weekly'), contains(parameters.SupportedClouds, cloud.key))) }}:
- ${{ if not(contains(parameters.UnsupportedClouds, cloud.key)) }}:
- LiveTest_${{ cloud.key }}
Artifacts: ${{ parameters.Artifacts }}
ArtifactName: packages
${{ if eq(parameters.ServiceDirectory, 'template') }}:
TestPipeline: true

Просмотреть файл

@ -43,7 +43,7 @@ stages:
- stage: LiveTest_${{ cloud.key }}
dependsOn: []
jobs:
- template: /eng/common/pipelines/templates/jobs/archetype-sdk-tests-generate.yml
- template: /eng/common/pipelines/templates/jobs/generate-job-matrix.yml
parameters:
MatrixConfigs:
- Name: base
@ -51,6 +51,8 @@ stages:
Selection: all
GenerateVMJobs: true
JobTemplatePath: /eng/pipelines/templates/jobs/live.tests.yml
OsVmImage: $(LINUXVMIMAGE)
Pool: $(LINUXPOOL)
CloudConfig:
SubscriptionConfiguration: ${{ cloud.value.SubscriptionConfiguration }}
SubscriptionConfigurations: ${{ cloud.value.SubscriptionConfigurations }}

Просмотреть файл

@ -3,19 +3,19 @@
"CmakeEnvArg": "",
"OSConfig": {
"Linux": {
"Pool": "azsdk-pool-mms-ubuntu-2204-general",
"OSVmImage": "MMSUbuntu22.04",
"Pool": "env:LINUXNEXTPOOL",
"OSVmImage": "env:LINUXNEXTVMIMAGE",
"AptDependencies": "libcurl4-openssl-dev",
"VCPKG_DEFAULT_TRIPLET": "x64-linux"
},
"Windows": {
"Pool": "azsdk-pool-mms-win-2022-general",
"OSVmImage": "windows-2022",
"Pool": "env:WINDOWSPOOL",
"OSVmImage": "env:WINDOWSVMIMAGE",
"VCPKG_DEFAULT_TRIPLET": "x64-windows"
},
"Mac": {
"Pool": "Azure Pipelines",
"OSVmImage": "macos-11",
"Pool": "env:MACPOOL",
"OSVmImage": "env:MACVMIMAGE",
"VCPKG_DEFAULT_TRIPLET": "x64-osx"
}
}

Просмотреть файл

@ -2,19 +2,19 @@
"matrix": {
"OSConfig": {
"Windows": {
"Pool": "azsdk-pool-mms-win-2022-general",
"OSVmImage": "windows-2022",
"Pool": "env:WINDOWSPOOL",
"OSVmImage": "env:WINDOWSVMIMAGE",
"CmakeEnvArg": ""
},
"Linux": {
"Pool": "azsdk-pool-mms-ubuntu-2204-general",
"OSVmImage": "MMSUbuntu22.04",
"Pool": "env:LINUXNEXTPOOL",
"OSVmImage": "env:LINUXNEXTVMIMAGE",
"CmakeEnvArg": "",
"AptDependencies": "libcurl4-openssl-dev"
},
"Mac": {
"Pool": "Azure Pipelines",
"OSVmImage": "macos-11",
"Pool": "env:MACPOOL",
"OSVmImage": "env:MACVMIMAGE",
"CmakeEnvArg": "OPENSSL_ROOT_DIR=/usr/local/opt/openssl@3 OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl@3/include ",
"BrewDependencies": "openssl"
}

Просмотреть файл

@ -6,8 +6,8 @@
{
"StaticConfigs": {
"macOS-11": {
"Pool": "Azure Pipelines",
"OSVmImage": "macos-11",
"Pool": "env:MACPOOL",
"OSVmImage": "env:MACVMIMAGE",
"VCPKG_DEFAULT_TRIPLET": "x64-osx",
"BuildArgs": "-j 4"
}
@ -24,8 +24,8 @@
"Ubu2204": {
"VCPKG_DEFAULT_TRIPLET": "x64-linux",
"BuildArgs": "-j 4",
"Pool": "azsdk-pool-mms-ubuntu-2204-general",
"OSVmImage": "MMSUbuntu22.04",
"Pool": "env:LINUXNEXTPOOL",
"OSVmImage": "env:LINUXNEXTVMIMAGE",
"RunProxyTests": true
}
},
@ -43,8 +43,8 @@
"StaticConfigs": {
"Ubu20": {
"BuildArgs": "-j 4",
"Pool": "azsdk-pool-mms-ubuntu-2004-general",
"OSVmImage": "MMSUbuntu20.04",
"Pool": "env:LINUXPOOL",
"OSVmImage": "env:LINUXVMIMAGE",
"VCPKG_DEFAULT_TRIPLET": "x64-linux",
"RunProxyTests": true
}
@ -66,13 +66,13 @@
{
"StaticConfigs": {
"Win2019": {
"Pool": "azsdk-pool-mms-win-2019-general",
"OSVmImage": "windows-2019",
"Pool": "env:WINDOWSPREVIOUSPOOL",
"OSVmImage": "env:WINDOWSPREVIOUSVMIMAGE",
"CMAKE_GENERATOR": "Visual Studio 16 2019"
},
"Win2022": {
"Pool": "azsdk-pool-mms-win-2022-general",
"OSVmImage": "windows-2022",
"Pool": "env:WINDOWSPOOL",
"OSVmImage": "env:WINDOWSVMIMAGE",
"CMAKE_GENERATOR": "Visual Studio 17 2022"
}
},
@ -122,8 +122,8 @@
{
"StaticConfigs": {
"Win2022": {
"Pool": "azsdk-pool-mms-win-2022-general",
"OSVmImage": "windows-2022",
"Pool": "env:WINDOWSPOOL",
"OSVmImage": "env:WINDOWSVMIMAGE",
"CMAKE_GENERATOR": "Visual Studio 17 2022",
"RunProxyTests": true
}

Просмотреть файл

@ -6,8 +6,8 @@
{
"StaticConfigs": {
"Ubuntu22": {
"OSVmImage": "MMSUbuntu22.04",
"Pool": "azsdk-pool-mms-ubuntu-2204-general",
"OSVmImage": "env:LINUXNEXTVMIMAGE",
"Pool": "env:LINUXNEXTPOOL",
"VCPKG_DEFAULT_TRIPLET": "x64-linux",
"BuildArgs": "-j 10",
"RunProxyTests": true

Просмотреть файл

@ -6,13 +6,13 @@
{
"OSConfiguration": {
"macOS-11": {
"OSVmImage": "macos-11",
"OSVmImage": "env:MACVMIMAGE",
"XCODE_VERSION": "12.5.1"
}
},
"StaticConfigs": {
"_": {
"Pool": "Azure Pipelines",
"Pool": "env:MACPOOL",
"BuildArgs": "-j 10",
"VCPKG_DEFAULT_TRIPLET": "x64-osx",
"CmakeArgs": " -DBUILD_TESTING=ON -DENABLE_PROXY_TESTS=OFF -DBUILD_PERFORMANCE_TESTS=ON -DRUN_LONG_UNIT_TESTS=ON -DBUILD_TRANSPORT_CURL=ON",
@ -31,8 +31,8 @@
{
"StaticConfigs": {
"Win2019_x64_Release": {
"OSVmImage": "windows-2019",
"Pool": "azsdk-pool-mms-win-2019-general",
"OSVmImage": "env:WINDOWSPREVIOUSVMIMAGE",
"Pool": "azsdk-pool-mms-win-2019-1es-pt",
"CMAKE_GENERATOR": "Visual Studio 16 2019",
"CMAKE_GENERATOR_PLATFORM": "x64",
"VCPKG_DEFAULT_TRIPLET": "x64-windows-static",
@ -49,8 +49,8 @@
{
"StaticConfigs": {
"Win2022": {
"OSVmImage": "windows-2022",
"Pool": "azsdk-pool-mms-win-2022-general",
"OSVmImage": "env:WINDOWSVMIMAGE",
"Pool": "env:WINDOWSPOOL",
"CMAKE_GENERATOR": "Visual Studio 17 2022"
}
},
@ -78,8 +78,8 @@
{
"StaticConfigs": {
"Win2022": {
"OSVmImage": "windows-2022",
"Pool": "azsdk-pool-mms-win-2022-general",
"OSVmImage": "env:WINDOWSVMIMAGE",
"Pool": "env:WINDOWSPOOL",
"RunProxyTests": true,
"CMAKE_GENERATOR": "Visual Studio 17 2022"
}
@ -111,8 +111,8 @@
"StaticConfigs": {
"Win2022": {
"VcpkgInstall": "openssl",
"OSVmImage": "windows-2022",
"Pool": "azsdk-pool-mms-win-2022-general",
"OSVmImage": "env:WINDOWSVMIMAGE",
"Pool": "env:WINDOWSPOOL",
"CMAKE_GENERATOR": "Visual Studio 17 2022",
"PublishMapFiles": "true"
}
@ -141,8 +141,8 @@
{
"StaticConfigs": {
"Ubuntu22": {
"OSVmImage": "MMSUbuntu22.04",
"Pool": "azsdk-pool-mms-ubuntu-2204-general",
"OSVmImage": "env:LINUXNEXTVMIMAGE",
"Pool": "env:LINUXNEXTPOOL",
"VCPKG_DEFAULT_TRIPLET": "x64-linux",
"BuildArgs": "-j 10",
"RunProxyTests": true
@ -190,8 +190,8 @@
{
"StaticConfigs": {
"Ubuntu20": {
"OSVmImage": "MMSUbuntu20.04",
"Pool": "azsdk-pool-mms-ubuntu-2004-general",
"OSVmImage": "env:LINUXVMIMAGE",
"Pool": "env:LINUXPOOL",
"VCPKG_DEFAULT_TRIPLET": "x64-linux",
"BuildArgs": "-j 10",
"RunProxyTests": true
@ -208,8 +208,8 @@
{
"StaticConfigs": {
"Ubuntu20": {
"OSVmImage": "MMSUbuntu20.04",
"Pool": "azsdk-pool-mms-ubuntu-2004-general",
"OSVmImage": "env:LINUXVMIMAGE",
"Pool": "env:LINUXPOOL",
"VCPKG_DEFAULT_TRIPLET": "x64-linux",
"BuildArgs": "-j 10",
"CC": "/usr/bin/clang-11",

Просмотреть файл

@ -0,0 +1,33 @@
# Default pool image selection. Set as variable so we can override at pipeline level
variables:
- name: LINUXPOOL
value: azsdk-pool-mms-ubuntu-2004-general
- name: LINUXNEXTPOOL
value: azsdk-pool-mms-ubuntu-2204-general
- name: WINDOWSPOOL
value: azsdk-pool-mms-win-2022-general
- name: WINDOWSPREVIOUSPOOL
value: azsdk-pool-mms-win-2019-general
- name: MACPOOL
value: Azure Pipelines
- name: LINUXVMIMAGE
value: azsdk-pool-mms-ubuntu-2004-1espt
- name: LINUXNEXTVMIMAGE
value: azsdk-pool-mms-ubuntu-2204-1espt
- name: WINDOWSVMIMAGE
value: azsdk-pool-mms-win-2022-1espt
- name: WINDOWSPREVIOUSVMIMAGE
value: azsdk-pool-mms-win-2019-1espt
- name: MACVMIMAGE
value: macos-11
# Values required for pool.os field in 1es pipeline templates
- name: LINUXOS
value: linux
- name: WINDOWSOS
value: windows
- name: MACOS
value: macOS

Просмотреть файл

@ -48,23 +48,23 @@ function getTargetOs {
return $OsVMImage
}
if ($OsVMImage -eq "windows-2019") {
if ($OsVMImage -eq "windows-2019" -or $OsVMImage.Contains("win-2019")) {
return "win-2019"
}
if ($OsVMImage -eq "windows-2022") {
if ($OsVMImage -eq "windows-2022" -or $OsVMImage.Contains("win-2022")) {
return "win-2022"
}
if ($OsVMImage -in "MMSUbuntu18.04", "ubuntu-18.04") {
if ($OsVMImage -in "MMSUbuntu18.04", "ubuntu-18.04", "azsdk-pool-mms-ubuntu-1804-1espt") {
return "ubuntu-18.04"
}
if ($OsVMImage -in "MMSUbuntu20.04", "ubuntu-20.04") {
if ($OsVMImage -in "MMSUbuntu20.04", "ubuntu-20.04", "azsdk-pool-mms-ubuntu-2004-1espt") {
return "ubuntu-20.04"
}
if ($OsVMImage -in "MMSUbuntu22.04", "ubuntu-22.04") {
if ($OsVMImage -in "MMSUbuntu22.04", "ubuntu-22.04", "azsdk-pool-mms-ubuntu-2204-1espt") {
return "ubuntu-22.04"
}
@ -97,11 +97,11 @@ function getToolChain {
return "MSVC"
}
if ($OSVmImage -match "windows-\d{4}") {
if ($OSVmImage -match "windows-\d{4}" -or $OSVmImage -match "win-\d{4}") {
return "MSVC17"
}
if ($OSVmImage.Contains("Ubuntu")) {
if ($OSVmImage.Contains("Ubuntu") -or $OSVmImage.Contains("ubuntu")) {
if ($CmakeEnvArg.Contains('g++-5')) {
return 'g++-5'
} elseif ($env:CXX -and $env:CXX.Contains("g++8")) {
@ -121,7 +121,7 @@ function getTargetPlatform {
return "macos"
}
if ($OSVmImage -match 'MMS\d{4}' -or $OsVMImage -match "windows-\d{4}") {
if ($OSVmImage -match 'MMS\d{4}' -or $OsVMImage -match "windows-\d{4}" -or $OsVMImage -match "win-\d{4}") {
if (!$env:CMAKE_SYSTEM_NAME -and !$CmakeArgs.Contains('WindowsStore')) {
return 'win32'
} elseif ($env:CMAKE_SYSTEM_NAME -eq 'WindowsStore' -or $CmakeArgs.Contains('WindowsStore')) {
@ -129,7 +129,7 @@ function getTargetPlatform {
}
}
if ($OSVmImage.Contains("Ubuntu")) {
if ($OSVmImage.Contains("Ubuntu") -or $OSVmImage.Contains("ubuntu")) {
return 'linux'
}

Просмотреть файл

@ -22,8 +22,8 @@ pr:
include:
- sdk/attestation
stages:
- template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
extends:
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
ServiceDirectory: attestation
Clouds: Public

Просмотреть файл

@ -41,8 +41,8 @@ pr:
- '*.md'
- /**/*.md
stages:
- template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
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

Просмотреть файл

@ -23,8 +23,8 @@ pr:
- sdk/eventhubs
- eng/common/testproxy
stages:
- template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
extends:
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
ServiceDirectory: eventhubs
CtestRegex: "azure-messaging-eventhubs.*"

Просмотреть файл

@ -22,8 +22,8 @@ pr:
include:
- sdk/identity
stages:
- template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
extends:
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
ServiceDirectory: identity
CtestRegex: azure-identity.

Просмотреть файл

@ -23,8 +23,8 @@ pr:
- sdk/keyvault
- eng/common/testproxy
stages:
- template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
extends:
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
ServiceDirectory: keyvault
CtestRegex: "azure-security-keyvault.*"

Просмотреть файл

@ -22,8 +22,8 @@ pr:
- sdk/storage
- eng/common/testproxy
stages:
- template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
extends:
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
ServiceDirectory: storage
# Not running tests on CI but only on LiveTest mode

Просмотреть файл

@ -22,8 +22,8 @@ pr:
- sdk/tables
- eng/common/testproxy
stages:
- template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
extends:
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
ServiceDirectory: tables
# Not running tests on CI but only on LiveTest mode

Просмотреть файл

@ -22,8 +22,8 @@ pr:
include:
- sdk/template
stages:
- template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
extends:
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
ServiceDirectory: template
CtestRegex: azure-template