forked from Azure/azure-sdk-for-js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Cosmos] Pipelines for cosmos sdk (Azure#4881)
* Pipelines and setup for cosmos sdk (#16) * resolve merge conflict - tsconfig.json * add cosmos in rush.json * update dependencies - sync-versions * add script "extract-api" * delete .prettierrc * update package.json script commands * npm run bundle command * Fix typo in samples/package.json * npm run clean command * remove unrelated file .gitattributes * Update package.json repo links * add ci.yml from cosmos v2 * Node 6 to Node 8 - integration step * azure-cosmos-js -> azure-sdk-for-js * Update License document * update tool chain from npm to rush * add package name * delete package-lock.json * add cosmos-additional-steps.yml file * add PostIntegrationSteps variable * condition: succeededOrFailed() for additional steps * add parameters PackageName and PackagePath * Smaller Matrix for Unit tests as per Daniel's idea * parameters - fix typo * regenerate pnpm-lock file * test:consumer -> test-consumer * remove matrix for unit-tests * checking if bash task affects the build * update test-consumer command * script over one-line setup * remove endpoint in env vars * disable IndexManagement sample * add mocha-junit-reporter * update pipeline script (#18) * add await for cosmosdb to start * use java emulator install procedure * add variables for emulator msi * use parameters as would be expected * use correct quotes * remove java-specific steps, use accepted emulator msi url * without the single quote * update start-process step * ProgramFiles -> Temp
- Loading branch information
1 parent
df3a7b2
commit 9ed6846
Showing
11 changed files
with
169 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
parameters: | ||
PackagePath: "sdk/cosmosdb/cosmos/" | ||
PackageName: "@azure/cosmos" | ||
|
||
steps: | ||
- bash: | | ||
node common/scripts/install-run-rush.js test-consumer -t "${{parameters.PackageName}}" --verbose | ||
condition: succeededOrFailed() | ||
displayName: "TypeScript Consumer Tests - Cosmos" | ||
- script: | | ||
node common/scripts/install-run-rush.js build:samples -t "${{parameters.PackageName}}" --verbose | ||
condition: succeededOrFailed() | ||
displayName: "Typecheck Samples - Cosmos" | ||
- script: | | ||
npm run execute:samples | ||
condition: succeededOrFailed() | ||
displayName: "Run Samples - Cosmos" | ||
workingDirectory: "${{parameters.PackagePath}}" |
37 changes: 33 additions & 4 deletions
37
eng/pipelines/templates/steps/cosmos-integration-public.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,34 @@ | ||
parameters: | ||
EmulatorMsiUrl: "https://aka.ms/cosmosdb-emulator" | ||
|
||
steps: | ||
- task: azure-cosmosdb.emulator-public-preview.run-cosmosdbemulatorcontainer.CosmosDbEmulator@2 | ||
inputs: | ||
defaultPartitionCount: 25 | ||
displayName: "Run Azure Cosmos DB Emulator container (public)" | ||
- powershell: | | ||
Write-Host "Downloading Cosmos Emulator - ${{ parameters.EmulatorMsiUrl }}" | ||
wget "${{ parameters.EmulatorMsiUrl }}" -outfile "$env:temp\azure-cosmosdb-emulator.msi" | ||
Write-Host "Finished Downloading Cosmos Emulator - $env:temp\azure-cosmosdb-emulator.msi" | ||
dir "$env:temp" | ||
displayName: "Download Public Cosmos DB Emulator" | ||
- script: | | ||
choco install lessmsi | ||
choco upgrade lessmsi | ||
mkdir "%TEMP%\Azure Cosmos DB Emulator" | ||
lessmsi x "%TEMP%\azure-cosmosdb-emulator.msi" "%TEMP%\Azure Cosmos DB Emulator\" | ||
displayName: "Install Public Cosmos DB Emulator" | ||
- powershell: | | ||
Write-Host "Starting Comsos DB Emulator" | ||
Start-Process "$env:Temp\Azure Cosmos DB Emulator\SourceDir\Azure Cosmos DB Emulator\CosmosDB.Emulator.exe" "/NoExplorer /NoUI" -Verb RunAs | ||
displayName: "Run Public Cosmos DB Emulator" | ||
- powershell: | | ||
Import-Module "$env:Temp\Azure Cosmos DB Emulator\SourceDir\Azure Cosmos DB Emulator\PSModules\Microsoft.Azure.CosmosDB.Emulator" | ||
Do { | ||
sleep 5 | ||
$cosmosStatus = Get-CosmosDbEmulatorStatus | ||
Write-Host "Cosmos Status: $cosmosStatus" | ||
} While ($cosmosStatus -ne 'Running') | ||
Write-Host "Done" | ||
displayName: "Check Public Cosmos DB Emulator Status" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# DO NOT EDIT THIS FILE | ||
# This file is generated automatically and any changes will be lost. | ||
|
||
trigger: | ||
branches: | ||
include: | ||
- master | ||
- feature/* | ||
paths: | ||
include: | ||
- sdk/cosmosdb/ | ||
|
||
pr: | ||
branches: | ||
include: | ||
- master | ||
- feature/* | ||
paths: | ||
include: | ||
- sdk/cosmosdb/ | ||
|
||
jobs: | ||
- template: ../../eng/pipelines/templates/jobs/archetype-sdk-client.yml | ||
parameters: | ||
# Unit-tests are being skipped. So, matrix is not needed. | ||
Matrix: {} | ||
ServiceDirectory: cosmosdb | ||
|
||
- template: ../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml | ||
parameters: | ||
PackagePath: "sdk/cosmosdb/cosmos/" | ||
PackageName: "@azure/cosmos" | ||
Toolchain: rush | ||
Matrix: | ||
Windows_Node8: | ||
OSVmImage: "vs2017-win2016" | ||
NodeVersion: "8.x" | ||
TestType: "node" | ||
PreIntegrationSteps: cosmos-integration-public | ||
PostIntegrationSteps: cosmos-additional-steps | ||
EnvVars: | ||
MOCHA_TIMEOUT: 100000 | ||
NODE_TLS_REJECT_UNAUTHORIZED: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters