mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-23 05:59:54 +00:00
Azure pipelines (#470)
* Set up CI with Azure Pipelines [skip ci] * Update azure-pipelines.yml for Azure Pipelines * Update .npmignore * Add linting to Azure Pipelines * Move linting to separate job * Move Azure config to .ci * Publish pipeline artifact * Fix yaml * Only run build if lint succeeds * Remove version variable * Update npmignore * Exclude version from package filename * Update CI triggers
This commit is contained in:
parent
0c337e11a6
commit
5cb4c195d7
60
.ci/azure-pipelines.yml
Normal file
60
.ci/azure-pipelines.yml
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
trigger:
|
||||||
|
batch: true
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- master
|
||||||
|
- release-*
|
||||||
|
tags:
|
||||||
|
include:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
- job: main_build
|
||||||
|
displayName: 'Main Build'
|
||||||
|
|
||||||
|
dependsOn: lint
|
||||||
|
condition: succeeded()
|
||||||
|
|
||||||
|
pool:
|
||||||
|
vmImage: 'ubuntu-latest'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- task: NodeTool@0
|
||||||
|
displayName: 'Install Node.js'
|
||||||
|
inputs:
|
||||||
|
versionSpec: '10.x'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
yarn install
|
||||||
|
displayName: 'Install dependencies'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
yarn pack --filename jellyfin-web.tgz
|
||||||
|
displayName: 'Build package'
|
||||||
|
|
||||||
|
- task: PublishPipelineArtifact@1
|
||||||
|
displayName: 'Publish package'
|
||||||
|
condition: succeeded()
|
||||||
|
inputs:
|
||||||
|
targetPath: '$(Build.SourcesDirectory)/jellyfin-web.tgz'
|
||||||
|
artifactName: 'jellyfin-web'
|
||||||
|
|
||||||
|
- job: lint
|
||||||
|
displayName: 'Lint'
|
||||||
|
|
||||||
|
pool:
|
||||||
|
vmImage: 'ubuntu-latest'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- task: NodeTool@0
|
||||||
|
displayName: 'Install Node.js'
|
||||||
|
inputs:
|
||||||
|
versionSpec: '10.x'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
yarn install
|
||||||
|
displayName: 'Install dependencies'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
yarn run lint
|
||||||
|
displayName: 'Run ESLint'
|
@ -1,9 +0,0 @@
|
|||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
name: eslint
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: run
|
|
||||||
image: nextcloudci/eslint:eslint-1
|
|
||||||
commands:
|
|
||||||
- ./run-eslint.sh
|
|
@ -1,6 +1,7 @@
|
|||||||
|
.editorconfig
|
||||||
|
.ci
|
||||||
.gitattributes
|
.gitattributes
|
||||||
.github
|
.github
|
||||||
.drone.yml
|
|
||||||
.eslintrc.yml
|
.eslintrc.yml
|
||||||
run-eslint.sh
|
run-eslint.sh
|
||||||
webpack.config.js
|
webpack.config.js
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "webpack --mode development",
|
"dev": "webpack --mode development",
|
||||||
"build": "webpack --mode production",
|
"build": "webpack --mode production",
|
||||||
"lint": "eslint src",
|
"lint": "eslint \"src\"",
|
||||||
"prepare": "webpack --mode production"
|
"prepare": "webpack --mode production"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# used this pull request for reference
|
|
||||||
# https://github.com/nextcloud/spreed/pull/48
|
|
||||||
ESLINT=$(which eslint || true)
|
|
||||||
if [ -z "$ESLINT" ]
|
|
||||||
then
|
|
||||||
echo "could not find eslint in $PATH"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo checking scripts with $ESLINT
|
|
||||||
find -name "*.js" -print0 | xargs -0 $ESLINT
|
|
||||||
|
|
||||||
# use this line to test changes locally
|
|
||||||
#find src -name "*.js" -exec sh -c 'npx eslint $1' -- {} \;
|
|
Loading…
Reference in New Issue
Block a user