jellyfin-web/.ci/azure-pipelines.yml

103 lines
2.3 KiB
YAML
Raw Normal View History

trigger:
batch: true
branches:
include:
- master
- release-*
tags:
include:
- '*'
2020-03-15 13:53:28 -07:00
pr:
branches:
include:
- '*'
jobs:
2020-03-16 07:30:14 -07:00
- job: build
displayName: 'Build'
pool:
vmImage: 'ubuntu-latest'
2020-03-16 07:30:14 -07:00
strategy:
matrix:
2020-03-16 07:49:56 -07:00
Development:
BuildConfiguration: development
2020-03-16 10:12:05 -07:00
Production:
BuildConfiguration: production
2020-03-16 07:49:56 -07:00
Standalone:
BuildConfiguration: standalone
maxParallel: 3
2020-03-16 07:30:14 -07:00
steps:
- task: NodeTool@0
displayName: 'Install Node'
inputs:
versionSpec: '10.x'
2020-03-16 08:17:46 -07:00
- task: Cache@2
displayName: 'Check Cache'
2020-03-16 08:17:46 -07:00
inputs:
key: 'yarn | yarn.lock'
2020-03-16 09:02:11 -07:00
path: 'node_modules'
2020-03-16 09:49:43 -07:00
cacheHitVar: CACHE_RESTORED
2020-03-16 08:17:46 -07:00
- script: 'yarn install --frozen-lockfile'
displayName: 'Install Dependencies'
2020-03-16 09:49:43 -07:00
condition: ne(variables.CACHE_RESTORED, 'true')
2020-03-16 09:09:25 -07:00
- script: 'yarn build:development'
displayName: 'Build Development'
condition: eq(variables['BuildConfiguration'], 'development')
2020-03-16 10:12:05 -07:00
- script: 'yarn build:production'
2020-03-16 07:49:56 -07:00
displayName: 'Build Bundle'
2020-03-16 10:12:05 -07:00
condition: eq(variables['BuildConfiguration'], 'production')
2020-03-16 07:49:56 -07:00
2020-03-16 09:09:25 -07:00
- script: 'yarn build:standalone'
2020-03-16 07:49:56 -07:00
displayName: 'Build Standalone'
condition: eq(variables['BuildConfiguration'], 'standalone')
2020-02-28 07:15:22 -07:00
- script: 'test -d dist'
displayName: 'Check Build'
2020-03-16 07:49:56 -07:00
- script: 'mv dist jellyfin-web'
displayName: 'Rename Directory'
condition: succeeded()
- task: PublishPipelineArtifact@1
displayName: 'Publish Release'
condition: succeeded()
inputs:
2020-03-16 07:49:56 -07:00
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'
2020-03-16 10:17:12 -07:00
- task: Cache@2
displayName: 'Check Cache'
inputs:
key: 'yarn | yarn.lock'
path: 'node_modules'
cacheHitVar: CACHE_RESTORED
- script: 'yarn install --frozen-lockfile'
displayName: 'Install Dependencies'
2020-03-16 10:17:12 -07:00
condition: ne(variables.CACHE_RESTORED, 'true')
- script: 'yarn run lint'
displayName: 'Run ESLint'
2020-01-19 08:05:35 -07:00
2020-03-16 07:30:14 -07:00
- script: 'yarn run stylelint'
displayName: 'Run Stylelint'