From bfdcba0935700bb538539700828e0f2a46222027 Mon Sep 17 00:00:00 2001 From: Santhosh Nair <913441@dadeschools.net> Date: Wed, 30 Aug 2023 23:56:00 +0000 Subject: [PATCH] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..0d07e7a --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,35 @@ +trigger: +- docker-branch + +pool: + vmImage: 'ubuntu-latest' + +stages: +- stage: Checkout + jobs: + - job: CheckoutJob + steps: + - checkout: self + +- stage: BuildAndTest + jobs: + - job: BuildAndTestJob + steps: + - script: dotnet restore + displayName: 'Restore .NET dependencies' + + - script: dotnet build --configuration Release + displayName: 'Build .NET project' + + - script: dotnet test path/to/your/test/project.csproj --configuration Release + displayName: 'Run .NET tests' + +- stage: Deploy + jobs: + - job: DeployJob + steps: + - script: docker-compose -f docker-compose.yml -f docker-compose.prod.yml build + displayName: 'Build Docker Images' + + - script: docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d + displayName: 'Deploy using Docker Compose'