-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
81 lines (67 loc) · 2.18 KB
/
azure-pipelines.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
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
77
78
79
80
81
trigger:
- master
variables:
# The lastest most stable version (as of 2019-06-19, this should be 'beta')
- group: duplicati-default
- group: duplicati-stable
- group: duplicati-beta
- group: duplicati-experimental
- group: duplicati-canary
- name: BuildConfiguration
value: Release
pool:
vmImage: 'windows-2019'
steps:
- task: PowerShell@2
displayName: Get config
inputs:
filePath: 'azure-pipelines.get-config.ps1'
failOnStderr: true
## Crawler ######################################################################
- task: DotNetCoreCLI@2
displayName: Build crawler
inputs:
command: 'publish'
projects: 'Crawler\DuplicatiCrawler.sln'
versioningScheme: 'off'
publishWebProjects: false
zipAfterPublish: false
arguments: '-p:CONFIGURATION=Release'
- task: CopyFiles@2
displayName: Copy crawler to artifacts
inputs:
Contents: 'Crawler\DuplicatiCrawler\bin\Release\**\publish\**'
TargetFolder: '$(Build.ArtifactStagingDirectory)\Crawler'
- task: PublishBuildArtifacts@1
displayName: Publish crawler artifacts
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\Crawler'
ArtifactName: 'Crawler'
publishLocation: 'Container'
## Docker ######################################################################
- task: RegexReplace@3
displayName: Generate Dockerfile with the given installer url
inputs:
InputSearchPattern: 'Dockerfile'
FindRegex: '\{duplicati\.install\}'
ReplaceRegex: '$(duplicati.install)'
UseUTF8: true
- task: CopyFiles@2
displayName: Copy Dockerfile to artifacts
inputs:
Contents: 'Dockerfile'
TargetFolder: '$(Build.ArtifactStagingDirectory)\Docker'
- task: PublishBuildArtifacts@1
displayName: Publish Dockerfile (and config) artifacts
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\Docker'
ArtifactName: 'Docker file'
publishLocation: 'Container'
# This is the last task as it's the longest, and we don't needs it output
- task: Docker@2
displayName: Validate that the generated Dockerfile is valid
inputs:
containerRegistry: 'd8823755-22d5-49e3-a0cc-47a2cbd425b8'
repository: 'dr1rrb/duplicati-win'
command: 'build'
tags: latest