Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update github actions #191

Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions .github/workflows/azure-spring-boot-samples-action.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/java_ci_with_maven_adopt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven[adopt]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the run steps are commented out?

Copy link
Contributor Author

@backwind1233 backwind1233 Feb 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is for branch beta.4, which has not been released.
but Branch protection rules required status of the workflow
image


on: [push, pull_request]

jobs:
java-ci-with-maven-adopt:
runs-on: ubuntu-latest
steps:
- run: echo "🔎 The name of the branch is ${{ github.ref }} and the repository is ${{ github.repository }}."
# - uses: actions/checkout@v2
# - name: Set up JDK 11
# uses: actions/setup-java@v2
# with:
# java-version: '11'
# distribution: 'adopt'
# cache: maven
# - name: Build with Maven
# run: mvn -f pom.xml --batch-mode --update-snapshots verify
# - name: Set up JDK 8
# uses: actions/setup-java@v2
# with:
# java-version: '8'
# distribution: 'adopt'
# cache: maven
# - name: Build with Maven
# run: mvn -f pom.xml --batch-mode --update-snapshots verify
29 changes: 29 additions & 0 deletions .github/workflows/java_ci_with_maven_temurin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven[temurin]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just change the name to CI will be better

Copy link
Contributor Author

@backwind1233 backwind1233 Feb 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really?

I hope it could be clear
image

we can rename it to CI, If we use only adopt

The default name of the workflow template is Java CI with Maven


on: [push, pull_request]

jobs:
java-ci-with-maven-temurin:
runs-on: ubuntu-latest
steps:
- run: echo "🔎 The name of the branch is ${{ github.ref }} and the repository is ${{ github.repository }}."
# - uses: actions/checkout@v2
# - name: Set up JDK 11
# uses: actions/setup-java@v2
# with:
# java-version: '11'
# distribution: 'temurin'
# cache: maven
# - name: Build with Maven
# run: mvn -f pom.xml --batch-mode --update-snapshots verify
# - name: Set up JDK 8
# uses: actions/setup-java@v2
# with:
# java-version: '8'
# distribution: 'temurin'
# cache: maven
# - name: Build with Maven
# run: mvn -f pom.xml --batch-mode --update-snapshots verify
12 changes: 12 additions & 0 deletions .github/workflows/markdown-link-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Markdown links Check
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to 'Links Check'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated


on: [push, pull_request]

jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
config-file: '.github/workflows/mlc_config.json'
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
{
"pattern": "^http://proxyserver"
}
]
],
"aliveStatusCodes": [200, 403]
}
11 changes: 0 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
## Github actions of this repo

There are several github actions in this repo to do some basic checks with pull requests or branches.

