Skip to content

Commit

Permalink
Implement new version schema for cosmosdb starter (Azure#14465)
Browse files Browse the repository at this point in the history
* Correct usage, small time is first parameter, otherwise the result is negative

* update cosmosdb starter artfact id

* Implement new version schema for cosmosdb starter
Azure#14369

* update readme link broken;add python ignore dir

* update readme link broken

* update indentation

* refer to reviewer' comment and update

* refer to reviewer' comment and update

* refer to reviewer's comment and update

* update change log

* fix test error and update python code

* fix test error

* update indentation and markdown

* update python log

* update pom description

* update indentation in spring/test.yml

* update readme link address

* update readme link address

* update spring live test config

* update spring live test config
  • Loading branch information
moarychan authored Aug 31, 2020
1 parent 8880b04 commit a5acccf
Show file tree
Hide file tree
Showing 29 changed files with 570 additions and 142 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,7 @@ jacoco.exec

# Generated client pom file
ClientAggregatePom.xml


# Anaconda virtual
venv
9 changes: 7 additions & 2 deletions eng/jacoco-test-coverage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,13 @@
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-cosmosdb-spring-boot-starter</artifactId>
<version>2.4.0-beta.1</version> <!-- {x-version-update;com.microsoft.azure:azure-cosmosdb-spring-boot-starter;current} -->
<artifactId>azure-cosmosdb-spring-boot-2-3-starter</artifactId>
<version>2.4.0-beta.1</version> <!-- {x-version-update;com.microsoft.azure:azure-cosmosdb-spring-boot-2-3-starter;current} -->
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-cosmosdb-spring-boot-2-2-starter</artifactId>
<version>2.4.0-beta.1</version> <!-- {x-version-update;com.microsoft.azure:azure-cosmosdb-spring-boot-2-2-starter;current} -->
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/templates/stages/cosmos-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ stages:
- script: |
python --version
python -m pip install setuptools termcolor in_place
python sdk/spring/scripts/replace_artifact.py --module cosmos --log debug --color false
python sdk/spring/scripts/replace_util.py --module cosmos --log debug --color false
condition: eq(variables['DisplayName'], 'Spring Emulator only Integration Tests')
displayName: 'Run replace_artifact.py'
displayName: 'Run replace_util.py'
- task: Maven@3
condition: eq(variables['DisplayName'], 'Spring Emulator only Integration Tests')
displayName: 'Run tests again: $(DisplayName)'
Expand Down
9 changes: 9 additions & 0 deletions eng/versioning/external_dependencies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -320,5 +320,14 @@ storage_com.microsoft.azure:azure-storage;8.4.0
# sdk\spring\azure-spring-boot\pom.xml
spring_com.microsoft.azure:azure;1.34.0

# sdk\spring\azure-spring-boot-2-2-starter-cosmosdb\pom.xml
springboot22_com.microsoft.azure:spring-data-cosmosdb;2.2.2.M2
springboot22_org.springframework.boot:spring-boot-starter;2.2.9.RELEASE
springboot22_org.springframework.boot:spring-boot;2.2.9.RELEASE
springboot22_org.springframework.boot:spring-boot-starter-validation;2.2.9.RELEASE
springboot22_org.springframework.boot:spring-boot-starter-test;2.2.9.RELEASE
springboot22_org.springframework.boot:spring-boot-starter-actuator;2.2.9.RELEASE
springboot22_org.springframework.boot:spring-boot-starter-web;2.2.9.RELEASE

# sdk\cosmos
springdata22_org.springframework.data:spring-data-commons;2.2.9.RELEASE
3 changes: 2 additions & 1 deletion eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ com.azure.resourcemanager:azure-resourcemanager-storage;2.0.0-beta.3;2.0.0-beta.
com.azure.resourcemanager:azure-resourcemanager-test;2.0.0-beta.4;2.0.0-beta.4
com.microsoft.azure:azure-active-directory-b2c-spring-boot-starter;2.3.3;2.4.0-beta.1
com.microsoft.azure:azure-active-directory-spring-boot-starter;2.3.3;2.4.0-beta.1
com.microsoft.azure:azure-cosmosdb-spring-boot-starter;2.3.3;2.4.0-beta.1
com.microsoft.azure:azure-cosmosdb-spring-boot-2-3-starter;2.4.0-beta.1;2.4.0-beta.1
com.microsoft.azure:azure-cosmosdb-spring-boot-2-2-starter;2.4.0-beta.1;2.4.0-beta.1
com.microsoft.azure:azure-data-gremlin-spring-boot-starter;2.3.3;2.4.0-beta.1
com.microsoft.azure:azure-keyvault-secrets-spring-boot-starter;2.3.3;2.4.0-beta.1
com.microsoft.azure:azure-servicebus-jms-spring-boot-starter;2.3.3;2.4.0-beta.1
Expand Down
4 changes: 2 additions & 2 deletions sdk/cosmos/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ jobs:
- script: |
python --version
python -m pip install setuptools termcolor in_place
python sdk/spring/scripts/replace_artifact.py --module cosmos --log debug --color false
displayName: 'Run replace_artifact.py'
python sdk/spring/scripts/replace_util.py --module cosmos --log debug --color false
displayName: 'Run replace_util.py'
- task: Maven@3
displayName: 'Build and Install again, JDK Version: $(JavaBuildVersion)'
inputs:
Expand Down
4 changes: 3 additions & 1 deletion sdk/spring/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ Starter Name | Version for Spring Boot 2.3.x | Version for Spring Boot 2.2.x | V
[azure-storage-spring-boot-starter](azure-spring-boot-starter-storage/README.md) | N/A | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-storage-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-storage-spring-boot-starter%22) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-storage-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-storage-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-storage-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-storage-spring-boot-starter%20AND%20v:2.0.*)
[azure-keyvault-secrets-spring-boot-starter](azure-spring-boot-starter-keyvault-secrets/README.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-keyvault-secrets-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-keyvault-secrets-spring-boot-starter%22) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-keyvault-secrets-spring-boot-starter/2.2.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-keyvault-secrets-spring-boot-starter%20AND%20v:2.2.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-keyvault-secrets-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-keyvault-secrets-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-keyvault-secrets-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-keyvault-secrets-spring-boot-starter%20AND%20v:2.0.*)
[azure-active-directory-b2c-spring-boot-starter](azure-spring-boot-starter-active-directory-b2c/README.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-active-directory-b2c-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-active-directory-b2c-spring-boot-starter%22) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-active-directory-b2c-spring-boot-starter/2.2.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-active-directory-b2c-spring-boot-starter%20AND%20v:2.2.*) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-active-directory-b2c-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-active-directory-b2c-spring-boot-starter%20AND%20v:2.1.*) | N/A
[azure-cosmosdb-spring-boot-starter](azure-spring-boot-starter-cosmosdb/README.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-cosmosdb-spring-boot-starter%22) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.2.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.2.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.0.*)
azure-cosmosdb-spring-boot-starter | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-cosmosdb-spring-boot-starter%22) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.2.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.2.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-cosmosdb-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-cosmosdb-spring-boot-starter%20AND%20v:2.0.*)
[azure-cosmosdb-spring-boot-2-2-starter](azure-spring-boot-2-2-starter-cosmosdb/README.md) | N/A | N/A | N/A | N/A
[azure-cosmosdb-spring-boot-2-3-starter](azure-spring-boot-2-3-starter-cosmosdb/README.md) | N/A | N/A | N/A | N/A
[azure-mediaservices-spring-boot-starter](azure-spring-boot-starter-mediaservices/README.md) | N/A | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-mediaservices-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-mediaservices-spring-boot-starter%22) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-mediaservices-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-mediaservices-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-mediaservices-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-mediaservices-spring-boot-starter%20AND%20v:2.0.*)
[azure-servicebus-spring-boot-starter](azure-spring-boot-starter-servicebus/README.md) | N/A | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-servicebus-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22azure-servicebus-spring-boot-starter%22) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-servicebus-spring-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-servicebus-spring-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/azure-servicebus-spring-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:azure-servicebus-spring-boot-starter%20AND%20v:2.0.*)
[spring-data-gremlin-boot-starter](azure-spring-boot-starter-data-gremlin/README.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/spring-data-gremlin-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20a%3A%22spring-data-gremlin-boot-starter%22) | [![Maven Central](https://img.shields.io/maven-central/v/com.microsoft.azure/spring-data-gremlin-boot-starter/2.2.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:spring-data-gremlin-boot-starter%20AND%20v:2.2.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/spring-data-gremlin-boot-starter/2.1.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:spring-data-gremlin-boot-starter%20AND%20v:2.1.*) | [![](https://img.shields.io/maven-central/v/com.microsoft.azure/spring-data-gremlin-boot-starter/2.0.svg)](https://search.maven.org/search?q=g:com.microsoft.azure%20AND%20a:spring-data-gremlin-boot-starter%20AND%20v:2.0.*)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Release History


## 2.4.0-beta.1 (Unreleased)
57 changes: 57 additions & 0 deletions sdk/spring/azure-spring-boot-2-2-starter-cosmosdb/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Azure Cosmos DB Spring Boot 2.2 Starter client library for Java

[Azure Cosmos DB](https://azure.microsoft.com/services/cosmos-db/) is a globally-distributed database service that allows developers to work with data using a variety of standard APIs, such as SQL, MongoDB, Graph, and Azure Table storage.

[Package (Maven)][package] | [API reference documentation][refdocs] | [Product documentation][docs] | [Samples][sample]

## Getting started
### Prerequisites
- Java Development Kit (JDK) with version 8 or above
- [Azure Subscription][azure_subscription]
- [Maven](http://maven.apache.org/) 3.0 and above

### Include the package
[//]: # ({x-version-update-start;com.microsoft.azure:azure-cosmosdb-spring-boot-2-2-starter;current})
```xml
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-cosmosdb-spring-boot-2-2-starter</artifactId>
<version>2.4.0-beta.1</version>
</dependency>
```
[//]: # ({x-version-update-end})

## Key concepts
Please refer to [Azure Cosmos DB Spring Boot 2.3 Starter][azure_spring_boot_2_3_starter_cosmosdb_readme_key_concepts] for key concepts.

## Examples
Please refer to [Azure Cosmos DB Spring Boot 2.3 Starter][azure_spring_boot_2_3_starter_cosmosdb_readme_examples] for examples.

## Troubleshooting
Please refer to [Azure Cosmos DB Spring Boot 2.3 Starter][azure_spring_boot_2_3_starter_cosmosdb_readme_troubleshooting] for troubleshooting.

## Next steps

Besides using this Azure CosmosDb Spring Boot Starter, you can directly use Spring Data for Azure CosmosDb package for more complex scenarios. Please refer to [Spring Data for Azure CosmosDB](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-spring-data-cosmos-core) for more details.

The following section provide a sample project illustrating how to use the starter.
### More sample code
- [Cosmos DB SQL API][cosmos_db_sql_api]

## Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

Please follow [instructions here][contributing_readme] to build from source or contribute.

<!-- LINKS -->
[docs]: https://docs.microsoft.com/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-cosmos-db
[refdocs]: https://azure.github.io/azure-sdk-for-java/spring.html#azure-cosmosdb-spring-boot-starter
[package]: https://mvnrepository.com/artifact/com.microsoft.azure/azure-cosmosdb-spring-boot-starter
[sample]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmosdb
[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application
[azure_subscription]: https://azure.microsoft.com/free
[azure_spring_boot_2_3_starter_cosmosdb_readme_key_concepts]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-2-3-starter-cosmosdb#key-concepts
[azure_spring_boot_2_3_starter_cosmosdb_readme_examples]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-2-3-starter-cosmosdb#examples
[azure_spring_boot_2_3_starter_cosmosdb_readme_troubleshooting]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-2-3-starter-cosmosdb#troubleshooting
[cosmos_db_sql_api]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-cosmosdb
[contributing_readme]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/spring/CONTRIBUTING.md
Loading

0 comments on commit a5acccf

Please sign in to comment.