2019-09-19 14:35:30 -04:00
|
|
|
trigger:
|
|
|
|
batch: true
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- master
|
|
|
|
- release-*
|
|
|
|
tags:
|
|
|
|
include:
|
|
|
|
- '*'
|
2020-03-15 21:53:28 +01:00
|
|
|
pr:
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- '*'
|
2019-09-19 14:35:30 -04:00
|
|
|
|
|
|
|
jobs:
|
2020-03-16 23:30:14 +09:00
|
|
|
- job: build
|
|
|
|
displayName: 'Build'
|
2019-09-19 14:35:30 -04:00
|
|
|
|
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-latest'
|
|
|
|
|
2020-03-16 23:30:14 +09:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-03-16 23:49:56 +09:00
|
|
|
Development:
|
|
|
|
BuildConfiguration: development
|
|
|
|
Bundle:
|
|
|
|
BuildConfiguration: bundle
|
|
|
|
Standalone:
|
|
|
|
BuildConfiguration: standalone
|
2020-03-17 00:04:52 +09:00
|
|
|
maxParallel: 3
|
2020-03-16 23:30:14 +09:00
|
|
|
|
2019-09-19 14:35:30 -04:00
|
|
|
steps:
|
|
|
|
- task: NodeTool@0
|
2020-01-12 00:06:25 +09:00
|
|
|
displayName: 'Install Node'
|
2019-09-19 14:35:30 -04:00
|
|
|
inputs:
|
|
|
|
versionSpec: '10.x'
|
|
|
|
|
2020-01-12 00:06:25 +09:00
|
|
|
- script: 'yarn install'
|
|
|
|
displayName: 'Install Dependencies'
|
2019-09-19 14:35:30 -04:00
|
|
|
|
2020-03-17 00:17:46 +09:00
|
|
|
- task: Cache@2
|
|
|
|
displayName: 'Cache Dependencies'
|
|
|
|
inputs:
|
|
|
|
key: 'yarn | yarn.lock'
|
2020-03-17 00:37:21 +09:00
|
|
|
path: '$(Pipeline.Workspace)/node_modules'
|
2020-03-17 00:17:46 +09:00
|
|
|
|
2020-03-17 00:04:52 +09:00
|
|
|
- script: 'yarn build'
|
|
|
|
displayName: 'Build Development'
|
|
|
|
condition: eq(variables['BuildConfiguration'], 'development')
|
|
|
|
|
2020-02-28 15:15:22 +01:00
|
|
|
- script: 'yarn build'
|
2020-03-16 23:49:56 +09:00
|
|
|
displayName: 'Build Bundle'
|
|
|
|
condition: eq(variables['BuildConfiguration'], 'bundle')
|
|
|
|
|
|
|
|
- script: 'yarn build --standalone'
|
|
|
|
displayName: 'Build Standalone'
|
|
|
|
condition: eq(variables['BuildConfiguration'], 'standalone')
|
2020-02-28 15:15:22 +01:00
|
|
|
|
2020-01-12 00:06:25 +09:00
|
|
|
- script: 'test -d dist'
|
|
|
|
displayName: 'Check Build'
|
2019-10-03 11:00:41 -04:00
|
|
|
|
2020-03-16 23:49:56 +09:00
|
|
|
- script: 'mv dist jellyfin-web'
|
|
|
|
displayName: 'Rename Directory'
|
2020-03-17 00:04:52 +09:00
|
|
|
condition: succeeded()
|
2019-09-19 14:35:30 -04:00
|
|
|
|
|
|
|
- task: PublishPipelineArtifact@1
|
2020-01-12 00:06:25 +09:00
|
|
|
displayName: 'Publish Release'
|
2019-09-19 14:35:30 -04:00
|
|
|
condition: succeeded()
|
|
|
|
inputs:
|
2020-03-16 23:49:56 +09:00
|
|
|
targetPath: '$(Build.SourcesDirectory)/jellyfin-web'
|
|
|
|
artifactName: 'jellyfin-web-$(BuildConfiguration)'
|
2019-09-19 14:35:30 -04:00
|
|
|
|
|
|
|
- job: lint
|
|
|
|
displayName: 'Lint'
|
|
|
|
|
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-latest'
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- task: NodeTool@0
|
2020-01-12 00:06:25 +09:00
|
|
|
displayName: 'Install Node'
|
2019-09-19 14:35:30 -04:00
|
|
|
inputs:
|
|
|
|
versionSpec: '10.x'
|
|
|
|
|
2020-01-12 00:06:25 +09:00
|
|
|
- script: 'yarn install'
|
|
|
|
displayName: 'Install Dependencies'
|
2019-09-19 14:35:30 -04:00
|
|
|
|
2020-01-12 00:06:25 +09:00
|
|
|
- script: 'yarn run lint'
|
2019-09-19 14:35:30 -04:00
|
|
|
displayName: 'Run ESLint'
|
2020-01-19 16:05:35 +01:00
|
|
|
|
2020-03-16 23:30:14 +09:00
|
|
|
- script: 'yarn run stylelint'
|
|
|
|
displayName: 'Run Stylelint'
|