Remove linting step from azure CI

This commit is contained in:
Andreas B 2020-12-13 15:32:17 +01:00
parent 24663d24eb
commit e57c1b2f8f

View File

@ -1,197 +1,171 @@
trigger:
batch: true
branches:
include:
- '*'
tags:
include:
- '*'
batch: true
branches:
include:
- '*'
tags:
include:
- '*'
pr:
branches:
include:
- '*'
branches:
include:
- '*'
jobs:
- job: Build
displayName: 'Build'
- job: Build
displayName: 'Build'
strategy:
matrix:
Development:
BuildConfiguration: development
Production:
BuildConfiguration: production
strategy:
matrix:
Development:
BuildConfiguration: development
Production:
BuildConfiguration: production
pool:
vmImage: 'ubuntu-latest'
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
displayName: 'Install Node'
inputs:
versionSpec: '12.x'
steps:
- task: NodeTool@0
displayName: 'Install Node'
inputs:
versionSpec: '12.x'
- task: Cache@2
displayName: 'Check Cache'
inputs:
key: 'yarn | yarn.lock'
path: 'node_modules'
cacheHitVar: CACHE_RESTORED
- 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'
condition: ne(variables.CACHE_RESTORED, 'true')
- script: 'yarn install --frozen-lockfile'
displayName: 'Install Dependencies'
condition: ne(variables.CACHE_RESTORED, 'true')
- script: 'sh ./scripts/updateversion.sh'
displayName: 'Update version in package.json'
- script: 'sh ./scripts/updateversion.sh'
displayName: 'Update version in package.json'
- script: 'yarn build:development'
displayName: 'Build Development'
condition: eq(variables['BuildConfiguration'], 'development')
- script: 'yarn build:development'
displayName: 'Build Development'
condition: eq(variables['BuildConfiguration'], 'development')
- script: 'yarn build:production'
displayName: 'Build Bundle'
condition: eq(variables['BuildConfiguration'], 'production')
- script: 'yarn build:production'
displayName: 'Build Bundle'
condition: eq(variables['BuildConfiguration'], 'production')
- script: 'test -d dist'
displayName: 'Check Build'
- script: 'test -d dist'
displayName: 'Check Build'
- script: 'mv dist jellyfin-chromecast'
displayName: 'Rename Directory'
- script: 'mv dist jellyfin-chromecast'
displayName: 'Rename Directory'
- task: ArchiveFiles@2
displayName: 'Archive Directory'
inputs:
rootFolderOrFile: 'jellyfin-chromecast'
includeRootFolder: true
archiveFile: 'jellyfin-chromecast-$(BuildConfiguration)'
- task: ArchiveFiles@2
displayName: 'Archive Directory'
inputs:
rootFolderOrFile: 'jellyfin-chromecast'
includeRootFolder: true
archiveFile: 'jellyfin-chromecast-$(BuildConfiguration)'
- task: PublishPipelineArtifact@1
displayName: 'Publish Release'
inputs:
targetPath: '$(Build.SourcesDirectory)/jellyfin-chromecast-$(BuildConfiguration).zip'
artifactName: 'jellyfin-chromecast-$(BuildConfiguration)'
- task: PublishPipelineArtifact@1
displayName: 'Publish Release'
inputs:
targetPath: '$(Build.SourcesDirectory)/jellyfin-chromecast-$(BuildConfiguration).zip'
artifactName: 'jellyfin-chromecast-$(BuildConfiguration)'
- job: Lint
displayName: 'Lint'
- job: Publish
displayName: 'Publish'
pool:
vmImage: 'ubuntu-latest'
dependsOn: Build
condition: or(eq(variables['Build.SourceBranch'], 'refs/heads/master'), startsWith(variables['Build.SourceBranch'], 'refs/tags'))
steps:
- task: NodeTool@0
displayName: 'Install Node'
inputs:
versionSpec: '12.x'
strategy:
matrix:
Development:
BuildConfiguration: development
Production:
BuildConfiguration: production
- task: Cache@2
displayName: 'Check Cache'
inputs:
key: 'yarn | yarn.lock'
path: 'node_modules'
cacheHitVar: CACHE_RESTORED
pool:
vmImage: 'ubuntu-latest'
- script: 'yarn install --frozen-lockfile'
displayName: 'Install Dependencies'
condition: ne(variables.CACHE_RESTORED, 'true')
steps:
- script: 'echo "##vso[task.setvariable variable=TAG]$(git describe --tags)"'
displayName: 'Set Tag Variable'
- script: 'yarn run lint --quiet'
displayName: 'Run ESLint'
- task: DownloadPipelineArtifact@2
displayName: 'Download Artifact'
inputs:
source: 'current'
artifact: 'jellyfin-chromecast-$(BuildConfiguration)'
path: '$(System.ArtifactsDirectory)'
runVersion: 'latest'
- job: Publish
displayName: 'Publish'
- task: GithubRelease@0
displayName: 'GitHub Upload'
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
inputs:
gitHubConnection: Jellyfin Release Download
repositoryName: jellyfin/jellyfin-chromecast
assets: '$(System.ArtifactsDirectory)/*.zip'
action: 'edit'
assetUploadMode: 'replace'
tag: '$(TAG)'
dependsOn: Build
condition: or(eq(variables['Build.SourceBranch'], 'refs/heads/master'), startsWith(variables['Build.SourceBranch'], 'refs/tags'))
- task: CopyFilesOverSSH@0
displayName: 'Upload to Repository'
inputs:
sshEndpoint: repository
sourceFolder: '$(System.ArtifactsDirectory)'
contents: '**'
targetFolder: '/srv/repository/releases/client/chromecast/versions/$(TAG)'
strategy:
matrix:
Development:
BuildConfiguration: development
Production:
BuildConfiguration: production
- task: SSH@0
displayName: 'Symlink Latest Version'
inputs:
sshEndpoint: repository
runOptions: 'inline'
inline: 'cd /srv/repository/releases/client/chromecast && rm -rf *.zip && ln -s versions/$(TAG)/jellyfin-chromecast-$(BuildConfiguration)-$(TAG).zip .'
pool:
vmImage: 'ubuntu-latest'
- job: Production
displayName: 'Production'
steps:
- script: 'echo "##vso[task.setvariable variable=TAG]$(git describe --tags)"'
displayName: 'Set Tag Variable'
dependsOn: Build
condition: or(eq(variables['Build.SourceBranch'], 'refs/heads/master'), startsWith(variables['Build.SourceBranch'], 'refs/tags'))
- task: DownloadPipelineArtifact@2
displayName: 'Download Artifact'
inputs:
source: 'current'
artifact: 'jellyfin-chromecast-$(BuildConfiguration)'
path: '$(System.ArtifactsDirectory)'
runVersion: 'latest'
pool:
vmImage: 'ubuntu-latest'
- task: GithubRelease@0
displayName: 'GitHub Upload'
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
inputs:
gitHubConnection: Jellyfin Release Download
repositoryName: jellyfin/jellyfin-chromecast
assets: '$(System.ArtifactsDirectory)/*.zip'
action: 'edit'
assetUploadMode: 'replace'
tag: '$(TAG)'
steps:
- task: DownloadPipelineArtifact@2
displayName: 'Download Artifact'
inputs:
source: 'current'
artifact: 'jellyfin-chromecast-production'
path: '$(System.ArtifactsDirectory)'
runVersion: 'latest'
- task: CopyFilesOverSSH@0
displayName: 'Upload to Repository'
inputs:
sshEndpoint: repository
sourceFolder: '$(System.ArtifactsDirectory)'
contents: '**'
targetFolder: '/srv/repository/releases/client/chromecast/versions/$(TAG)'
- task: ExtractFiles@1
displayName: 'Extract Source'
inputs:
archiveFilePatterns: '$(System.ArtifactsDirectory)/*.zip'
destinationFolder: '$(System.ArtifactsDirectory)/artifact'
cleanDestinationFolder: true
- task: SSH@0
displayName: 'Symlink Latest Version'
inputs:
sshEndpoint: repository
runOptions: 'inline'
inline: 'cd /srv/repository/releases/client/chromecast && rm -rf *.zip && ln -s versions/$(TAG)/jellyfin-chromecast-$(BuildConfiguration)-$(TAG).zip .'
- task: CopyFilesOverSSH@0
displayName: 'Update Nightly'
inputs:
sshEndpoint: chromecast
sourceFolder: '$(System.ArtifactsDirectory)/artifact/jellyfin-chromecast'
cleanTargetFolder: true
contents: '**'
targetFolder: '/srv/chromecast/nightly'
- job: Production
displayName: 'Production'
dependsOn: Build
condition: or(eq(variables['Build.SourceBranch'], 'refs/heads/master'), startsWith(variables['Build.SourceBranch'], 'refs/tags'))
pool:
vmImage: 'ubuntu-latest'
steps:
- task: DownloadPipelineArtifact@2
displayName: 'Download Artifact'
inputs:
source: 'current'
artifact: 'jellyfin-chromecast-production'
path: '$(System.ArtifactsDirectory)'
runVersion: 'latest'
- task: ExtractFiles@1
displayName: "Extract Source"
inputs:
archiveFilePatterns: '$(System.ArtifactsDirectory)/*.zip'
destinationFolder: '$(System.ArtifactsDirectory)/artifact'
cleanDestinationFolder: true
- task: CopyFilesOverSSH@0
displayName: 'Update Nightly'
inputs:
sshEndpoint: chromecast
sourceFolder: '$(System.ArtifactsDirectory)/artifact/jellyfin-chromecast'
cleanTargetFolder: true
contents: '**'
targetFolder: '/srv/chromecast/nightly'
- task: CopyFilesOverSSH@0
displayName: 'Update Stable'
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
inputs:
sshEndpoint: chromecast
sourceFolder: '$(System.ArtifactsDirectory)/artifact/jellyfin-chromecast'
cleanTargetFolder: true
contents: '**'
targetFolder: '/srv/chromecast/stable'
- task: CopyFilesOverSSH@0
displayName: 'Update Stable'
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
inputs:
sshEndpoint: chromecast
sourceFolder: '$(System.ArtifactsDirectory)/artifact/jellyfin-chromecast'
cleanTargetFolder: true
contents: '**'
targetFolder: '/srv/chromecast/stable'