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

106 lines
2.5 KiB
YAML
Raw Normal View History

trigger:
batch: true
branches:
include:
2020-04-04 00:09:47 +09:00
- '*'
tags:
include:
- '*'
2020-03-15 21:53:28 +01:00
pr:
branches:
include:
- '*'
jobs:
2020-04-05 04:16:56 +09:00
- job: Build
2020-03-16 23:30:14 +09:00
displayName: 'Build'
2020-03-16 23:30:14 +09:00
strategy:
matrix:
2020-03-16 23:49:56 +09:00
Development:
BuildConfiguration: development
2020-03-17 02:12:05 +09:00
Production:
BuildConfiguration: production
2020-03-16 23:49:56 +09:00
Standalone:
BuildConfiguration: standalone
2020-03-16 23:30:14 +09:00
2020-04-05 04:16:17 +09:00
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
displayName: 'Install Node'
inputs:
2020-03-28 11:36:58 +01:00
versionSpec: '12.x'
2020-03-17 00:17:46 +09:00
- task: Cache@2
displayName: 'Check Cache'
2020-03-17 00:17:46 +09:00
inputs:
key: 'yarn | yarn.lock'
2020-03-17 01:02:11 +09:00
path: 'node_modules'
2020-03-17 01:49:43 +09:00
cacheHitVar: CACHE_RESTORED
2020-03-17 00:17:46 +09:00
- script: 'yarn install --frozen-lockfile'
displayName: 'Install Dependencies'
2020-03-17 01:49:43 +09:00
condition: ne(variables.CACHE_RESTORED, 'true')
2020-03-17 01:09:25 +09:00
- script: 'yarn build:development'
displayName: 'Build Development'
condition: eq(variables['BuildConfiguration'], 'development')
2020-03-17 02:12:05 +09:00
- script: 'yarn build:production'
2020-03-16 23:49:56 +09:00
displayName: 'Build Bundle'
2020-03-17 02:12:05 +09:00
condition: eq(variables['BuildConfiguration'], 'production')
2020-03-16 23:49:56 +09:00
2020-03-17 01:09:25 +09:00
- script: 'yarn build:standalone'
2020-03-16 23:49:56 +09:00
displayName: 'Build Standalone'
condition: eq(variables['BuildConfiguration'], 'standalone')
2020-02-28 15:15:22 +01:00
- script: 'test -d dist'
displayName: 'Check Build'
2020-03-16 23:49:56 +09:00
- script: 'mv dist jellyfin-web'
displayName: 'Rename Directory'
2020-04-13 00:51:23 +09:00
- task: ArchiveFiles@2
displayName: 'Archive Directory'
inputs:
rootFolderOrFile: 'jellyfin-web'
includeRootFolder: true
archiveFile: 'jellyfin-web-$(BuildConfiguration)'
- task: PublishPipelineArtifact@1
displayName: 'Publish Release'
inputs:
2020-04-13 00:51:23 +09:00
targetPath: '$(Build.SourcesDirectory)/jellyfin-web-$(BuildConfiguration).zip'
2020-03-16 23:49:56 +09:00
artifactName: 'jellyfin-web-$(BuildConfiguration)'
2020-04-05 04:16:56 +09:00
- job: Lint
displayName: 'Lint'
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
displayName: 'Install Node'
inputs:
2020-03-28 11:36:58 +01:00
versionSpec: '12.x'
2020-03-17 02:17:12 +09: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-17 02:17:12 +09:00
condition: ne(variables.CACHE_RESTORED, 'true')
2020-04-02 20:34:48 +02:00
- script: 'yarn run lint --quiet'
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'