Skip to content

Olivier-OG/TodoItems

 
 

Repository files navigation

Build Status
Github Actions no docker Build TodoItems
Github Actions docker Build TodoItems Docker
Azure Devops no docker Build Status
Azure Devops docker Build Status

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:
YoutubePreview

Prerequisites

Prerequisites Github

The following prerequisites are required before executing the pipelines:

  1. Ensure you have a Github account
  2. Create a new public repository
  3. 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.
  4. Create a new Action Secret for the repository with the name: AZURE_SQL_USER. Name of the admin user for SQL Server.
  5. 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
  1. 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
  1. Create a new environment with the name: AzureRemove:
  • Add a reviewer to the environment

Prerequisites Azure Devops

The following prerequisites are required before executing the pipelines:

  1. Ensure you have a Microsoft account
    • If you don't have a Microsoft account signup here for a new one.
  2. Browse to: https://dev.azure.com and select 'start for free'
    Sign up for Azure Devops
  3. Fill in the data and pick a name for your project. Set project visibility to 'private'
    Create project with visibility private
  4. 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>
  5. Create a request for parallel jobs through this form. Fill in with the following data:
    Data required for parallelism request
    • Wait untill the request is approved.

CI build (nodocker)

  1. Import the code of this repo in Azure Devops.
  2. Create a variable group with the name: TodoItemsApi-Build.
  3. 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
  4. 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.
  5. Import nodocker.yml

CI build (docker)

  1. Follow the steps in CI build
  2. Create a Github Account
    • Create a PAT token. Enable the scopes write:packages.
  3. Create a new Service Connection with the following content
    Docker service connection
  4. Import docker.yml

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 61.8%
  • Bicep 37.6%
  • Dockerfile 0.6%