| Action Name | Note |
| ------------------------------------------------------------ | ---------------------------- |
| [codeql-analysis](https://github.com/Azure-Samples/azure-spring-boot-samples/blob/main/.github/workflows/codeql-analysis.yml) | Code analysis |
| [check-style](https://github.com/Azure-Samples/azure-spring-boot-samples/tree/main/.github/workflows) | Java check style |
| [check-markdown-links](https://github.com/Azure-Samples/azure-spring-boot-samples/blob/main/.github/workflows/check-markdown-links.yml) | Check broken markdown links. |
| [azure-spring-boot-samples-action](https://github.com/Azure-Samples/azure-spring-boot-samples/blob/main/.github/workflows/azure-spring-boot-samples-action.yml) | Maven build check. |


## How to develop codes to this repo.

Expand Down
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
![codeql-analysis](https://github.com/Azure-Samples/azure-spring-boot-samples/actions/workflows/codeql-analysis.yml/badge.svg)
![markdown-link-check](https://github.com/Azure-Samples/azure-spring-boot-samples/actions/workflows/markdown-link-check.yml/badge.svg)
![java_ci_with_maven_adopt](https://github.com/Azure-Samples/azure-spring-boot-samples/actions/workflows/java_ci_with_maven_adopt.yml/badge.svg)

# Spring Cloud Azure Samples
- This is a sample project for demonstration purposes.
- The project demonstrates how to use [Spring Cloud Azure](https://microsoft.github.io/spring-cloud-azure/current/reference/html/index.html) to develop applications.
Expand Down Expand Up @@ -38,32 +42,33 @@
| App Configuration| [azure-spring-cloud-feature-management:2.2.0] | [feature-management-sample](appconfiguration/feature-management-sample) |
| App Configuration| [azure-spring-cloud-feature-management:2.2.0] | [feature-management-web-sample](appconfiguration/feature-management-web-sample) |
| App Configuration| [azure-spring-cloud-appconfiguration-config:2.3.0] | [azure-appconfiguration-conversion-sample-complete](appconfiguration/azure-appconfiguration-conversion-sample-complete) |
| Cache | N/A | [azure-spring-cloud-sample-cache](cache/spring-cloud-azure-starter/spring-cloud-azure-sample-cache) |
| Cloud Foundry | N/A | [azure-cloud-foundry-service-sample](cloudfoundry/azure-cloud-foundry-service-sample) |
| Cache | N/A | [azure-spring-cloud-sample-cache](cache/spring-cloud-azure-starter/spring-cloud-azure-sample-cache) |
| Cloud Foundry | N/A | [azure-cloud-foundry-service-sample](cloudfoundry/azure-cloud-foundry-service-sample) |
| Cosmos DB | [azure-spring-data-cosmos:3.17.0] | [cosmos-multi-database-multi-account](cosmos/azure-spring-data-cosmos/cosmos-multi-database-multi-account) |
| Cosmos DB | [azure-spring-data-cosmos:3.17.0] | [cosmos-multi-database-single-account](cosmos/azure-spring-data-cosmos/cosmos-multi-database-single-account) |
| Cosmos DB | [spring-cloud-azure-starter-data-cosmos:4.0.0-beta.4] | [spring-cloud-azure-data-cosmos-sample](cosmos/spring-cloud-azure-starter-data-cosmos/spring-cloud-azure-data-cosmos-sample) |
| Cosmos DB | [spring-cloud-azure-starter-cosmos:4.0.0-beta.4] | [spring-cloud-azure-cosmos-sample](cosmos/spring-cloud-azure-starter-cosmos/spring-cloud-azure-cosmos-sample) |
| Event Hubs | N/A | [spring-cloud-azure-sample-eventhubs-kafka](eventhubs/spring-cloud-azure-starter/spring-cloud-azure-sample-eventhubs-kafka) |
| Event Hubs | [spring-cloud-azure-starter-integration-eventhubs:4.0.0-beta.4] | [eventhubs-integration](eventhubs/spring-cloud-azure-starter-integration-eventhubs/eventhubs-integration) |
| Cosmos DB | [spring-cloud-azure-starter-data-cosmos:4.0.0-beta.4] | [spring-cloud-azure-data-cosmos-sample](cosmos/spring-cloud-azure-starter-data-cosmos/spring-cloud-azure-data-cosmos-sample) |
| Cosmos DB | [spring-cloud-azure-starter-cosmos:4.0.0-beta.4] | [spring-cloud-azure-cosmos-sample](cosmos/spring-cloud-azure-starter-cosmos/spring-cloud-azure-cosmos-sample) |
| Event Hubs | N/A | [spring-cloud-azure-sample-eventhubs-kafka](eventhubs/spring-cloud-azure-starter/spring-cloud-azure-sample-eventhubs-kafka) |
| Event Hubs | [spring-cloud-azure-starter-integration-eventhubs:4.0.0-beta.4] | [eventhubs-integration](eventhubs/spring-cloud-azure-starter-integration-eventhubs/eventhubs-integration) |
| Event Hubs | [spring-cloud-azure-stream-binder-eventhubs:4.0.0-beta.4] | [eventhubs-binder](eventhubs/spring-cloud-azure-stream-binder-eventhubs/eventhubs-binder) |
| Event Hubs | [spring-cloud-azure-stream-binder-eventhubs:4.0.0-beta.4] | [eventhubs-multibinders](eventhubs/spring-cloud-azure-stream-binder-eventhubs/eventhubs-multibinders) |
| Key Vault | [azure-spring-boot-starter-keyvault-certificates:3.13.0] | [keyvault-certificates-client-side](keyvault/azure-spring-boot-starter-keyvault-certificates/keyvault-certificates-client-side) |
| Key Vault | [azure-spring-boot-starter-keyvault-certificates:3.13.0] | [keyvault-certificates-server-side](keyvault/azure-spring-boot-starter-keyvault-certificates/keyvault-certificates-server-side) |
| Key Vault | | [run-with-command-line-server-side](keyvault/azure-securtiy-keyvault-jca/run-with-command-line-server-side) |
| Key Vault | | [run-with-command-line-client-side](keyvault/azure-securtiy-keyvault-jca/run-with-command-line-client-side) |
| Key Vault | [spring-cloud-azure-starter-keyvault-secrets:4.0.0-beta.4] | [keyvault-secrets](keyvault/spring-cloud-azure-starter-keyvault-secrets/keyvault-secrets) |
| Key Vault | [spring-cloud-azure-starter-keyvault-secrets:4.0.0-beta.4] | [multiple-property-source](keyvault/spring-cloud-azure-starter-keyvault-secrets/multiple-property-source) |
| Key Vault | [spring-cloud-azure-starter-keyvault-secrets:4.0.0-beta.4] | [single-property-source](keyvault/spring-cloud-azure-starter-keyvault-secrets/single-property-source) |
| Service Bus | [spring-cloud-azure-starter-servicebus-jms:4.0.0-beta.4] | [servicebus-jms-queue](servicebus/spring-cloud-azure-starter-servicebus-jms/servicebus-jms-queue) |
| Service Bus | [spring-cloud-azure-starter-servicebus-jms:4.0.0-beta.4] | [servicebus-jms-topic](servicebus/spring-cloud-azure-starter-servicebus-jms/servicebus-jms-topic) |
| Service Bus | [spring-cloud-azure-starter-integration-servicebus:4.0.0-beta.4] | [single-namespace](servicebus/spring-cloud-azure-starter-integration-servicebus/single-namespace) |
| Service Bus | [spring-cloud-azure-starter-integration-servicebus:4.0.0-beta.4] | [multiple-namespaces](servicebus/spring-cloud-azure-starter-integration-servicebus/multiple-namespaces) |
| Service Bus | [spring-cloud-azure-starter-integration-servicebus:4.0.0-beta.4] | [multiple-namespaces](servicebus/spring-cloud-azure-starter-integration-servicebus/multiple-namespaces) |
| Service Bus | [spring-cloud-azure-stream-binder-servicebus:4.0.0-beta.4] | [servicebus-queue-binder](servicebus/spring-cloud-azure-stream-binder-servicebus/servicebus-queue-binder) |
| Service Bus | [spring-cloud-azure-stream-binder-servicebus:4.0.0-beta.4] | [servicebus-queue-multibinders](servicebus/spring-cloud-azure-stream-binder-servicebus/servicebus-queue-multibinders) |
| Service Bus | [spring-cloud-azure-stream-binder-servicebus:4.0.0-beta.4] | [servicebus-queue-multibinders](servicebus/spring-cloud-azure-stream-binder-servicebus/servicebus-multibinders) |
| Service Bus | [spring-cloud-azure-stream-binder-servicebus:4.0.0-beta.4] | [servicebus-topic-binder](servicebus/spring-cloud-azure-stream-binder-servicebus/servicebus-topic-binder) |
| Storage | [spring-cloud-azure-starter-storage-blob:4.0.0-beta.4] | [storage-blob-sample](storage/spring-cloud-azure-starter-storage-blob/storage-blob-sample)
| Storage | [spring-cloud-azure-starter-storage-file-share:4.0.0-beta.4] | [storage-file-sample](storage/spring-cloud-azure-starter-storage-file-share/storage-file-sample) |
| Storage | [spring-cloud-azure-starter-integration-storage-queue:4.0.0-beta.4] | [storage-queue-integration](storage/spring-cloud-azure-starter-integration-storage-queue/storage-queue-integration) |
| Storage | [spring-cloud-azure-starter-integration-storage-queue:4.0.0-beta.4] | [storage-queue-operation](storage/spring-cloud-azure-starter-integration-storage-queue/storage-queue-operation) |
| Storage | [spring-cloud-azure-starter-integration-storage-queue:4.0.0-beta.4] | [storage-queue-integration](storage/spring-cloud-azure-starter-integration-storage-queue/storage-queue-integration) |
| Storage | [spring-cloud-azure-starter-integration-storage-queue:4.0.0-beta.4] | [storage-queue-operation](storage/spring-cloud-azure-starter-integration-storage-queue/storage-queue-operation) |

## Running Samples With Terraform
With [terraform](https://www.terraform.io/) scripts and [DefaultAzureCredential](https://microsoft.github.io/spring-cloud-azure/current/reference/html/index.html#defaultazurecredential), most samples in the project can be run with the same 4 steps below:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ You will build an application using the Spring Boot Starter Redis, Spring Cloud
This sample will create Azure resources using Terraform. If you choose to run it without using Terraform to provision resources, please pay attention to:
> [!IMPORTANT]
> If you choose to use a security principal to authenticate and authorize with Azure Active Directory for accessing an Azure resource
> please refer to [Authorize access with Azure AD](https://microsoft.github.io/spring-cloud-azure/docs/current/reference/html/index.html#authorize-access-with-azure-active-directory) to make sure the security principal has been granted the sufficient permission to access the Azure resource.
> please refer to [Authorize access with Azure AD](https://microsoft.github.io/spring-cloud-azure/current/reference/html/index.html#authorize-access-with-azure-active-directory) to make sure the security principal has been granted the sufficient permission to access the Azure resource.

### Authenticate Using the Azure CLI
Terraform must authenticate to Azure to create infrastructure.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ jdk 11.0.12 or above

<!-- LINKS -->
[azure-security-keyvault-jca]: https://mvnrepository.com/artifact/com.azure/azure-security-keyvault-jca
[client sample]: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/main/keyvault/azure-security-keyvault-jca/run-with-command-line-client-side/README.md
[client sample]: ../run-with-command-line-client-side/README.md
2 changes: 1 addition & 1 deletion spring-petclinic-microservices/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ In order to deploy a Java app to cloud, you need an Azure subscription. If you d
an Azure subscription, you can activate your
[MSDN subscriber benefits](https://azure.microsoft.com/pricing/member-offers/msdn-benefits-details/)
or sign up for a
[free Azure account]((https://azure.microsoft.com/free/)).
[free Azure account](https://azure.microsoft.com/free/).

In addition, you will need the following:

Expand Down