-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines-release.yaml
76 lines (64 loc) · 1.54 KB
/
azure-pipelines-release.yaml
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: 1.0.$(Date:yyyyMMdd)$(Rev:.r)
resources:
- repo: self
pool:
vmImage: 'ubuntu-latest'
trigger:
- master
steps:
- task: NodeTool@0
inputs:
versionSpec: '13.x'
checkLatest: true
- task: Npm@1
displayName: 'npm install'
inputs:
command: custom
verbose: false
customCommand: 'install'
- task: Npm@1
displayName: 'Run tests'
inputs:
command: custom
verbose: false
customCommand: 'run test-ci'
- task: Npm@1
displayName: 'Run Build'
inputs:
command: custom
verbose: false
customCommand: 'run build'
- task: PublishTestResults@2
displayName: Publish Test Results
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/junit.xml'
testRunTitle: 'Tests'
condition: always()
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage from **/coverage.cobertura.xml'
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage/**/cobertura-coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/coverage'
condition: always()
- task: Npm@1
displayName: 'Remove not production packages'
inputs:
command: custom
verbose: false
customCommand: 'prune --production'
- task: Docker@2
displayName: 'Login to Azure Container Registry'
inputs:
command: login
containerRegistry: DockerHub
- task: Docker@2
displayName: buildAndPush
inputs:
containerRegistry: DockerHub
repository: 'dutchjer/fish-timer'
Dockerfile: Dockerfile
tags: |
$(Build.BuildNumber)
latest