1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/.ci/azure-pipelines.yml
2020-03-17 00:32:46 +09:00

92 lines
2 KiB
YAML

trigger:
batch: true
branches:
include:
- master
- release-*
tags:
include:
- '*'
pr:
branches:
include:
- '*'
jobs:
- job: build
displayName: 'Build'
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Development:
BuildConfiguration: development
Bundle:
BuildConfiguration: bundle
Standalone:
BuildConfiguration: standalone
maxParallel: 3
steps:
- task: NodeTool@0
displayName: 'Install Node'
inputs:
versionSpec: '10.x'
- script: 'yarn install'
displayName: 'Install Dependencies'
- task: Cache@2
displayName: 'Cache Dependencies'
inputs:
key: 'yarn | yarn.lock'
path: '$(Pipeline.Workspace)/.node_modules'
- script: 'yarn build'
displayName: 'Build Development'
condition: eq(variables['BuildConfiguration'], 'development')
- script: 'yarn build'
displayName: 'Build Bundle'
condition: eq(variables['BuildConfiguration'], 'bundle')
- script: 'yarn build --standalone'
displayName: 'Build Standalone'
condition: eq(variables['BuildConfiguration'], 'standalone')
- script: 'test -d dist'
displayName: 'Check Build'
- script: 'mv dist jellyfin-web'
displayName: 'Rename Directory'
condition: succeeded()
- task: PublishPipelineArtifact@1
displayName: 'Publish Release'
condition: succeeded()
inputs:
targetPath: '$(Build.SourcesDirectory)/jellyfin-web'
artifactName: 'jellyfin-web-$(BuildConfiguration)'
- job: lint
displayName: 'Lint'
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
displayName: 'Install Node'
inputs:
versionSpec: '10.x'
- script: 'yarn install'
displayName: 'Install Dependencies'
- script: 'yarn run lint'
displayName: 'Run ESLint'
- script: 'yarn run stylelint'
displayName: 'Run Stylelint'