Build | Status |
---|---|
Github Actions no docker | |
Github Actions docker | |
Azure Devops no docker | |
Azure Devops docker |
Demo project of an ASP.NET Core 7 minimal API's. Inspired by the demo from Daniel Roth that has been given at dotnetconf. See the original presentation below:
The following prerequisites are required before executing the pipelines:
- Ensure you have a Github account
- Create a new public repository
- Create a new Action Secret for the repository with the name:
SA_PASSWORD
. The value of this field should be a complex password according to SQL Server. - Create a new Action Secret for the repository with the name:
AZURE_SQL_USER
. Name of the admin user for SQL Server. - Create a service principal as described here and store it as an Repository secret with the name
AZURE_CREDENTIALS
- Grant the service principal the owner role on subscription level
- Grant the service principal the User Account Administrator role on subscription level
- Create a new environment with the name: AzureProvision:
- Create a secret
SUBSCRIPTION
the value is the subscription id in which the service principal above is created - Create a secret
DATACENTER
the value is the region of Azure in which the resources will be deployed
- Create a new environment with the name: AzureRemove:
- Add a reviewer to the environment
The following prerequisites are required before executing the pipelines:
- Ensure you have a Microsoft account
- If you don't have a Microsoft account signup here for a new one.
- Browse to: https://dev.azure.com and select 'start for free'
- Fill in the data and pick a name for your project. Set project visibility to 'private'
- Note down the name of your Azure Devops organization you just created. The name of the organization is the same name as the project that is just created. So:
dev.azure.com/<JustCreatedProjectName>
- Create a request for parallel jobs through this form. Fill in with the following data:
- Wait untill the request is approved.
- Import the code of this repo in Azure Devops.
- Create a variable group with the name: TodoItemsApi-Build.
- Create in this variable group a variable named:
SA_PASSWORD
. The value of this field should be a complex password according to SQL Server. Make this field a secret.
- Create in this variable group a variable named:
- Create an Azure Resource Manager Service Connection (Service Principal)
- Name the service connection: Azure
- Grant the service principal the owner role on subscription level
- Grant the service principal the User Account Administrator role on subscription level
- Create a variable group with the name: AzureSecrets and create the following variables:
subscriptionId
value the subscription id of the Azure subscription for which a service connection is created in the steps above.todoItemsSqlAdminpassword
The value of this field should be a complex password according to SQL Server. Make this field a secret.todoItemsSqlAdminUser
Name of the admin user for SQL Server.
- Import nodocker.yml
- Follow the steps in CI build
- Create a Github Account
- Create a PAT token. Enable the scopes
write:packages
.
- Create a PAT token. Enable the scopes
- Create a new Service Connection with the following content
- Import docker.yml