From aa8121a2a55be8636bba750b97678c9995bd43f9 Mon Sep 17 00:00:00 2001 From: Mitch Denny Date: Thu, 23 Jul 2020 14:23:25 +1000 Subject: [PATCH 1/2] Use the common Cosmos emulator template. --- .../templates/stages/cosmos-sdk-client.yml | 2 +- .../templates/steps/cosmos-emulator.yml | 16 ---------------- 2 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 eng/pipelines/templates/steps/cosmos-emulator.yml diff --git a/eng/pipelines/templates/stages/cosmos-sdk-client.yml b/eng/pipelines/templates/stages/cosmos-sdk-client.yml index 1044e754aa0c..af752abf1d54 100644 --- a/eng/pipelines/templates/stages/cosmos-sdk-client.yml +++ b/eng/pipelines/templates/stages/cosmos-sdk-client.yml @@ -41,7 +41,7 @@ stages: vmImage: $(OSVmImage) steps: - - template: ../steps/cosmos-emulator.yml + - template: ../../../common/pipelines/templates/steps/cosmos-emulator.yml parameters: EmulatorMsiUrl: ${{ parameters.EmulatorMsiUrl }} StartParameters: ${{ parameters.EmulatorStartParameters }} diff --git a/eng/pipelines/templates/steps/cosmos-emulator.yml b/eng/pipelines/templates/steps/cosmos-emulator.yml deleted file mode 100644 index 564f3e429bd7..000000000000 --- a/eng/pipelines/templates/steps/cosmos-emulator.yml +++ /dev/null @@ -1,16 +0,0 @@ -parameters: - EmulatorMsiUrl: "https://aka.ms/cosmosdb-emulator" - StartParameters: '' - -steps: - - powershell: | - $targetDir = $env:temp - Write-Host "Downloading and extracting Cosmos DB Emulator - ${{ parameters.EmulatorMsiUrl }}" - Write-Host "Target Dir: $targetDir" - msiexec /a ${{ parameters.EmulatorMsiUrl }} TARGETDIR=$targetDir /qn | wait-process - displayName: Download and Extract Public Cosmos DB Emulator - - powershell: | - Write-Host "Launching Cosmos DB Emulator" - Import-Module "$env:temp\Azure Cosmos DB Emulator\PSModules\Microsoft.Azure.CosmosDB.Emulator" - Start-CosmosDbEmulator -NoUI ${{ parameters.StartParameters }} - displayName: Start Cosmos DB Emulator \ No newline at end of file From b2586cc8143973fae958775cf262ad70aacc4dab Mon Sep 17 00:00:00 2001 From: Mitch Denny Date: Fri, 24 Jul 2020 07:57:28 +1000 Subject: [PATCH 2/2] Use absolute path. --- eng/pipelines/templates/stages/cosmos-sdk-client.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/templates/stages/cosmos-sdk-client.yml b/eng/pipelines/templates/stages/cosmos-sdk-client.yml index af752abf1d54..08d31687924e 100644 --- a/eng/pipelines/templates/stages/cosmos-sdk-client.yml +++ b/eng/pipelines/templates/stages/cosmos-sdk-client.yml @@ -41,7 +41,7 @@ stages: vmImage: $(OSVmImage) steps: - - template: ../../../common/pipelines/templates/steps/cosmos-emulator.yml + - template: /eng/common/pipelines/templates/steps/cosmos-emulator.yml parameters: EmulatorMsiUrl: ${{ parameters.EmulatorMsiUrl }} StartParameters: ${{ parameters.EmulatorStartParameters }}