-
Notifications
You must be signed in to change notification settings - Fork 2
/
azure-pipelines.yml
80 lines (68 loc) · 2 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
trigger:
- master
variables:
- group: plex
- 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\PlexCrawler.sln'
versioningScheme: 'off'
publishWebProjects: false
zipAfterPublish: false
arguments: '-p:CONFIGURATION=Release'
- task: CopyFiles@2
displayName: Copy crawler to artifacts
inputs:
Contents: 'Crawler\PlexCrawler\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: DownloadFile@1
displayName: Download Plex installer
inputs:
FileUrl: '$(plex.url)'
DestinationFolder: '$(System.DefaultWorkingDirectory)\PlexSetup'
requireAuthentication: false
- task: RegexReplace@3
displayName: Generate Dockerfile for the given version
inputs:
InputSearchPattern: 'Dockerfile'
FindRegex: '\{plex\.installer\}'
ReplaceRegex: '$(plex.installer)'
UseUTF8: true
- task: CopyFiles@2
displayName: Copy Dockerfile and Plex installer to artifacts
inputs:
Contents: |
config.txt
Dockerfile
PlexSetup\**
TargetFolder: '$(Build.ArtifactStagingDirectory)\Docker'
- task: PublishBuildArtifacts@1
displayName: Publish docker artifacts
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\Docker'
ArtifactName: 'Docker'
publishLocation: 'Container'
- task: Docker@2
inputs:
command: 'build'
Dockerfile: '**/Dockerfile'
tags: dev.$(Build.BuildId)