azure-pipelines.yml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. pr:
  2. autoCancel: true
  3. trigger:
  4. batch: true
  5. branches:
  6. include:
  7. - master
  8. pool:
  9. vmImage: ubuntu-16.04
  10. variables:
  11. - name: TestProjects
  12. value: ''
  13. - name: RestoreBuildProjects
  14. value: 'Jellyfin.Server/Jellyfin.Server.csproj'
  15. #Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
  16. jobs:
  17. - job: Build
  18. steps:
  19. - checkout: self
  20. clean: false
  21. submodules: true
  22. persistCredentials: false
  23. - task: DotNetCoreCLI@2
  24. displayName: Restore
  25. inputs:
  26. command: restore
  27. projects: '$(RestoreBuildProjects)'
  28. - task: DotNetCoreCLI@2
  29. displayName: Build
  30. inputs:
  31. projects: '$(RestoreBuildProjects)'
  32. arguments: '--configuration $(BuildConfiguration)'
  33. - task: DotNetCoreCLI@2
  34. displayName: Test
  35. inputs:
  36. command: test
  37. projects: '$(RestoreBuildProjects)'
  38. arguments: '--configuration $(BuildConfiguration)'
  39. enabled: false
  40. - task: DotNetCoreCLI@2
  41. displayName: Publish
  42. inputs:
  43. command: publish
  44. publishWebProjects: false
  45. projects: '$(RestoreBuildProjects)'
  46. arguments: '--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)'
  47. zipAfterPublish: True
  48. - task: PublishBuildArtifacts@1
  49. displayName: 'Publish Artifact'
  50. inputs:
  51. PathtoPublish: '$(build.artifactstagingdirectory)'
  52. artifactName: 'build-$(BuildConfiguration)'
  53. zipAfterPublish: false