2020-01-13 15:22:52 +00:00
|
|
|
parameters:
|
2020-06-07 05:38:46 +00:00
|
|
|
LinuxImage: 'ubuntu-latest'
|
|
|
|
RestoreBuildProjects: 'Jellyfin.Server/Jellyfin.Server.csproj'
|
2021-09-25 12:21:48 +00:00
|
|
|
DotNetSdkVersion: 6.0.x
|
2020-01-13 15:22:52 +00:00
|
|
|
|
|
|
|
jobs:
|
2020-04-07 16:36:36 +00:00
|
|
|
- job: Build
|
|
|
|
displayName: Build
|
2020-01-13 15:22:52 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
Release:
|
|
|
|
BuildConfiguration: Release
|
|
|
|
Debug:
|
|
|
|
BuildConfiguration: Debug
|
|
|
|
pool:
|
2020-06-07 05:38:46 +00:00
|
|
|
vmImage: '${{ parameters.LinuxImage }}'
|
2020-01-13 15:22:52 +00:00
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
clean: true
|
|
|
|
submodules: true
|
|
|
|
persistCredentials: true
|
|
|
|
|
2020-04-12 17:20:37 +00:00
|
|
|
- task: DownloadPipelineArtifact@2
|
2020-06-07 05:38:46 +00:00
|
|
|
displayName: 'Download Web Branch'
|
2020-04-12 17:20:37 +00:00
|
|
|
condition: in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'BuildCompletion')
|
2020-01-13 15:22:52 +00:00
|
|
|
inputs:
|
2020-04-12 17:20:37 +00:00
|
|
|
path: '$(Agent.TempDirectory)'
|
|
|
|
artifact: 'jellyfin-web-production'
|
|
|
|
source: 'specific'
|
2020-04-12 17:27:42 +00:00
|
|
|
project: 'jellyfin'
|
|
|
|
pipeline: 'Jellyfin Web'
|
2020-04-12 17:20:37 +00:00
|
|
|
runBranch: variables['Build.SourceBranch']
|
2020-01-13 15:22:52 +00:00
|
|
|
|
2020-04-12 17:20:37 +00:00
|
|
|
- task: DownloadPipelineArtifact@2
|
2020-06-07 05:38:46 +00:00
|
|
|
displayName: 'Download Web Target'
|
2020-04-13 05:34:31 +00:00
|
|
|
condition: eq(variables['Build.Reason'], 'PullRequest')
|
2020-01-13 15:22:52 +00:00
|
|
|
inputs:
|
2020-04-12 17:20:37 +00:00
|
|
|
path: '$(Agent.TempDirectory)'
|
|
|
|
artifact: 'jellyfin-web-production'
|
|
|
|
source: 'specific'
|
2020-04-12 17:27:42 +00:00
|
|
|
project: 'jellyfin'
|
|
|
|
pipeline: 'Jellyfin Web'
|
2020-04-12 17:20:37 +00:00
|
|
|
runBranch: variables['System.PullRequest.TargetBranch']
|
2020-01-13 15:22:52 +00:00
|
|
|
|
2020-04-12 17:20:37 +00:00
|
|
|
- task: ExtractFiles@1
|
2020-06-07 05:38:46 +00:00
|
|
|
displayName: 'Extract Web Client'
|
2020-01-13 15:22:52 +00:00
|
|
|
inputs:
|
2020-04-12 17:20:37 +00:00
|
|
|
archiveFilePatterns: '$(Agent.TempDirectory)/*.zip'
|
|
|
|
destinationFolder: '$(Build.SourcesDirectory)/MediaBrowser.WebDashboard'
|
2020-04-12 17:34:52 +00:00
|
|
|
cleanDestinationFolder: false
|
2020-01-13 15:22:52 +00:00
|
|
|
|
|
|
|
- task: UseDotNet@2
|
2020-06-07 05:38:46 +00:00
|
|
|
displayName: 'Update DotNet'
|
2020-01-13 15:22:52 +00:00
|
|
|
inputs:
|
|
|
|
packageType: sdk
|
|
|
|
version: ${{ parameters.DotNetSdkVersion }}
|
|
|
|
|
|
|
|
- task: DotNetCoreCLI@2
|
2020-06-07 05:38:46 +00:00
|
|
|
displayName: 'Publish Server'
|
2020-01-13 15:22:52 +00:00
|
|
|
inputs:
|
|
|
|
command: publish
|
|
|
|
publishWebProjects: false
|
2020-06-07 05:38:46 +00:00
|
|
|
projects: '${{ parameters.RestoreBuildProjects }}'
|
|
|
|
arguments: '--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)'
|
2020-01-13 15:22:52 +00:00
|
|
|
zipAfterPublish: false
|
|
|
|
|
2020-09-03 19:51:38 +00:00
|
|
|
- task: PublishPipelineArtifact@1
|
2020-06-07 05:38:46 +00:00
|
|
|
displayName: 'Publish Artifact Naming'
|
2020-01-18 15:19:19 +00:00
|
|
|
condition: and(succeeded(), eq(variables['BuildConfiguration'], 'Release'))
|
2020-01-13 15:22:52 +00:00
|
|
|
inputs:
|
2020-06-07 05:38:46 +00:00
|
|
|
targetPath: '$(build.ArtifactStagingDirectory)/Jellyfin.Server/Emby.Naming.dll'
|
|
|
|
artifactName: 'Jellyfin.Naming'
|
2020-01-13 15:22:52 +00:00
|
|
|
|
2020-09-03 19:51:38 +00:00
|
|
|
- task: PublishPipelineArtifact@1
|
2020-06-07 05:38:46 +00:00
|
|
|
displayName: 'Publish Artifact Controller'
|
2020-01-18 15:19:19 +00:00
|
|
|
condition: and(succeeded(), eq(variables['BuildConfiguration'], 'Release'))
|
2020-01-13 15:22:52 +00:00
|
|
|
inputs:
|
2020-06-07 05:38:46 +00:00
|
|
|
targetPath: '$(build.ArtifactStagingDirectory)/Jellyfin.Server/MediaBrowser.Controller.dll'
|
|
|
|
artifactName: 'Jellyfin.Controller'
|
2020-01-13 15:22:52 +00:00
|
|
|
|
2020-09-03 19:51:38 +00:00
|
|
|
- task: PublishPipelineArtifact@1
|
2020-06-07 05:38:46 +00:00
|
|
|
displayName: 'Publish Artifact Model'
|
2020-01-18 15:19:19 +00:00
|
|
|
condition: and(succeeded(), eq(variables['BuildConfiguration'], 'Release'))
|
2020-01-13 15:22:52 +00:00
|
|
|
inputs:
|
2020-06-07 05:38:46 +00:00
|
|
|
targetPath: '$(build.ArtifactStagingDirectory)/Jellyfin.Server/MediaBrowser.Model.dll'
|
|
|
|
artifactName: 'Jellyfin.Model'
|
2020-01-13 15:22:52 +00:00
|
|
|
|
2020-09-03 19:51:38 +00:00
|
|
|
- task: PublishPipelineArtifact@1
|
2020-06-07 05:38:46 +00:00
|
|
|
displayName: 'Publish Artifact Common'
|
2020-01-18 15:19:19 +00:00
|
|
|
condition: and(succeeded(), eq(variables['BuildConfiguration'], 'Release'))
|
2020-01-13 15:22:52 +00:00
|
|
|
inputs:
|
2020-06-07 05:38:46 +00:00
|
|
|
targetPath: '$(build.ArtifactStagingDirectory)/Jellyfin.Server/MediaBrowser.Common.dll'
|
|
|
|
artifactName: 'Jellyfin.Common'
|
2021-09-03 20:21:33 +00:00
|
|
|
|
|
|
|
- task: PublishPipelineArtifact@1
|
2021-09-18 14:21:54 +00:00
|
|
|
displayName: 'Publish Artifact Extensions'
|
|
|
|
condition: and(succeeded(), eq(variables['BuildConfiguration'], 'Release'))
|
|
|
|
inputs:
|
|
|
|
targetPath: '$(build.ArtifactStagingDirectory)/Jellyfin.Server/Jellyfin.Extensions.dll'
|
|
|
|
artifactName: 'Jellyfin.Extensions'
|