2020-01-13 16:22:52 +01:00
|
|
|
parameters:
|
|
|
|
WindowsImage: "windows-latest"
|
|
|
|
TestProjects: "tests/**/*Tests.csproj"
|
|
|
|
DotNetSdkVersion: 3.1.100
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
- job: PublishWindows
|
|
|
|
displayName: Publish Windows
|
|
|
|
pool:
|
|
|
|
vmImage: ${{ parameters.WindowsImage }}
|
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
clean: true
|
|
|
|
submodules: true
|
|
|
|
persistCredentials: true
|
|
|
|
|
|
|
|
- task: CmdLine@2
|
|
|
|
displayName: "Clone Web Client (Master, Release, or Tag)"
|
|
|
|
condition: and(succeeded(), or(contains(variables['Build.SourceBranch'], 'release'), contains(variables['Build.SourceBranch'], 'master'), contains(variables['Build.SourceBranch'], 'tag')), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'BuildCompletion'))
|
|
|
|
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
|
|
|
|
displayName: "Clone Web Client (PR)"
|
|
|
|
condition: and(succeeded(), or(contains(variables['System.PullRequest.TargetBranch'], 'release'), contains(variables['System.PullRequest.TargetBranch'], 'master')), in(variables['Build.Reason'], 'PullRequest'))
|
|
|
|
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"
|
|
|
|
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')), in(variables['Build.Reason'], 'PullRequest', 'IndividualCI', 'BatchedCI', 'BuildCompletion'))
|
|
|
|
inputs:
|
|
|
|
versionSpec: "10.x"
|
|
|
|
|
|
|
|
- task: CmdLine@2
|
|
|
|
displayName: "Build Web Client"
|
|
|
|
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')), in(variables['Build.Reason'], 'PullRequest', 'IndividualCI', 'BatchedCI', 'BuildCompletion'))
|
|
|
|
inputs:
|
2020-03-20 11:36:21 +01:00
|
|
|
script: yarn install && yarn build:production
|
2020-01-13 16:22:52 +01:00
|
|
|
workingDirectory: $(Agent.TempDirectory)/jellyfin-web
|
|
|
|
|
|
|
|
- task: CopyFiles@2
|
|
|
|
displayName: "Copy Web Client"
|
|
|
|
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')), in(variables['Build.Reason'], 'PullRequest', 'IndividualCI', 'BatchedCI', 'BuildCompletion'))
|
|
|
|
inputs:
|
2020-01-15 11:27:38 +01:00
|
|
|
sourceFolder: $(Agent.TempDirectory)/jellyfin-web/dist
|
2020-01-13 16:22:52 +01:00
|
|
|
contents: "**"
|
|
|
|
targetFolder: $(Build.SourcesDirectory)/MediaBrowser.WebDashboard/jellyfin-web
|
2020-01-15 11:27:38 +01:00
|
|
|
cleanTargetFolder: true
|
|
|
|
overWrite: true
|
|
|
|
flattenFolders: false
|
2020-01-13 16:22:52 +01:00
|
|
|
|
|
|
|
- task: CmdLine@2
|
|
|
|
displayName: "Clone UX Repository"
|
|
|
|
inputs:
|
|
|
|
script: git clone --depth=1 https://github.com/jellyfin/jellyfin-ux $(Agent.TempDirectory)\jellyfin-ux
|
|
|
|
|
|
|
|
- task: PowerShell@2
|
|
|
|
displayName: "Build NSIS Installer"
|
|
|
|
inputs:
|
2020-01-15 11:27:38 +01:00
|
|
|
targetType: "filePath"
|
|
|
|
filePath: ./deployment/windows/build-jellyfin.ps1
|
2020-01-13 16:22:52 +01:00
|
|
|
arguments: -InstallFFMPEG -InstallNSSM -MakeNSIS -InstallTrayApp -UXLocation $(Agent.TempDirectory)\jellyfin-ux -InstallLocation $(build.artifactstagingdirectory)
|
2020-01-15 11:27:38 +01:00
|
|
|
errorActionPreference: "stop"
|
|
|
|
workingDirectory: $(Build.SourcesDirectory)
|
2020-01-13 16:22:52 +01:00
|
|
|
|
|
|
|
- task: CopyFiles@2
|
|
|
|
displayName: "Copy NSIS Installer"
|
|
|
|
inputs:
|
2020-01-15 11:27:38 +01:00
|
|
|
sourceFolder: $(Build.SourcesDirectory)/deployment/windows/
|
2020-01-13 16:22:52 +01:00
|
|
|
contents: "jellyfin*.exe"
|
|
|
|
targetFolder: $(System.ArtifactsDirectory)/setup
|
2020-01-15 11:27:38 +01:00
|
|
|
cleanTargetFolder: true
|
|
|
|
overWrite: true
|
|
|
|
flattenFolders: true
|
2020-01-13 16:22:52 +01:00
|
|
|
|
|
|
|
- task: PublishPipelineArtifact@0
|
|
|
|
displayName: "Publish Artifact Setup"
|
|
|
|
condition: succeeded()
|
|
|
|
inputs:
|
|
|
|
targetPath: "$(build.artifactstagingdirectory)/setup"
|
2020-01-15 11:27:38 +01:00
|
|
|
artifactName: "Jellyfin Server Setup"
|