Remove Azure pipelines CI
Obsoleted by jellyfin-packaging and GitHub Actions CI. Goodnight sweet prince.
This commit is contained in:
parent
a597f1e410
commit
61e43057ab
|
@ -1,93 +0,0 @@
|
||||||
parameters:
|
|
||||||
- name: Packages
|
|
||||||
type: object
|
|
||||||
default: {}
|
|
||||||
- name: LinuxImage
|
|
||||||
type: string
|
|
||||||
default: "ubuntu-latest"
|
|
||||||
- name: DotNetSdkVersion
|
|
||||||
type: string
|
|
||||||
default: 8.0.x
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
- job: CompatibilityCheck
|
|
||||||
displayName: Compatibility Check
|
|
||||||
dependsOn: Build
|
|
||||||
condition: and(succeeded(), variables['System.PullRequest.PullRequestNumber'])
|
|
||||||
|
|
||||||
pool:
|
|
||||||
vmImage: "${{ parameters.LinuxImage }}"
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
${{ each Package in parameters.Packages }}:
|
|
||||||
${{ Package.key }}:
|
|
||||||
NugetPackageName: ${{ Package.value.NugetPackageName }}
|
|
||||||
AssemblyFileName: ${{ Package.value.AssemblyFileName }}
|
|
||||||
maxParallel: 2
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- checkout: none
|
|
||||||
|
|
||||||
- task: UseDotNet@2
|
|
||||||
displayName: "Update DotNet"
|
|
||||||
inputs:
|
|
||||||
packageType: sdk
|
|
||||||
version: ${{ parameters.DotNetSdkVersion }}
|
|
||||||
|
|
||||||
- task: DotNetCoreCLI@2
|
|
||||||
displayName: 'Install ABI CompatibilityChecker Tool'
|
|
||||||
inputs:
|
|
||||||
command: custom
|
|
||||||
custom: tool
|
|
||||||
arguments: 'update compatibilitychecker -g'
|
|
||||||
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download New Assembly Build Artifact'
|
|
||||||
inputs:
|
|
||||||
source: 'current'
|
|
||||||
artifact: "$(NugetPackageName)"
|
|
||||||
path: "$(System.ArtifactsDirectory)/new-artifacts"
|
|
||||||
runVersion: "latest"
|
|
||||||
|
|
||||||
- task: CopyFiles@2
|
|
||||||
displayName: 'Copy New Assembly Build Artifact'
|
|
||||||
inputs:
|
|
||||||
sourceFolder: $(System.ArtifactsDirectory)/new-artifacts
|
|
||||||
contents: '**/*.dll'
|
|
||||||
targetFolder: $(System.ArtifactsDirectory)/new-release
|
|
||||||
cleanTargetFolder: true
|
|
||||||
overWrite: true
|
|
||||||
flattenFolders: true
|
|
||||||
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download Reference Assembly Build Artifact'
|
|
||||||
enabled: false
|
|
||||||
inputs:
|
|
||||||
source: "specific"
|
|
||||||
artifact: "$(NugetPackageName)"
|
|
||||||
path: "$(System.ArtifactsDirectory)/current-artifacts"
|
|
||||||
project: "$(System.TeamProjectId)"
|
|
||||||
pipeline: "$(System.DefinitionId)"
|
|
||||||
runVersion: "latestFromBranch"
|
|
||||||
runBranch: "refs/heads/$(System.PullRequest.TargetBranch)"
|
|
||||||
|
|
||||||
- task: CopyFiles@2
|
|
||||||
displayName: 'Copy Reference Assembly Build Artifact'
|
|
||||||
enabled: false
|
|
||||||
inputs:
|
|
||||||
sourceFolder: $(System.ArtifactsDirectory)/current-artifacts
|
|
||||||
contents: '**/*.dll'
|
|
||||||
targetFolder: $(System.ArtifactsDirectory)/current-release
|
|
||||||
cleanTargetFolder: true
|
|
||||||
overWrite: true
|
|
||||||
flattenFolders: true
|
|
||||||
|
|
||||||
- task: DotNetCoreCLI@2
|
|
||||||
displayName: 'Execute ABI Compatibility Check Tool'
|
|
||||||
enabled: false
|
|
||||||
inputs:
|
|
||||||
command: custom
|
|
||||||
custom: compat
|
|
||||||
arguments: 'current-release/$(AssemblyFileName) new-release/$(AssemblyFileName) --azure-pipelines --warnings-only'
|
|
||||||
workingDirectory: $(System.ArtifactsDirectory)
|
|
|
@ -1,71 +0,0 @@
|
||||||
parameters:
|
|
||||||
LinuxImage: 'ubuntu-latest'
|
|
||||||
RestoreBuildProjects: 'Jellyfin.Server/Jellyfin.Server.csproj'
|
|
||||||
DotNetSdkVersion: 8.0.x
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
- job: Build
|
|
||||||
displayName: Build
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
Release:
|
|
||||||
BuildConfiguration: Release
|
|
||||||
Debug:
|
|
||||||
BuildConfiguration: Debug
|
|
||||||
pool:
|
|
||||||
vmImage: '${{ parameters.LinuxImage }}'
|
|
||||||
steps:
|
|
||||||
- checkout: self
|
|
||||||
clean: true
|
|
||||||
submodules: true
|
|
||||||
persistCredentials: true
|
|
||||||
|
|
||||||
- task: UseDotNet@2
|
|
||||||
displayName: 'Update DotNet'
|
|
||||||
inputs:
|
|
||||||
packageType: sdk
|
|
||||||
version: ${{ parameters.DotNetSdkVersion }}
|
|
||||||
|
|
||||||
- task: DotNetCoreCLI@2
|
|
||||||
displayName: 'Publish Server'
|
|
||||||
inputs:
|
|
||||||
command: publish
|
|
||||||
publishWebProjects: false
|
|
||||||
projects: '${{ parameters.RestoreBuildProjects }}'
|
|
||||||
arguments: '--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)'
|
|
||||||
zipAfterPublish: false
|
|
||||||
|
|
||||||
- task: PublishPipelineArtifact@1
|
|
||||||
displayName: 'Publish Artifact Naming'
|
|
||||||
condition: and(succeeded(), eq(variables['BuildConfiguration'], 'Release'))
|
|
||||||
inputs:
|
|
||||||
targetPath: '$(build.ArtifactStagingDirectory)/Jellyfin.Server/Emby.Naming.dll'
|
|
||||||
artifactName: 'Jellyfin.Naming'
|
|
||||||
|
|
||||||
- task: PublishPipelineArtifact@1
|
|
||||||
displayName: 'Publish Artifact Controller'
|
|
||||||
condition: and(succeeded(), eq(variables['BuildConfiguration'], 'Release'))
|
|
||||||
inputs:
|
|
||||||
targetPath: '$(build.ArtifactStagingDirectory)/Jellyfin.Server/MediaBrowser.Controller.dll'
|
|
||||||
artifactName: 'Jellyfin.Controller'
|
|
||||||
|
|
||||||
- task: PublishPipelineArtifact@1
|
|
||||||
displayName: 'Publish Artifact Model'
|
|
||||||
condition: and(succeeded(), eq(variables['BuildConfiguration'], 'Release'))
|
|
||||||
inputs:
|
|
||||||
targetPath: '$(build.ArtifactStagingDirectory)/Jellyfin.Server/MediaBrowser.Model.dll'
|
|
||||||
artifactName: 'Jellyfin.Model'
|
|
||||||
|
|
||||||
- task: PublishPipelineArtifact@1
|
|
||||||
displayName: 'Publish Artifact Common'
|
|
||||||
condition: and(succeeded(), eq(variables['BuildConfiguration'], 'Release'))
|
|
||||||
inputs:
|
|
||||||
targetPath: '$(build.ArtifactStagingDirectory)/Jellyfin.Server/MediaBrowser.Common.dll'
|
|
||||||
artifactName: 'Jellyfin.Common'
|
|
||||||
|
|
||||||
- task: PublishPipelineArtifact@1
|
|
||||||
displayName: 'Publish Artifact Extensions'
|
|
||||||
condition: and(succeeded(), eq(variables['BuildConfiguration'], 'Release'))
|
|
||||||
inputs:
|
|
||||||
targetPath: '$(build.ArtifactStagingDirectory)/Jellyfin.Server/Jellyfin.Extensions.dll'
|
|
||||||
artifactName: 'Jellyfin.Extensions'
|
|
|
@ -1,274 +0,0 @@
|
||||||
jobs:
|
|
||||||
- job: BuildPackage
|
|
||||||
displayName: 'Build Packages'
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
CentOS.amd64:
|
|
||||||
BuildConfiguration: centos.amd64
|
|
||||||
Fedora.amd64:
|
|
||||||
BuildConfiguration: fedora.amd64
|
|
||||||
Debian.amd64:
|
|
||||||
BuildConfiguration: debian.amd64
|
|
||||||
Debian.arm64:
|
|
||||||
BuildConfiguration: debian.arm64
|
|
||||||
Debian.armhf:
|
|
||||||
BuildConfiguration: debian.armhf
|
|
||||||
Ubuntu.amd64:
|
|
||||||
BuildConfiguration: ubuntu.amd64
|
|
||||||
Ubuntu.arm64:
|
|
||||||
BuildConfiguration: ubuntu.arm64
|
|
||||||
Ubuntu.armhf:
|
|
||||||
BuildConfiguration: ubuntu.armhf
|
|
||||||
Linux.amd64:
|
|
||||||
BuildConfiguration: linux.amd64
|
|
||||||
Linux.amd64-musl:
|
|
||||||
BuildConfiguration: linux.amd64-musl
|
|
||||||
Linux.arm64:
|
|
||||||
BuildConfiguration: linux.arm64
|
|
||||||
Linux.musl-linux-arm64:
|
|
||||||
BuildConfiguration: linux.musl-linux-arm64
|
|
||||||
Linux.armhf:
|
|
||||||
BuildConfiguration: linux.armhf
|
|
||||||
Windows.amd64:
|
|
||||||
BuildConfiguration: windows.amd64
|
|
||||||
MacOS.amd64:
|
|
||||||
BuildConfiguration: macos.amd64
|
|
||||||
MacOS.arm64:
|
|
||||||
BuildConfiguration: macos.arm64
|
|
||||||
Portable:
|
|
||||||
BuildConfiguration: portable
|
|
||||||
|
|
||||||
pool:
|
|
||||||
vmImage: 'ubuntu-latest'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- script: echo "##vso[task.setvariable variable=JellyfinVersion]$( awk -F '/' '{ print $NF }' <<<'$(Build.SourceBranch)' | sed 's/^v//' )"
|
|
||||||
displayName: Set release version (stable)
|
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/v')
|
|
||||||
|
|
||||||
- script: 'docker build -f deployment/Dockerfile.$(BuildConfiguration) -t jellyfin-server-$(BuildConfiguration) --label "org.opencontainers.image.url=$(Build.Repository.Uri)" --label "org.opencontainers.image.revision=$(Build.SourceVersion)" deployment'
|
|
||||||
displayName: 'Build Dockerfile'
|
|
||||||
|
|
||||||
- script: 'docker image ls -a && docker run -v $(pwd)/deployment/dist:/dist -v $(pwd):/jellyfin -e IS_UNSTABLE="yes" -e BUILD_ID=$(Build.BuildNumber) jellyfin-server-$(BuildConfiguration)'
|
|
||||||
displayName: 'Run Dockerfile (unstable)'
|
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/master')
|
|
||||||
|
|
||||||
- script: 'docker image ls -a && docker run -v $(pwd)/deployment/dist:/dist -v $(pwd):/jellyfin -e IS_UNSTABLE="no" -e BUILD_ID=$(Build.BuildNumber) jellyfin-server-$(BuildConfiguration)'
|
|
||||||
displayName: 'Run Dockerfile (stable)'
|
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/v')
|
|
||||||
|
|
||||||
- task: PublishPipelineArtifact@1
|
|
||||||
displayName: 'Publish Release'
|
|
||||||
inputs:
|
|
||||||
targetPath: '$(Build.SourcesDirectory)/deployment/dist'
|
|
||||||
artifactName: 'jellyfin-server-$(BuildConfiguration)'
|
|
||||||
|
|
||||||
- task: SSH@0
|
|
||||||
displayName: 'Create target directory on repository server'
|
|
||||||
inputs:
|
|
||||||
sshEndpoint: repository
|
|
||||||
runOptions: 'inline'
|
|
||||||
inline: 'mkdir -p /srv/repository/incoming/azure/$(Build.BuildNumber)/$(BuildConfiguration)'
|
|
||||||
|
|
||||||
- task: CopyFilesOverSSH@0
|
|
||||||
displayName: 'Upload artifacts to repository server'
|
|
||||||
inputs:
|
|
||||||
sshEndpoint: repository
|
|
||||||
sourceFolder: '$(Build.SourcesDirectory)/deployment/dist'
|
|
||||||
contents: '**'
|
|
||||||
targetFolder: '/srv/repository/incoming/azure/$(Build.BuildNumber)/$(BuildConfiguration)'
|
|
||||||
|
|
||||||
- job: OpenAPISpec
|
|
||||||
dependsOn: Test
|
|
||||||
condition: or(startsWith(variables['Build.SourceBranch'], 'refs/heads/master'),startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
|
|
||||||
displayName: 'Push OpenAPI Spec to repository'
|
|
||||||
|
|
||||||
pool:
|
|
||||||
vmImage: 'ubuntu-latest'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- script: echo "##vso[task.setvariable variable=JellyfinVersion]$( awk -F '/' '{ print $NF }' <<<'$(Build.SourceBranch)' | sed 's/^v//' )"
|
|
||||||
displayName: Set release version (stable)
|
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/v')
|
|
||||||
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download OpenAPI Spec'
|
|
||||||
inputs:
|
|
||||||
source: 'current'
|
|
||||||
artifact: "OpenAPI Spec"
|
|
||||||
path: "$(System.ArtifactsDirectory)/openapispec"
|
|
||||||
runVersion: "latest"
|
|
||||||
|
|
||||||
- task: SSH@0
|
|
||||||
displayName: 'Create target directory on repository server'
|
|
||||||
inputs:
|
|
||||||
sshEndpoint: repository
|
|
||||||
runOptions: 'inline'
|
|
||||||
inline: 'mkdir -p /srv/repository/incoming/azure/$(Build.BuildNumber)'
|
|
||||||
|
|
||||||
- task: CopyFilesOverSSH@0
|
|
||||||
displayName: 'Upload artifacts to repository server'
|
|
||||||
inputs:
|
|
||||||
sshEndpoint: repository
|
|
||||||
sourceFolder: '$(System.ArtifactsDirectory)/openapispec'
|
|
||||||
contents: 'openapi.json'
|
|
||||||
targetFolder: '/srv/repository/incoming/azure/$(Build.BuildNumber)'
|
|
||||||
|
|
||||||
- job: BuildDocker
|
|
||||||
displayName: 'Build Docker'
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
amd64:
|
|
||||||
BuildConfiguration: amd64
|
|
||||||
arm64:
|
|
||||||
BuildConfiguration: arm64
|
|
||||||
armhf:
|
|
||||||
BuildConfiguration: armhf
|
|
||||||
|
|
||||||
pool:
|
|
||||||
vmImage: 'ubuntu-latest'
|
|
||||||
|
|
||||||
variables:
|
|
||||||
- name: JellyfinVersion
|
|
||||||
value: 0.0.0
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- script: echo "##vso[task.setvariable variable=JellyfinVersion]$( awk -F '/' '{ print $NF }' <<<'$(Build.SourceBranch)' | sed 's/^v//' )"
|
|
||||||
displayName: Set release version (stable)
|
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/v')
|
|
||||||
|
|
||||||
- task: Docker@2
|
|
||||||
displayName: 'Push Unstable Image'
|
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/master')
|
|
||||||
inputs:
|
|
||||||
repository: 'jellyfin/jellyfin-server'
|
|
||||||
command: buildAndPush
|
|
||||||
buildContext: '.'
|
|
||||||
Dockerfile: 'deployment/Dockerfile.docker.$(BuildConfiguration)'
|
|
||||||
containerRegistry: Docker Hub
|
|
||||||
tags: |
|
|
||||||
unstable-$(Build.BuildNumber)-$(BuildConfiguration)
|
|
||||||
unstable-$(BuildConfiguration)
|
|
||||||
|
|
||||||
- task: Docker@2
|
|
||||||
displayName: 'Push Stable Image'
|
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/v')
|
|
||||||
inputs:
|
|
||||||
repository: 'jellyfin/jellyfin-server'
|
|
||||||
command: buildAndPush
|
|
||||||
buildContext: '.'
|
|
||||||
Dockerfile: 'deployment/Dockerfile.docker.$(BuildConfiguration)'
|
|
||||||
containerRegistry: Docker Hub
|
|
||||||
tags: |
|
|
||||||
stable-$(Build.BuildNumber)-$(BuildConfiguration)
|
|
||||||
$(JellyfinVersion)-$(BuildConfiguration)
|
|
||||||
|
|
||||||
- job: CollectArtifacts
|
|
||||||
timeoutInMinutes: 20
|
|
||||||
displayName: 'Collect Artifacts'
|
|
||||||
condition: succeededOrFailed()
|
|
||||||
continueOnError: true
|
|
||||||
dependsOn:
|
|
||||||
- BuildPackage
|
|
||||||
- BuildDocker
|
|
||||||
|
|
||||||
pool:
|
|
||||||
vmImage: 'ubuntu-latest'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- task: SSH@0
|
|
||||||
displayName: 'Update Unstable Repository'
|
|
||||||
continueOnError: true
|
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/master')
|
|
||||||
inputs:
|
|
||||||
sshEndpoint: repository
|
|
||||||
runOptions: 'commands'
|
|
||||||
commands: nohup sudo /srv/repository/collect-server.azure.sh /srv/repository/incoming/azure $(Build.BuildNumber) unstable &
|
|
||||||
|
|
||||||
- task: SSH@0
|
|
||||||
displayName: 'Update Stable Repository'
|
|
||||||
continueOnError: true
|
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/v')
|
|
||||||
inputs:
|
|
||||||
sshEndpoint: repository
|
|
||||||
runOptions: 'commands'
|
|
||||||
commands: nohup sudo /srv/repository/collect-server.azure.sh /srv/repository/incoming/azure $(Build.BuildNumber) $(Build.SourceBranch) &
|
|
||||||
|
|
||||||
- job: PublishNuget
|
|
||||||
displayName: 'Publish NuGet packages'
|
|
||||||
|
|
||||||
pool:
|
|
||||||
vmImage: 'ubuntu-latest'
|
|
||||||
|
|
||||||
variables:
|
|
||||||
- name: JellyfinVersion
|
|
||||||
value: $[replace(variables['Build.SourceBranch'],'refs/tags/v','')]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- task: UseDotNet@2
|
|
||||||
displayName: 'Use .NET 8.0 sdk'
|
|
||||||
inputs:
|
|
||||||
packageType: 'sdk'
|
|
||||||
version: '8.0.x'
|
|
||||||
|
|
||||||
- task: DotNetCoreCLI@2
|
|
||||||
displayName: 'Build Stable Nuget packages'
|
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/v')
|
|
||||||
inputs:
|
|
||||||
command: 'custom'
|
|
||||||
projects: |
|
|
||||||
Jellyfin.Data/Jellyfin.Data.csproj
|
|
||||||
MediaBrowser.Common/MediaBrowser.Common.csproj
|
|
||||||
MediaBrowser.Controller/MediaBrowser.Controller.csproj
|
|
||||||
MediaBrowser.Model/MediaBrowser.Model.csproj
|
|
||||||
Emby.Naming/Emby.Naming.csproj
|
|
||||||
src/Jellyfin.Extensions/Jellyfin.Extensions.csproj
|
|
||||||
custom: 'pack'
|
|
||||||
arguments: -o $(Build.ArtifactStagingDirectory) -p:Version=$(JellyfinVersion)
|
|
||||||
|
|
||||||
- task: DotNetCoreCLI@2
|
|
||||||
displayName: 'Build Unstable Nuget packages'
|
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/master')
|
|
||||||
inputs:
|
|
||||||
command: 'custom'
|
|
||||||
projects: |
|
|
||||||
Jellyfin.Data/Jellyfin.Data.csproj
|
|
||||||
MediaBrowser.Common/MediaBrowser.Common.csproj
|
|
||||||
MediaBrowser.Controller/MediaBrowser.Controller.csproj
|
|
||||||
MediaBrowser.Model/MediaBrowser.Model.csproj
|
|
||||||
Emby.Naming/Emby.Naming.csproj
|
|
||||||
src/Jellyfin.Extensions/Jellyfin.Extensions.csproj
|
|
||||||
custom: 'pack'
|
|
||||||
arguments: '--version-suffix $(Build.BuildNumber) -o $(Build.ArtifactStagingDirectory) -p:Stability=Unstable'
|
|
||||||
|
|
||||||
- task: PublishBuildArtifacts@1
|
|
||||||
displayName: 'Publish Nuget packages'
|
|
||||||
inputs:
|
|
||||||
pathToPublish: $(Build.ArtifactStagingDirectory)
|
|
||||||
artifactName: Jellyfin Nuget Packages
|
|
||||||
|
|
||||||
- task: NuGetCommand@2
|
|
||||||
displayName: 'Push Nuget packages to stable feed'
|
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/v')
|
|
||||||
inputs:
|
|
||||||
command: 'push'
|
|
||||||
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg'
|
|
||||||
nuGetFeedType: 'external'
|
|
||||||
publishFeedCredentials: 'NugetOrg'
|
|
||||||
allowPackageConflicts: true # This ignores an error if the version already exists
|
|
||||||
|
|
||||||
- task: NuGetAuthenticate@1
|
|
||||||
displayName: 'Authenticate to unstable Nuget feed'
|
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/master')
|
|
||||||
|
|
||||||
- task: NuGetCommand@2
|
|
||||||
displayName: 'Push Nuget packages to unstable feed'
|
|
||||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/master')
|
|
||||||
inputs:
|
|
||||||
command: 'push'
|
|
||||||
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg' # No symbols since Azure Artifact does not support it
|
|
||||||
nuGetFeedType: 'internal'
|
|
||||||
publishVstsFeed: '7cce6c46-d610-45e3-9fb7-65a6bfd1b671/a5746b79-f369-42db-93ff-59cd066f9327'
|
|
||||||
allowPackageConflicts: true # This ignores an error if the version already exists
|
|
|
@ -1,98 +0,0 @@
|
||||||
parameters:
|
|
||||||
- name: ImageNames
|
|
||||||
type: object
|
|
||||||
default:
|
|
||||||
Linux: "ubuntu-latest"
|
|
||||||
Windows: "windows-latest"
|
|
||||||
macOS: "macos-latest"
|
|
||||||
- name: TestProjects
|
|
||||||
type: string
|
|
||||||
default: "tests/**/*Tests.csproj"
|
|
||||||
- name: DotNetSdkVersion
|
|
||||||
type: string
|
|
||||||
default: 8.0.x
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
- job: Test
|
|
||||||
displayName: Test
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
${{ each imageName in parameters.ImageNames }}:
|
|
||||||
${{ imageName.key }}:
|
|
||||||
ImageName: ${{ imageName.value }}
|
|
||||||
pool:
|
|
||||||
vmImage: "$(ImageName)"
|
|
||||||
steps:
|
|
||||||
- checkout: self
|
|
||||||
clean: true
|
|
||||||
submodules: true
|
|
||||||
persistCredentials: false
|
|
||||||
|
|
||||||
# This is required for the SonarCloud analyzer
|
|
||||||
- task: UseDotNet@2
|
|
||||||
displayName: "Install .NET SDK 5.x"
|
|
||||||
condition: eq(variables['ImageName'], 'ubuntu-latest')
|
|
||||||
inputs:
|
|
||||||
packageType: sdk
|
|
||||||
version: '5.x'
|
|
||||||
|
|
||||||
- task: UseDotNet@2
|
|
||||||
displayName: "Update DotNet"
|
|
||||||
inputs:
|
|
||||||
packageType: sdk
|
|
||||||
version: ${{ parameters.DotNetSdkVersion }}
|
|
||||||
|
|
||||||
- task: SonarCloudPrepare@1
|
|
||||||
displayName: 'Prepare analysis on SonarCloud'
|
|
||||||
condition: eq(variables['ImageName'], 'ubuntu-latest')
|
|
||||||
enabled: false
|
|
||||||
inputs:
|
|
||||||
SonarCloud: 'Sonarcloud for Jellyfin'
|
|
||||||
organization: 'jellyfin'
|
|
||||||
projectKey: 'jellyfin_jellyfin'
|
|
||||||
|
|
||||||
- task: DotNetCoreCLI@2
|
|
||||||
displayName: 'Run CLI Tests'
|
|
||||||
inputs:
|
|
||||||
command: "test"
|
|
||||||
projects: ${{ parameters.TestProjects }}
|
|
||||||
arguments: '--configuration Release --collect:"XPlat Code Coverage" --settings tests/coverletArgs.runsettings --verbosity minimal'
|
|
||||||
publishTestResults: true
|
|
||||||
testRunTitle: $(Agent.JobName)
|
|
||||||
workingDirectory: "$(Build.SourcesDirectory)"
|
|
||||||
|
|
||||||
- task: SonarCloudAnalyze@1
|
|
||||||
displayName: 'Run Code Analysis'
|
|
||||||
condition: eq(variables['ImageName'], 'ubuntu-latest')
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
- task: SonarCloudPublish@1
|
|
||||||
displayName: 'Publish Quality Gate Result'
|
|
||||||
condition: eq(variables['ImageName'], 'ubuntu-latest')
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
- task: Palmmedia.reportgenerator.reportgenerator-build-release-task.reportgenerator@4
|
|
||||||
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux')) # !! THIS is for V1 only V2 will/should support merging
|
|
||||||
displayName: 'Run ReportGenerator'
|
|
||||||
inputs:
|
|
||||||
reports: "$(Agent.TempDirectory)/**/coverage.cobertura.xml"
|
|
||||||
targetdir: "$(Agent.TempDirectory)/merged/"
|
|
||||||
reporttypes: "Cobertura"
|
|
||||||
|
|
||||||
## V2 is already in the repository but it does not work "wrong number of segments" YAML error.
|
|
||||||
- task: PublishCodeCoverageResults@1
|
|
||||||
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux')) # !! THIS is for V1 only V2 will/should support merging
|
|
||||||
displayName: 'Publish Code Coverage'
|
|
||||||
inputs:
|
|
||||||
codeCoverageTool: "cobertura"
|
|
||||||
#summaryFileLocation: '$(Agent.TempDirectory)/**/coverage.cobertura.xml' # !!THIS IS FOR V2
|
|
||||||
summaryFileLocation: "$(Agent.TempDirectory)/merged/**.xml"
|
|
||||||
pathToSources: $(Build.SourcesDirectory)
|
|
||||||
failIfCoverageEmpty: true
|
|
||||||
|
|
||||||
- task: PublishPipelineArtifact@1
|
|
||||||
displayName: 'Publish OpenAPI Artifact'
|
|
||||||
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
|
|
||||||
inputs:
|
|
||||||
targetPath: "tests/Jellyfin.Server.Integration.Tests/bin/Release/net8.0/openapi.json"
|
|
||||||
artifactName: 'OpenAPI Spec'
|
|
|
@ -1,64 +0,0 @@
|
||||||
name: $(Date:yyyyMMdd)$(Rev:.r)
|
|
||||||
|
|
||||||
variables:
|
|
||||||
- name: TestProjects
|
|
||||||
value: 'tests/**/*Tests.csproj'
|
|
||||||
- name: RestoreBuildProjects
|
|
||||||
value: 'Jellyfin.Server/Jellyfin.Server.csproj'
|
|
||||||
|
|
||||||
pr:
|
|
||||||
autoCancel: true
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
batch: true
|
|
||||||
branches:
|
|
||||||
include:
|
|
||||||
- '*'
|
|
||||||
tags:
|
|
||||||
include:
|
|
||||||
- 'v*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
- ${{ if not(startsWith(variables['Build.SourceBranch'], 'refs/tags/v')) }}:
|
|
||||||
- template: azure-pipelines-main.yml
|
|
||||||
parameters:
|
|
||||||
LinuxImage: 'ubuntu-latest'
|
|
||||||
RestoreBuildProjects: $(RestoreBuildProjects)
|
|
||||||
|
|
||||||
- ${{ if not(or(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), startsWith(variables['Build.SourceBranch'], 'refs/heads/master'))) }}:
|
|
||||||
- template: azure-pipelines-test.yml
|
|
||||||
parameters:
|
|
||||||
ImageNames:
|
|
||||||
Linux: 'ubuntu-latest'
|
|
||||||
Windows: 'windows-latest'
|
|
||||||
macOS: 'macos-latest'
|
|
||||||
|
|
||||||
- ${{ if or(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), startsWith(variables['Build.SourceBranch'], 'refs/heads/master')) }}:
|
|
||||||
- template: azure-pipelines-test.yml
|
|
||||||
parameters:
|
|
||||||
ImageNames:
|
|
||||||
Linux: 'ubuntu-latest'
|
|
||||||
|
|
||||||
- ${{ if not(or(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), startsWith(variables['Build.SourceBranch'], 'refs/heads/master'))) }}:
|
|
||||||
- template: azure-pipelines-abi.yml
|
|
||||||
parameters:
|
|
||||||
Packages:
|
|
||||||
Naming:
|
|
||||||
NugetPackageName: Jellyfin.Naming
|
|
||||||
AssemblyFileName: Emby.Naming.dll
|
|
||||||
Controller:
|
|
||||||
NugetPackageName: Jellyfin.Controller
|
|
||||||
AssemblyFileName: MediaBrowser.Controller.dll
|
|
||||||
Model:
|
|
||||||
NugetPackageName: Jellyfin.Model
|
|
||||||
AssemblyFileName: MediaBrowser.Model.dll
|
|
||||||
Common:
|
|
||||||
NugetPackageName: Jellyfin.Common
|
|
||||||
AssemblyFileName: MediaBrowser.Common.dll
|
|
||||||
Extensions:
|
|
||||||
NugetPackageName: Jellyfin.Extensions
|
|
||||||
AssemblyFileName: Jellyfin.Extensions.dll
|
|
||||||
LinuxImage: 'ubuntu-latest'
|
|
||||||
|
|
||||||
- ${{ if or(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), startsWith(variables['Build.SourceBranch'], 'refs/heads/master')) }}:
|
|
||||||
- template: azure-pipelines-package.yml
|
|
Loading…
Reference in New Issue
Block a user