Skip to content

Commit

Permalink
Update actions for the changes of sdk/spring (#25)
Browse files Browse the repository at this point in the history
update actions for spring directory changes
  • Loading branch information
Netyyyy authored Sep 12, 2023
1 parent 0b6fa78 commit 1cf6616
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/update-spring-cloud-azure-support-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
if [[ $(git ls-remote --heads ${{ secrets.BRANCH_REPO }} update-spring-cloud-azure-support-file | wc -l) -eq 0 ]]; then
cd azure-sdk-for-java
git checkout -b update-spring-cloud-azure-support-file
cp -f ../spring-cloud-azure-supported-spring.json sdk/spring
cp -f ../spring-cloud-azure-supported-spring.json sdk/spring/pipeline
if [[ -n "$(git status -s)" ]]; then
echo "need_update_file=true" >> $GITHUB_ENV
else
Expand All @@ -43,7 +43,7 @@ jobs:
cd azure-sdk-for-java
git config --global user.email github-actions@github.com
git config --global user.name github-actions
git add sdk/spring/spring-cloud-azure-supported-spring.json
git add sdk/spring/pipeline/spring-cloud-azure-supported-spring.json
git commit -m "Update Spring Boot and Spring Cloud versions for the compatibility test. This commit is created by GitHub Action: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}"
git push "https://${{ secrets.USER }}:${{ secrets.ACCESS_TOKEN }}@github.com/${{ secrets.USER }}/azure-sdk-for-java.git"
- name: Create Pull Request
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This repo contains a [github actions](.github/workflows/sonar-spring-cloud-azure
## Automated test spring boot and spring cloud compatibility

This tool set aims to automate the process of testing compatibility of Spring Cloud Azure with Spring Boot and Spring Cloud. The automation includes:
- [Defining the target versions of Spring Boot / Spring Cloud](https://github.com/Azure/spring-cloud-azure-tools/actions/workflows/update-spring-cloud-azure-support-file.yml), which will maintain a `spring-cloud-azure-supported-spring.json` file in [azure-sdk-for-java/sdk/spring](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/spring-cloud-azure-supported-spring.json). See [this](./information-about-spring-cloud-azure-supported-spring-json-file.md) for more details about the json file definition.
- [Defining the target versions of Spring Boot / Spring Cloud](https://github.com/Azure/spring-cloud-azure-tools/actions/workflows/update-spring-cloud-azure-support-file.yml), which will maintain a `spring-cloud-azure-supported-spring.json` file in [azure-sdk-for-java/sdk/spring](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/pipeline/spring-cloud-azure-supported-spring.json). See [this](./information-about-spring-cloud-azure-supported-spring-json-file.md) for more details about the json file definition.
- [Upgrade the dependency versions](https://github.com/Azure/spring-cloud-azure-tools/actions/workflows/update-spring-dependencies.yml) of Spring Cloud Azure that are managed by Spring Boot and Spring Cloud.
- Run compatibility tests in the `azure-sdk-for-java` repo, see the [job definition](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/compatibility-tests.yml).

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[spring-cloud-azure-supported-spring.json](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/spring-cloud-azure-supported-spring.json) file is to record **Spring Cloud Azure**'s support status of **Spring Boot** and **Spring Cloud** versions.
[spring-cloud-azure-supported-spring.json](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/pipeline/spring-cloud-azure-supported-spring.json) file is to record **Spring Cloud Azure**'s support status of **Spring Boot** and **Spring Cloud** versions.
Also provide information for `spring - compatibility - tests`.

Following is a metadata from the file:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
/**
* This Runner is used to generate the newest spring-cloud-azure-supported-spring.json file for
* spring compatibility tests, which contains information about Spring Boot and Spring Cloud supported by Azure,
* such as: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/spring-cloud-azure-supported-spring.json
* such as: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/pipeline/spring-cloud-azure-supported-spring.json
*/
@ConditionalOnProperty("update-spring-cloud-azure-support-file")
@Component
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import lombok.Data;

/**
* https://raw.githubusercontent.com/Azure/azure-sdk-for-java/main/sdk/spring/spring-cloud-azure-supported-spring.json
* https://raw.githubusercontent.com/Azure/azure-sdk-for-java/main/sdk/spring/pipeline/spring-cloud-azure-supported-spring.json
*
* [
* {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

/**
* Read SpringCloudAzure supportStatus from https://raw.githubusercontent
* .com/Azure/azure-sdk-for-java/main/sdk/spring/spring-cloud-azure-supported-spring.json
* .com/Azure/azure-sdk-for-java/main/sdk/spring/pipeline/spring-cloud-azure-supported-spring.json
*/
public class SpringCloudAzureSupportMetadataReader {

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
spring.metadata.url=https://spring.io/project_metadata/
spring.initializr.actuator-info-url=https://start.spring.io/actuator/info
spring.azure.support-metadata-url=https://raw.githubusercontent.com/Azure/azure-sdk-for-java/main/sdk/spring/spring-cloud-azure-supported-spring.json
spring.azure.support-metadata-url=https://raw.githubusercontent.com/Azure/azure-sdk-for-java/main/sdk/spring/pipeline/spring-cloud-azure-supported-spring.json
spring.azure.external-dependencies-file-url=https://raw.githubusercontent.com/Azure/azure-sdk-for-java/main/eng/versioning/external_dependencies.txt
spring.release.release-notes-url=https://github.com/spring-projects/spring-boot/releases/tag/v
debug=true
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class SpringCloudAzureSupportMetadataReaderTest {
private final RestTemplate restTemplate = new RestTemplate();
private final String supportMetadataUrl = "https://raw.githubusercontent"
+ ".com/Azure/azure-sdk-for-java/main/sdk/spring/spring-cloud-azure-supported-spring.json";
+ ".com/Azure/azure-sdk-for-java/main/sdk/spring/pipeline/spring-cloud-azure-supported-spring.json";

@Test
void testUrl() {
Expand Down

0 comments on commit 1cf6616

Please sign in to comment.