2020-01-13 15:22:52 +00:00
|
|
|
parameters:
|
|
|
|
LinuxImage: "ubuntu-latest"
|
|
|
|
RestoreBuildProjects: "Jellyfin.Server/Jellyfin.Server.csproj"
|
|
|
|
DotNetSdkVersion: 3.1.100
|
|
|
|
|
|
|
|
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:
|
|
|
|
vmImage: "${{ parameters.LinuxImage }}"
|
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
clean: true
|
|
|
|
submodules: true
|
|
|
|
persistCredentials: true
|
|
|
|
|
|
|
|
- task: CmdLine@2
|
2020-04-07 16:36:36 +00:00
|
|
|
displayName: "Clone Web Branch"
|
2020-01-18 15:19:19 +00:00
|
|
|
condition: and(succeeded(), or(contains(variables['Build.SourceBranch'], 'release'), contains(variables['Build.SourceBranch'], 'master')), eq(variables['BuildConfiguration'], 'Release'), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'BuildCompletion'))
|
2020-01-13 15:22:52 +00:00
|
|
|
inputs:
|
|
|
|
script: "git clone --single-branch --branch $(Build.SourceBranchName) --depth=1 https://github.com/jellyfin/jellyfin-web.git $(Agent.TempDirectory)/jellyfin-web"
|
|
|
|
|
|
|
|
- task: CmdLine@2
|
2020-04-07 16:36:36 +00:00
|
|
|
displayName: "Clone Web Target"
|
2020-01-18 15:19:19 +00:00
|
|
|
condition: and(succeeded(), or(contains(variables['System.PullRequest.TargetBranch'], 'release'), contains(variables['System.PullRequest.TargetBranch'], 'master')), eq(variables['BuildConfiguration'], 'Release'), in(variables['Build.Reason'], 'PullRequest'))
|
2020-01-13 15:22:52 +00:00
|
|
|
inputs:
|
|
|
|
script: "git clone --single-branch --branch $(System.PullRequest.TargetBranch) --depth 1 https://github.com/jellyfin/jellyfin-web.git $(Agent.TempDirectory)/jellyfin-web"
|
|
|
|
|
|
|
|
- task: NodeTool@0
|
|
|
|
displayName: "Install Node"
|
2020-01-18 15:19:19 +00:00
|
|
|
condition: and(succeeded(), or(contains(variables['System.PullRequest.TargetBranch'], 'release'), contains(variables['System.PullRequest.TargetBranch'], 'master'), contains(variables['Build.SourceBranch'], 'release'), contains(variables['Build.SourceBranch'], 'master')), eq(variables['BuildConfiguration'], 'Release'), in(variables['Build.Reason'], 'PullRequest', 'IndividualCI', 'BatchedCI', 'BuildCompletion'))
|
2020-01-13 15:22:52 +00:00
|
|
|
inputs:
|
2020-04-07 16:36:36 +00:00
|
|
|
versionSpec: "12.x"
|
2020-01-13 15:22:52 +00:00
|
|
|
|
|
|
|
- task: CmdLine@2
|
|
|
|
displayName: "Build Web Client"
|
2020-01-18 15:19:19 +00:00
|
|
|
condition: and(succeeded(), or(contains(variables['System.PullRequest.TargetBranch'], 'release'), contains(variables['System.PullRequest.TargetBranch'], 'master'), contains(variables['Build.SourceBranch'], 'release'), contains(variables['Build.SourceBranch'], 'master')), eq(variables['BuildConfiguration'], 'Release'), in(variables['Build.Reason'], 'PullRequest', 'IndividualCI', 'BatchedCI', 'BuildCompletion'))
|
2020-01-13 15:22:52 +00:00
|
|
|
inputs:
|
2020-03-20 10:46:51 +00:00
|
|
|
script: yarn install
|
2020-01-13 15:22:52 +00:00
|
|
|
workingDirectory: $(Agent.TempDirectory)/jellyfin-web
|
|
|
|
|
|
|
|
- task: CopyFiles@2
|
|
|
|
displayName: "Copy Web Client"
|
2020-01-18 15:19:19 +00:00
|
|
|
condition: and(succeeded(), or(contains(variables['System.PullRequest.TargetBranch'], 'release'), contains(variables['System.PullRequest.TargetBranch'], 'master'), contains(variables['Build.SourceBranch'], 'release'), contains(variables['Build.SourceBranch'], 'master')), eq(variables['BuildConfiguration'], 'Release'), in(variables['Build.Reason'], 'PullRequest', 'IndividualCI', 'BatchedCI', 'BuildCompletion'))
|
2020-01-13 15:22:52 +00:00
|
|
|
inputs:
|
2020-01-15 10:27:38 +00:00
|
|
|
sourceFolder: $(Agent.TempDirectory)/jellyfin-web/dist
|
2020-01-13 15:22:52 +00:00
|
|
|
contents: "**"
|
|
|
|
targetFolder: $(Build.SourcesDirectory)/MediaBrowser.WebDashboard/jellyfin-web
|
2020-01-15 10:27:38 +00:00
|
|
|
cleanTargetFolder: true
|
|
|
|
overWrite: true
|
|
|
|
flattenFolders: false
|
2020-01-13 15:22:52 +00:00
|
|
|
|
|
|
|
- task: UseDotNet@2
|
|
|
|
displayName: "Update DotNet"
|
|
|
|
inputs:
|
|
|
|
packageType: sdk
|
|
|
|
version: ${{ parameters.DotNetSdkVersion }}
|
|
|
|
|
|
|
|
- task: DotNetCoreCLI@2
|
|
|
|
displayName: "Publish Server"
|
|
|
|
inputs:
|
|
|
|
command: publish
|
|
|
|
publishWebProjects: false
|
|
|
|
projects: "${{ parameters.RestoreBuildProjects }}"
|
2020-04-07 16:36:36 +00:00
|
|
|
arguments: "--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)"
|
2020-01-13 15:22:52 +00:00
|
|
|
zipAfterPublish: false
|
|
|
|
|
|
|
|
- task: PublishPipelineArtifact@0
|
|
|
|
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-04-07 16:36:36 +00:00
|
|
|
targetPath: "$(build.ArtifactStagingDirectory)/Jellyfin.Server/Emby.Naming.dll"
|
2020-01-13 15:22:52 +00:00
|
|
|
artifactName: "Jellyfin.Naming"
|
|
|
|
|
|
|
|
- task: PublishPipelineArtifact@0
|
|
|
|
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-04-07 16:36:36 +00:00
|
|
|
targetPath: "$(build.ArtifactStagingDirectory)/Jellyfin.Server/MediaBrowser.Controller.dll"
|
2020-01-13 15:22:52 +00:00
|
|
|
artifactName: "Jellyfin.Controller"
|
|
|
|
|
|
|
|
- task: PublishPipelineArtifact@0
|
|
|
|
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-04-07 16:36:36 +00:00
|
|
|
targetPath: "$(build.ArtifactStagingDirectory)/Jellyfin.Server/MediaBrowser.Model.dll"
|
2020-01-13 15:22:52 +00:00
|
|
|
artifactName: "Jellyfin.Model"
|
|
|
|
|
|
|
|
- task: PublishPipelineArtifact@0
|
|
|
|
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-04-07 16:36:36 +00:00
|
|
|
targetPath: "$(build.ArtifactStagingDirectory)/Jellyfin.Server/MediaBrowser.Common.dll"
|
2020-01-15 10:27:38 +00:00
|
|
|
artifactName: "Jellyfin.Common"
|