forked from code4romania/anabi-gestiune-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines-docker.yml
29 lines (25 loc) · 1.08 KB
/
azure-pipelines-docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Docker image
# Build a Docker image to run, deploy, or push to a container registry.
# Add steps that use Docker Compose, tag images, push to a registry, run an image, and more:
# https://docs.microsoft.com/vsts/pipelines/languages/docker
pool:
vmImage: 'Ubuntu 16.04'
variables:
imageName: 'anabi_api_with_db:$(build.buildId)'
buildConfiguration: 'Release'
steps:
- script: |
dotnet build --configuration $(buildConfiguration)
dotnet test anabi.domain.tests --configuration $(buildConfiguration) --logger trx
dotnet test anabicontrollers.tests --configuration $(buildConfiguration) --logger trx
dotnet test anabi.integration.tests --configuration $(buildConfiguration) --logger trx
dotnet publish --configuration $(buildConfiguration) --output out
docker build -f Dockerfile -t $(dockerId).azurecr.io/$(imageName) .
docker login -u $(dockerId) -p $pswd $(dockerid).azurecr.io
docker push $(dockerId).azurecr.io/$(imageName)
env:
pswd: $(dockerPassword)
- task: PublishTestResults@2
inputs:
testRunner: VSTest
testResultsFiles: '**/*.trx'