azure-sdk-for-js/common/smoke-test/smoke-tests.yml

89 строки
3.4 KiB
YAML
Исходник Обычный вид История

jobs:
- job: SmokeTest
strategy:
matrix:
Linux (AzureCloud):
OSVmImage: "ubuntu-18.04"
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
ArmTemplateParameters: $(azureCloudArmParameters)
Windows (AzureCloud):
OSVmImage: "windows-2019"
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
ArmTemplateParameters: $(azureCloudArmParameters)
Mac (AzureCloud):
OSVmImage: "macOS-10.14"
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
ArmTemplateParameters: $(azureCloudArmParameters)
Linux (AzureUSGovernment):
OSVmImage: "ubuntu-18.04"
SubscriptionConfiguration: $(sub-config-gov-test-resources)
ArmTemplateParameters: $(azureUSGovernmentArmParameters)
Windows (AzureUSGovernment):
OSVmImage: "windows-2019"
SubscriptionConfiguration: $(sub-config-gov-test-resources)
ArmTemplateParameters: $(azureUSGovernmentArmParameters)
Linux (AzureChinaCloud):
OSVmImage: "ubuntu-18.04"
SubscriptionConfiguration: $(sub-config-cn-test-resources)
ArmTemplateParameters: $(azureChinaCloudArmParameters)
Windows (AzureChinaCloud):
OSVmImage: "windows-2019"
SubscriptionConfiguration: $(sub-config-cn-test-resources)
ArmTemplateParameters: $(azureChinaCloudArmParameters)
pool:
vmImage: $(OSVmImage)
variables:
- template: ../../eng/pipelines/templates/variables/globals.yml
- name: Location
value: ""
- name: azureCloudArmParameters
value: "@{ storageEndpointSuffix = 'core.windows.net'; azureCloud = 'AzureCloud'; }"
- name: azureUSGovernmentArmParameters
value: "@{ storageEndpointSuffix = 'core.usgovcloudapi.net'; azureCloud = 'AzureUSGovernment'; }"
- name: azureChinaCloudArmParameters
value: "@{ storageEndpointSuffix = 'core.chinacloudapi.cn'; azureCloud = 'AzureChinaCloud'; }"
steps:
- template: ../../eng/pipelines/templates/steps/common.yml
- task: Npm@1
inputs:
command: install
workingDir: common/smoke-test/
displayName: Install packages
- task: Npm@1
inputs:
command: custom
customCommand: "list --depth=0"
workingDir: common/smoke-test/
displayName: List packages installed from the feed
# The MacOS image does not have TypeScript installed by default
- task: Npm@1
inputs:
command: custom
customCommand: "install -g typescript"
displayName: Install TypeScript
condition: and(succeeded(), contains(variables['OSVmImage'], 'macos'))
- script: tsc -p ./common/smoke-test/
displayName: "Compile TS"
- template: ../../eng/common/TestResources/deploy-test-resources.yml
parameters:
ServiceDirectory: "$(Build.SourcesDirectory)/common/smoke-test/"
Location: $(Location)
ArmTemplateParameters: $(ArmTemplateParameters)
SubscriptionConfiguration: $(SubscriptionConfiguration)
- script: node ./common/smoke-test/app.js
displayName: Run Smoke Test
- template: ../../eng/common/TestResources/remove-test-resources.yml
parameters:
ServiceDirectory: "$(Build.SourcesDirectory)/common/smoke-test/"
SubscriptionConfiguration: $(SubscriptionConfiguration)