Set up CI with Azure Pipelines
[skip ci]
This commit is contained in:
parent
93ef278429
commit
bfdcba0935
35
azure-pipelines.yml
Normal file
35
azure-pipelines.yml
Normal file
@ -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'
|
Loading…
Reference in New Issue
Block a user