2019-09-02 23:03:41 +02:00
|
|
|
# Starter pipeline
|
|
|
|
# Start with a minimal pipeline that you can customize to build and deploy your code.
|
|
|
|
# Add steps that build, run tests, deploy, and more:
|
|
|
|
# https://aka.ms/yaml
|
|
|
|
|
|
|
|
variables:
|
|
|
|
outputFolder: './_output'
|
|
|
|
artifactsFolder: './_artifacts'
|
|
|
|
testsFolder: './_tests'
|
|
|
|
majorVersion: '2.0.0'
|
|
|
|
minorVersion: $[counter('minorVersion', 2000)]
|
|
|
|
radarrVersion: '$(majorVersion).$(minorVersion)'
|
|
|
|
buildName: '$(Build.SourceBranchName).$(radarrVersion)'
|
|
|
|
sentryOrg: 'radarr'
|
2019-10-14 22:21:00 +02:00
|
|
|
dotnetVersion: '3.0.x'
|
2019-09-02 23:03:41 +02:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- develop
|
|
|
|
- aphrodite
|
|
|
|
|
|
|
|
pr:
|
|
|
|
- develop
|
|
|
|
- aphrodite
|
|
|
|
|
|
|
|
stages:
|
|
|
|
- stage: Build_Backend
|
|
|
|
displayName: Build Backend
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
- job: Backend
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
Linux:
|
|
|
|
osName: 'Linux'
|
|
|
|
imageName: 'ubuntu-16.04'
|
|
|
|
Mac:
|
|
|
|
osName: 'Mac'
|
|
|
|
imageName: 'macos-10.13'
|
|
|
|
Windows:
|
|
|
|
osName: 'Windows'
|
2019-10-14 22:21:00 +02:00
|
|
|
imageName: 'windows-2019'
|
2019-09-02 23:03:41 +02:00
|
|
|
|
|
|
|
pool:
|
|
|
|
vmImage: $(imageName)
|
|
|
|
steps:
|
|
|
|
# Set the build name properly. The 'name' property won't recursively expand so hack here:
|
|
|
|
- powershell: Write-Host "##vso[build.updatebuildnumber]$($env:RADARRVERSION)"
|
|
|
|
displayName: Set Build Name
|
|
|
|
- checkout: self
|
|
|
|
submodules: true
|
|
|
|
fetchDepth: 1
|
2019-10-14 22:21:00 +02:00
|
|
|
- task: UseDotNet@2
|
2019-10-14 22:21:00 +02:00
|
|
|
displayName: 'Install .net core 3.0'
|
2019-10-14 22:20:59 +02:00
|
|
|
inputs:
|
|
|
|
version: $(dotnetVersion)
|
2019-10-14 22:21:00 +02:00
|
|
|
condition: ne(variables['osName'], 'Windows')
|
|
|
|
- bash: ./build.sh --backend
|
2019-09-02 23:03:41 +02:00
|
|
|
displayName: Build Radarr Backend
|
2019-10-14 22:20:59 +02:00
|
|
|
- bash: |
|
|
|
|
find ${OUTPUTFOLDER} -type f ! -path "*/publish/*" -exec rm -rf {} \;
|
|
|
|
find ${OUTPUTFOLDER} -depth -empty -type d -exec rm -r "{}" \;
|
|
|
|
find ${TESTSFOLDER} -type f ! -path "*/publish/*" -exec rm -rf {} \;
|
|
|
|
find ${TESTSFOLDER} -depth -empty -type d -exec rm -r "{}" \;
|
|
|
|
ls -lR
|
|
|
|
displayName: Clean up intermediate output
|
2019-09-02 23:03:41 +02:00
|
|
|
- publish: $(outputFolder)
|
|
|
|
artifact: '$(osName)Backend'
|
|
|
|
displayName: Publish Backend
|
|
|
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
2019-10-14 23:42:30 +02:00
|
|
|
- publish: '$(testsFolder)/netcoreapp3.0/win-x64/publish'
|
|
|
|
artifact: WindowsCoreTests
|
|
|
|
displayName: Publish Windows Test Package
|
2019-10-14 22:20:59 +02:00
|
|
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
|
|
|
- publish: '$(testsFolder)/net462/linux-x64/publish'
|
|
|
|
artifact: LinuxTests
|
2019-10-14 23:42:30 +02:00
|
|
|
displayName: Publish Linux Mono Test Package
|
2019-10-14 22:20:59 +02:00
|
|
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
2019-10-14 23:42:30 +02:00
|
|
|
- publish: '$(testsFolder)/netcoreapp3.0/linux-x64/publish'
|
|
|
|
artifact: LinuxCoreTests
|
|
|
|
displayName: Publish Linux Test Package
|
|
|
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
|
|
|
- publish: '$(testsFolder)/netcoreapp3.0/osx-x64/publish'
|
|
|
|
artifact: MacCoreTests
|
|
|
|
displayName: Publish MacOS Test Package
|
2019-09-02 23:03:41 +02:00
|
|
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
|
|
|
|
|
|
|
- stage: Build_Frontend
|
2019-10-14 22:21:00 +02:00
|
|
|
displayName: Frontend
|
2019-09-02 23:03:41 +02:00
|
|
|
dependsOn: []
|
|
|
|
|
|
|
|
jobs:
|
2019-10-14 22:21:00 +02:00
|
|
|
- job: Build
|
2019-09-02 23:03:41 +02:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
Linux:
|
|
|
|
osName: 'Linux'
|
|
|
|
imageName: 'ubuntu-16.04'
|
|
|
|
Mac:
|
|
|
|
osName: 'Mac'
|
|
|
|
imageName: 'macos-10.13'
|
|
|
|
Windows:
|
|
|
|
osName: 'Windows'
|
2019-10-14 22:21:00 +02:00
|
|
|
imageName: 'windows-2019'
|
2019-09-02 23:03:41 +02:00
|
|
|
pool:
|
|
|
|
vmImage: $(imageName)
|
|
|
|
steps:
|
|
|
|
- task: NodeTool@0
|
|
|
|
displayName: Set Node.js version
|
|
|
|
inputs:
|
|
|
|
versionSpec: '10.x'
|
|
|
|
- checkout: self
|
|
|
|
submodules: true
|
|
|
|
fetchDepth: 1
|
2019-10-14 22:21:00 +02:00
|
|
|
- bash: ./build.sh --frontend
|
2019-09-02 23:03:41 +02:00
|
|
|
displayName: Build Radarr Frontend
|
|
|
|
env:
|
|
|
|
FORCE_COLOR: 0
|
|
|
|
- publish: $(outputFolder)
|
|
|
|
artifact: '$(osName)Frontend'
|
|
|
|
displayName: Publish Frontend
|
|
|
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
|
|
|
|
2019-10-14 22:21:00 +02:00
|
|
|
- stage: Installer
|
2019-09-02 23:03:41 +02:00
|
|
|
dependsOn:
|
|
|
|
- Build_Backend
|
|
|
|
- Build_Frontend
|
|
|
|
jobs:
|
|
|
|
- job: Windows_Installer
|
|
|
|
displayName: Create Installer
|
|
|
|
pool:
|
2019-10-14 22:21:00 +02:00
|
|
|
vmImage: 'windows-2019'
|
2019-09-02 23:03:41 +02:00
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
fetchDepth: 1
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
|
|
|
artifactName: WindowsBackend
|
|
|
|
targetPath: _output
|
|
|
|
displayName: Fetch Backend
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
|
|
|
artifactName: WindowsFrontend
|
|
|
|
targetPath: _output
|
|
|
|
displayName: Fetch Frontend
|
2019-10-14 22:21:00 +02:00
|
|
|
- bash: ./build.sh --packages
|
2019-09-02 23:03:41 +02:00
|
|
|
displayName: Create Packages
|
|
|
|
- bash: |
|
2019-10-14 23:42:30 +02:00
|
|
|
setup/inno/ISCC.exe setup/radarr.iss //DFramework=netcoreapp3.0
|
|
|
|
cp setup/output/Radarr.*windows.netcoreapp3.0.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/Radarr.${BUILDNAME}.windows-core-x64-installer.exe
|
|
|
|
displayName: Create .NET Core Windows installer
|
2019-09-02 23:03:41 +02:00
|
|
|
- publish: $(Build.ArtifactStagingDirectory)
|
|
|
|
artifact: 'WindowsInstaller'
|
|
|
|
displayName: Publish Installer
|
2019-10-14 22:21:00 +02:00
|
|
|
|
|
|
|
- stage: Packages
|
|
|
|
dependsOn:
|
|
|
|
- Build_Backend
|
|
|
|
- Build_Frontend
|
|
|
|
jobs:
|
2019-09-02 23:03:41 +02:00
|
|
|
- job: Other_Packages
|
|
|
|
displayName: Create Standard Packages
|
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-16.04'
|
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
fetchDepth: 1
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
|
|
|
artifactName: WindowsBackend
|
|
|
|
targetPath: _output
|
|
|
|
displayName: Fetch Backend
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
|
|
|
artifactName: WindowsFrontend
|
|
|
|
targetPath: _output
|
|
|
|
displayName: Fetch Frontend
|
2019-10-14 22:21:00 +02:00
|
|
|
- bash: ./build.sh --packages
|
2019-09-02 23:03:41 +02:00
|
|
|
displayName: Create Packages
|
|
|
|
- bash: |
|
2019-10-14 22:21:00 +02:00
|
|
|
find . -name "Radarr" -exec chmod a+x {} \;
|
|
|
|
find . -name "Radarr.Update" -exec chmod a+x {} \;
|
|
|
|
displayName: Set executable bits
|
2019-09-02 23:03:41 +02:00
|
|
|
- task: ArchiveFiles@2
|
2019-10-14 23:42:30 +02:00
|
|
|
displayName: Create Windows Core zip
|
2019-09-02 23:03:41 +02:00
|
|
|
inputs:
|
2019-10-14 23:42:30 +02:00
|
|
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).windows-core-x64.zip'
|
2019-09-02 23:03:41 +02:00
|
|
|
archiveType: 'zip'
|
|
|
|
includeRootFolder: false
|
2019-10-14 23:42:30 +02:00
|
|
|
rootFolderOrFile: $(artifactsFolder)/windows/netcoreapp3.0
|
2019-09-02 23:03:41 +02:00
|
|
|
- task: ArchiveFiles@2
|
2019-10-14 23:42:30 +02:00
|
|
|
displayName: Create MacOS Core app
|
2019-09-02 23:03:41 +02:00
|
|
|
inputs:
|
2019-10-14 23:42:30 +02:00
|
|
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).osx-app-core-x64.zip'
|
2019-09-02 23:03:41 +02:00
|
|
|
archiveType: 'zip'
|
|
|
|
includeRootFolder: false
|
2019-10-14 23:42:30 +02:00
|
|
|
rootFolderOrFile: $(artifactsFolder)/macos-app/netcoreapp3.0
|
2019-09-02 23:03:41 +02:00
|
|
|
- task: ArchiveFiles@2
|
2019-10-14 23:42:30 +02:00
|
|
|
displayName: Create MacOS Core tar
|
2019-09-02 23:03:41 +02:00
|
|
|
inputs:
|
2019-10-14 23:42:30 +02:00
|
|
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).osx-core-x64.tar.gz'
|
2019-09-02 23:03:41 +02:00
|
|
|
archiveType: 'tar'
|
|
|
|
tarCompression: 'gz'
|
|
|
|
includeRootFolder: false
|
2019-10-14 23:42:30 +02:00
|
|
|
rootFolderOrFile: $(artifactsFolder)/macos/netcoreapp3.0
|
2019-09-02 23:03:41 +02:00
|
|
|
- task: ArchiveFiles@2
|
2019-10-14 23:42:30 +02:00
|
|
|
displayName: Create Linux Mono tar
|
2019-09-02 23:03:41 +02:00
|
|
|
inputs:
|
2019-10-14 22:21:00 +02:00
|
|
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).linux.tar.gz'
|
2019-09-02 23:03:41 +02:00
|
|
|
archiveType: 'tar'
|
|
|
|
tarCompression: 'gz'
|
|
|
|
includeRootFolder: false
|
2019-10-14 22:21:00 +02:00
|
|
|
rootFolderOrFile: $(artifactsFolder)/linux-x64/net462
|
2019-10-14 23:42:30 +02:00
|
|
|
- task: ArchiveFiles@2
|
|
|
|
displayName: Create Linux Core tar
|
|
|
|
inputs:
|
|
|
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).linux-core-x64.tar.gz'
|
|
|
|
archiveType: 'tar'
|
|
|
|
tarCompression: 'gz'
|
|
|
|
includeRootFolder: false
|
|
|
|
rootFolderOrFile: $(artifactsFolder)/linux-x64/netcoreapp3.0
|
|
|
|
- task: ArchiveFiles@2
|
|
|
|
displayName: Create ARM32 Linux Core tar
|
|
|
|
inputs:
|
|
|
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).linux-core-arm.tar.gz'
|
|
|
|
archiveType: 'tar'
|
|
|
|
tarCompression: 'gz'
|
|
|
|
includeRootFolder: false
|
|
|
|
rootFolderOrFile: $(artifactsFolder)/linux-arm/netcoreapp3.0
|
|
|
|
- task: ArchiveFiles@2
|
|
|
|
displayName: Create ARM64 Linux Core tar
|
|
|
|
inputs:
|
|
|
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).linux-core-arm64.tar.gz'
|
|
|
|
archiveType: 'tar'
|
|
|
|
tarCompression: 'gz'
|
|
|
|
includeRootFolder: false
|
|
|
|
rootFolderOrFile: $(artifactsFolder)/linux-arm64/netcoreapp3.0
|
2019-09-02 23:03:41 +02:00
|
|
|
- publish: $(Build.ArtifactStagingDirectory)
|
|
|
|
artifact: 'Packages'
|
|
|
|
displayName: Publish Packages
|
|
|
|
- bash: |
|
|
|
|
echo "Uploading source maps to sentry"
|
|
|
|
curl -sL https://sentry.io/get-cli/ | bash
|
|
|
|
RELEASENAME="${RADARRVERSION}-${BUILD_SOURCEBRANCHNAME}"
|
|
|
|
sentry-cli releases new --finalize -p radarr -p radarr-ui -p radarr-update "${RELEASENAME}"
|
|
|
|
sentry-cli releases -p radarr-ui files "${RELEASENAME}" upload-sourcemaps _output/UI/ --rewrite
|
|
|
|
sentry-cli releases set-commits --auto "${RELEASENAME}"
|
2019-09-04 06:28:53 +02:00
|
|
|
sentry-cli releases deploys "${RELEASENAME}" new -e aphrodite
|
2019-09-02 23:03:41 +02:00
|
|
|
displayName: Publish Sentry Source Maps
|
2019-09-04 06:28:53 +02:00
|
|
|
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/aphrodite'))
|
2019-09-02 23:03:41 +02:00
|
|
|
env:
|
|
|
|
SENTRY_AUTH_TOKEN: $(sentryAuthToken)
|
|
|
|
SENTRY_ORG: $(sentryOrg)
|
|
|
|
|
|
|
|
- stage: Unit_Test
|
|
|
|
displayName: Unit Tests
|
|
|
|
dependsOn: Build_Backend
|
|
|
|
condition: succeeded()
|
|
|
|
jobs:
|
|
|
|
- job: Unit
|
2019-10-14 22:21:00 +02:00
|
|
|
displayName: Unit Native
|
2019-09-02 23:03:41 +02:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2019-10-14 23:42:30 +02:00
|
|
|
MacCore:
|
2019-09-02 23:03:41 +02:00
|
|
|
osName: 'Mac'
|
2019-10-14 23:42:30 +02:00
|
|
|
testName: 'MacCore'
|
2019-09-02 23:03:41 +02:00
|
|
|
imageName: 'macos-10.13'
|
2019-10-14 23:42:30 +02:00
|
|
|
WindowsCore:
|
2019-09-02 23:03:41 +02:00
|
|
|
osName: 'Windows'
|
2019-10-14 23:42:30 +02:00
|
|
|
testName: 'WindowsCore'
|
2019-10-14 22:21:00 +02:00
|
|
|
imageName: 'windows-2019'
|
2019-10-14 23:42:30 +02:00
|
|
|
LinuxCore:
|
|
|
|
osName: 'Linux'
|
|
|
|
testName: 'LinuxCore'
|
|
|
|
imageName: 'ubuntu-16.04'
|
|
|
|
pattern: 'Radarr.**.linux-core-x64.tar.gz'
|
2019-09-02 23:03:41 +02:00
|
|
|
|
|
|
|
pool:
|
|
|
|
vmImage: $(imageName)
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout: none
|
2019-10-14 23:42:30 +02:00
|
|
|
- task: UseDotNet@2
|
|
|
|
displayName: 'Install .net core 3.0'
|
|
|
|
inputs:
|
|
|
|
version: $(dotnetVersion)
|
|
|
|
condition: ne(variables['osName'], 'Windows')
|
2019-09-02 23:03:41 +02:00
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
displayName: Download Test Artifact
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
2019-10-14 23:42:30 +02:00
|
|
|
artifactName: '$(testName)Tests'
|
2019-09-02 23:03:41 +02:00
|
|
|
targetPath: $(testsFolder)
|
2019-09-03 04:22:25 +02:00
|
|
|
- bash: |
|
|
|
|
wget https://mediaarea.net/repo/deb/repo-mediaarea_1.0-9_all.deb
|
|
|
|
sudo dpkg -i repo-mediaarea_1.0-9_all.deb
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y libmediainfo-dev libmediainfo0v5 mediainfo
|
2019-10-14 22:21:00 +02:00
|
|
|
displayName: Install mediainfo
|
2019-09-03 04:22:25 +02:00
|
|
|
condition: and(succeeded(), eq(variables['osName'], 'Linux'))
|
2019-09-02 23:03:41 +02:00
|
|
|
- powershell: Set-Service SCardSvr -StartupType Manual
|
|
|
|
displayName: Enable Windows Test Service
|
|
|
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
2019-10-14 23:42:30 +02:00
|
|
|
- bash: |
|
|
|
|
wget https://github.com/acoustid/chromaprint/releases/download/v1.4.3/chromaprint-fpcalc-1.4.3-linux-x86_64.tar.gz
|
|
|
|
sudo tar xf chromaprint-fpcalc-1.4.3-linux-x86_64.tar.gz --strip-components=1 --directory /usr/bin
|
|
|
|
displayName: Install fpcalc
|
|
|
|
condition: and(succeeded(), eq(variables['osName'], 'Linux'))
|
2019-10-14 22:21:00 +02:00
|
|
|
- bash: |
|
|
|
|
SYMLINK=5_18_1
|
|
|
|
MONOPREFIX=/Library/Frameworks/Mono.framework/Versions/$SYMLINK
|
|
|
|
echo "##vso[task.setvariable variable=MONOPREFIX;]$MONOPREFIX"
|
|
|
|
echo "##vso[task.setvariable variable=PKG_CONFIG_PATH;]$MONOPREFIX/lib/pkgconfig:$MONOPREFIX/share/pkgconfig:$PKG_CONFIG_PATH"
|
|
|
|
echo "##vso[task.setvariable variable=PATH;]$MONOPREFIX/bin:$PATH"
|
|
|
|
displayName: Set Mono Version
|
|
|
|
condition: and(succeeded(), eq(variables['osName'], 'Mac'))
|
2019-10-14 22:20:59 +02:00
|
|
|
- bash: find ${TESTSFOLDER} -name "Radarr.Test.Dummy" -exec chmod a+x {} \;
|
|
|
|
displayName: Make Test Dummy Executable
|
2019-09-02 23:03:41 +02:00
|
|
|
- task: Bash@3
|
|
|
|
displayName: Run Tests
|
|
|
|
env:
|
|
|
|
TEST_DIR: $(Build.SourcesDirectory)/_tests
|
|
|
|
inputs:
|
|
|
|
targetType: 'filePath'
|
|
|
|
filePath: '$(testsFolder)/test.sh'
|
|
|
|
arguments: '$(osName) Unit Test'
|
|
|
|
- task: PublishTestResults@2
|
|
|
|
displayName: Publish Test Results
|
|
|
|
inputs:
|
|
|
|
testResultsFormat: 'NUnit'
|
|
|
|
testResultsFiles: '**/TestResult.xml'
|
2019-10-14 23:42:30 +02:00
|
|
|
testRunTitle: '$(testName) Unit Tests'
|
2019-10-14 22:21:00 +02:00
|
|
|
failTaskOnFailedTests: true
|
|
|
|
|
|
|
|
- job: Unit_Docker
|
|
|
|
displayName: Unit Docker
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
mono510:
|
|
|
|
testName: 'Mono 5.10'
|
|
|
|
containerImage: radarr/testimages:mono-5.10
|
|
|
|
mono512:
|
|
|
|
testName: 'Mono 5.12'
|
|
|
|
containerImage: radarr/testimages:mono-5.12
|
|
|
|
mono514:
|
|
|
|
testName: 'Mono 5.14'
|
|
|
|
containerImage: radarr/testimages:mono-5.14
|
|
|
|
mono516:
|
|
|
|
testName: 'Mono 5.16'
|
|
|
|
containerImage: radarr/testimages:mono-5.16
|
|
|
|
mono518:
|
|
|
|
testName: 'Mono 5.18'
|
|
|
|
containerImage: radarr/testimages:mono-5.18
|
|
|
|
mono520:
|
|
|
|
testName: 'Mono 5.20'
|
|
|
|
containerImage: radarr/testimages:mono-5.20
|
|
|
|
mono600:
|
|
|
|
testName: 'Mono 6.0'
|
|
|
|
containerImage: radarr/testimages:mono-6.0
|
|
|
|
mono604:
|
|
|
|
testName: 'Mono 6.4'
|
|
|
|
containerImage: radarr/testimages:mono-6.4
|
|
|
|
mono606:
|
|
|
|
testName: 'Mono 6.6'
|
|
|
|
containerImage: radarr/testimages:mono-6.6
|
|
|
|
|
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-16.04'
|
|
|
|
|
|
|
|
container: $[ variables['containerImage'] ]
|
2019-09-02 23:03:41 +02:00
|
|
|
|
2019-10-14 22:21:00 +02:00
|
|
|
timeoutInMinutes: 10
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- bash: mono --version
|
|
|
|
displayName: Check Mono version
|
2019-10-14 23:42:30 +02:00
|
|
|
- task: UseDotNet@2
|
|
|
|
displayName: 'Install .net core 3.0'
|
|
|
|
inputs:
|
|
|
|
version: $(dotnetVersion)
|
|
|
|
condition: ne(variables['osName'], 'Windows')
|
2019-10-14 22:21:00 +02:00
|
|
|
- checkout: none
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
displayName: Download Test Artifact
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
|
|
|
artifactName: LinuxTests
|
|
|
|
targetPath: $(testsFolder)
|
|
|
|
- task: Bash@3
|
|
|
|
displayName: Run Tests
|
|
|
|
inputs:
|
|
|
|
targetType: 'filePath'
|
|
|
|
filePath: '$(testsFolder)/test.sh'
|
|
|
|
arguments: 'Linux Unit Test'
|
|
|
|
- task: PublishTestResults@2
|
|
|
|
displayName: Publish Test Results
|
|
|
|
inputs:
|
|
|
|
testResultsFormat: 'NUnit'
|
|
|
|
testResultsFiles: '**/TestResult.xml'
|
|
|
|
testRunTitle: '$(testName) Unit Tests'
|
|
|
|
failTaskOnFailedTests: true
|
|
|
|
|
|
|
|
- stage: Integration
|
|
|
|
displayName: Integration
|
|
|
|
dependsOn: Packages
|
2019-09-02 23:03:41 +02:00
|
|
|
jobs:
|
|
|
|
|
2019-10-14 22:21:00 +02:00
|
|
|
- job: Integration_Native
|
|
|
|
displayName: Integration Native
|
2019-09-02 23:03:41 +02:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2019-10-14 23:42:30 +02:00
|
|
|
MacCore:
|
2019-09-02 23:03:41 +02:00
|
|
|
osName: 'Mac'
|
2019-10-14 23:42:30 +02:00
|
|
|
testName: 'MacCore'
|
2019-09-02 23:03:41 +02:00
|
|
|
imageName: 'macos-10.13'
|
2019-10-14 23:42:30 +02:00
|
|
|
pattern: 'Radarr.**.osx-core-x64.tar.gz'
|
|
|
|
WindowsCore:
|
2019-09-02 23:03:41 +02:00
|
|
|
osName: 'Windows'
|
2019-10-14 23:42:30 +02:00
|
|
|
testName: 'WindowsCore'
|
2019-10-14 22:21:00 +02:00
|
|
|
imageName: 'windows-2019'
|
2019-10-14 23:42:30 +02:00
|
|
|
pattern: 'Radarr.**.windows-core-x64.zip'
|
|
|
|
LinuxCore:
|
|
|
|
osName: 'Linux'
|
|
|
|
testName: 'LinuxCore'
|
|
|
|
imageName: 'ubuntu-16.04'
|
|
|
|
pattern: 'Radarr.**.linux-core-x64.tar.gz'
|
2019-09-02 23:03:41 +02:00
|
|
|
|
|
|
|
pool:
|
|
|
|
vmImage: $(imageName)
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- bash: |
|
|
|
|
SYMLINK=5_18_1
|
|
|
|
MONOPREFIX=/Library/Frameworks/Mono.framework/Versions/$SYMLINK
|
2019-10-14 22:21:00 +02:00
|
|
|
echo "##vso[task.setvariable variable=MONOPREFIX;]$MONOPREFIX"
|
2019-09-02 23:03:41 +02:00
|
|
|
echo "##vso[task.setvariable variable=PKG_CONFIG_PATH;]$MONOPREFIX/lib/pkgconfig:$MONOPREFIX/share/pkgconfig:$PKG_CONFIG_PATH"
|
|
|
|
echo "##vso[task.setvariable variable=PATH;]$MONOPREFIX/bin:$PATH"
|
|
|
|
displayName: Set Mono Version
|
|
|
|
condition: and(succeeded(), eq(variables['osName'], 'Mac'))
|
2019-10-14 23:42:30 +02:00
|
|
|
- task: UseDotNet@2
|
|
|
|
displayName: 'Install .net core 3.0'
|
|
|
|
inputs:
|
|
|
|
version: $(dotnetVersion)
|
|
|
|
condition: ne(variables['osName'], 'Windows')
|
2019-09-02 23:03:41 +02:00
|
|
|
- checkout: none
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
displayName: Download Test Artifact
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
2019-10-14 23:42:30 +02:00
|
|
|
artifactName: '$(testName)Tests'
|
2019-09-02 23:03:41 +02:00
|
|
|
targetPath: $(testsFolder)
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
displayName: Download Build Artifact
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
|
|
|
artifactName: Packages
|
|
|
|
itemPattern: '**/$(pattern)'
|
|
|
|
targetPath: $(Build.ArtifactStagingDirectory)
|
|
|
|
- task: ExtractFiles@1
|
|
|
|
inputs:
|
|
|
|
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
|
|
|
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
|
|
|
displayName: Extract Package
|
|
|
|
- bash: |
|
|
|
|
mkdir -p ./bin/
|
|
|
|
cp -r -v ${BUILD_ARTIFACTSTAGINGDIRECTORY}/bin/Radarr/. ./bin/
|
|
|
|
displayName: Move Package Contents
|
|
|
|
- task: Bash@3
|
|
|
|
displayName: Run Integration Tests
|
|
|
|
inputs:
|
|
|
|
targetType: 'filePath'
|
|
|
|
filePath: '$(testsFolder)/test.sh'
|
|
|
|
arguments: $(osName) Integration Test
|
|
|
|
- task: PublishTestResults@2
|
|
|
|
inputs:
|
|
|
|
testResultsFormat: 'NUnit'
|
|
|
|
testResultsFiles: '**/TestResult.xml'
|
2019-10-14 23:42:30 +02:00
|
|
|
testRunTitle: '$(testName) Integration Tests'
|
2019-09-02 23:03:41 +02:00
|
|
|
failTaskOnFailedTests: true
|
|
|
|
displayName: Publish Test Results
|
|
|
|
|
2019-10-14 22:21:00 +02:00
|
|
|
- job: Integration_Docker
|
|
|
|
displayName: Integration Docker
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
mono510:
|
|
|
|
testName: 'Mono 5.10'
|
2019-10-14 22:21:00 +02:00
|
|
|
containerImage: radarr/testimages:mono-5.10
|
2019-10-14 22:21:00 +02:00
|
|
|
mono512:
|
|
|
|
testName: 'Mono 5.12'
|
2019-10-14 22:21:00 +02:00
|
|
|
containerImage: radarr/testimages:mono-5.12
|
2019-10-14 22:21:00 +02:00
|
|
|
mono514:
|
|
|
|
testName: 'Mono 5.14'
|
2019-10-14 22:21:00 +02:00
|
|
|
containerImage: radarr/testimages:mono-5.14
|
2019-10-14 22:21:00 +02:00
|
|
|
mono516:
|
|
|
|
testName: 'Mono 5.16'
|
2019-10-14 22:21:00 +02:00
|
|
|
containerImage: radarr/testimages:mono-5.16
|
2019-10-14 22:21:00 +02:00
|
|
|
mono518:
|
|
|
|
testName: 'Mono 5.18'
|
2019-10-14 22:21:00 +02:00
|
|
|
containerImage: radarr/testimages:mono-5.18
|
2019-10-14 22:21:00 +02:00
|
|
|
mono520:
|
|
|
|
testName: 'Mono 5.20'
|
2019-10-14 22:21:00 +02:00
|
|
|
containerImage: radarr/testimages:mono-5.20
|
|
|
|
mono600:
|
|
|
|
testName: 'Mono 6.0'
|
|
|
|
containerImage: radarr/testimages:mono-6.0
|
|
|
|
mono604:
|
|
|
|
testName: 'Mono 6.4'
|
|
|
|
containerImage: radarr/testimages:mono-6.4
|
|
|
|
mono606:
|
|
|
|
testName: 'Mono 6.6'
|
|
|
|
containerImage: radarr/testimages:mono-6.6
|
|
|
|
|
2019-10-14 22:21:00 +02:00
|
|
|
variables:
|
|
|
|
pattern: 'Radarr.**.linux.tar.gz'
|
|
|
|
|
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-16.04'
|
|
|
|
|
|
|
|
container: $[ variables['containerImage'] ]
|
2019-10-14 22:21:00 +02:00
|
|
|
|
|
|
|
timeoutInMinutes: 15
|
2019-10-14 22:21:00 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- bash: mono --version
|
|
|
|
displayName: Check Mono version
|
2019-10-14 23:42:30 +02:00
|
|
|
- task: UseDotNet@2
|
|
|
|
displayName: 'Install .net core 3.0'
|
|
|
|
inputs:
|
|
|
|
version: $(dotnetVersion)
|
|
|
|
condition: ne(variables['osName'], 'Windows')
|
2019-10-14 22:21:00 +02:00
|
|
|
- checkout: none
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
displayName: Download Test Artifact
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
2019-10-14 23:42:30 +02:00
|
|
|
artifactName: LinuxTests
|
2019-10-14 22:21:00 +02:00
|
|
|
targetPath: $(testsFolder)
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
displayName: Download Build Artifact
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
|
|
|
artifactName: Packages
|
|
|
|
itemPattern: '**/$(pattern)'
|
|
|
|
targetPath: $(Build.ArtifactStagingDirectory)
|
|
|
|
- task: ExtractFiles@1
|
|
|
|
inputs:
|
|
|
|
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
|
|
|
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
|
|
|
displayName: Extract Package
|
|
|
|
- bash: |
|
|
|
|
mkdir -p ./bin/
|
|
|
|
cp -r -v ${BUILD_ARTIFACTSTAGINGDIRECTORY}/bin/Radarr/. ./bin/
|
|
|
|
ls -lR
|
|
|
|
displayName: Move Package Contents
|
|
|
|
- task: Bash@3
|
|
|
|
displayName: Run Integration Tests
|
|
|
|
inputs:
|
|
|
|
targetType: 'filePath'
|
|
|
|
filePath: '$(testsFolder)/test.sh'
|
|
|
|
arguments: Linux Integration Test
|
|
|
|
- task: PublishTestResults@2
|
|
|
|
inputs:
|
|
|
|
testResultsFormat: 'NUnit'
|
|
|
|
testResultsFiles: '**/TestResult.xml'
|
|
|
|
testRunTitle: '$(testName) Integration Tests'
|
|
|
|
failTaskOnFailedTests: true
|
|
|
|
displayName: Publish Test Results
|
|
|
|
|
2019-10-14 22:21:00 +02:00
|
|
|
- stage: Automation
|
|
|
|
displayName: Automation
|
|
|
|
dependsOn: Packages
|
|
|
|
|
|
|
|
jobs:
|
2019-09-02 23:03:41 +02:00
|
|
|
- job: Automation
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
Linux:
|
|
|
|
osName: 'Linux'
|
|
|
|
imageName: 'ubuntu-16.04'
|
2019-10-14 23:42:30 +02:00
|
|
|
pattern: 'Radarr.**.linux-core-x64.tar.gz'
|
2019-09-02 23:03:41 +02:00
|
|
|
failBuild: true
|
|
|
|
Mac:
|
|
|
|
osName: 'Mac'
|
|
|
|
imageName: 'macos-10.13' # Fails due to firefox not being installed on image
|
2019-10-14 23:42:30 +02:00
|
|
|
pattern: 'Radarr.**.osx-core-x64.tar.gz'
|
2019-09-02 23:03:41 +02:00
|
|
|
failBuild: false
|
|
|
|
Windows:
|
|
|
|
osName: 'Windows'
|
2019-10-14 22:21:00 +02:00
|
|
|
imageName: 'windows-2019'
|
2019-10-14 23:42:30 +02:00
|
|
|
pattern: 'Radarr.**.windows-core-x64.zip'
|
2019-09-02 23:03:41 +02:00
|
|
|
failBuild: true
|
|
|
|
|
|
|
|
pool:
|
|
|
|
vmImage: $(imageName)
|
|
|
|
|
|
|
|
steps:
|
2019-10-14 23:42:30 +02:00
|
|
|
- task: UseDotNet@2
|
|
|
|
displayName: 'Install .net core 3.0'
|
|
|
|
inputs:
|
|
|
|
version: $(dotnetVersion)
|
|
|
|
condition: ne(variables['osName'], 'Windows')
|
2019-09-02 23:03:41 +02:00
|
|
|
- checkout: none
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
displayName: Download Test Artifact
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
2019-10-14 23:42:30 +02:00
|
|
|
artifactName: '$(osName)CoreTests'
|
2019-09-02 23:03:41 +02:00
|
|
|
targetPath: $(testsFolder)
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
displayName: Download Build Artifact
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
|
|
|
artifactName: Packages
|
|
|
|
itemPattern: '**/$(pattern)'
|
|
|
|
targetPath: $(Build.ArtifactStagingDirectory)
|
|
|
|
- task: ExtractFiles@1
|
|
|
|
inputs:
|
|
|
|
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
|
|
|
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
|
|
|
displayName: Extract Package
|
|
|
|
- bash: |
|
|
|
|
mkdir -p ./bin/
|
|
|
|
cp -r -v ${BUILD_ARTIFACTSTAGINGDIRECTORY}/bin/Radarr/. ./bin/
|
|
|
|
displayName: Move Package Contents
|
|
|
|
- bash: |
|
|
|
|
if [[ $OSNAME == "Mac" ]]; then
|
|
|
|
url=https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-macos.tar.gz
|
|
|
|
elif [[ $OSNAME == "Linux" ]]; then
|
|
|
|
url=https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz
|
|
|
|
else
|
|
|
|
echo "Unhandled OS"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
curl -s -L "$url" | tar -xz
|
|
|
|
chmod +x geckodriver
|
|
|
|
mv geckodriver _tests
|
|
|
|
displayName: Install Gecko Driver
|
|
|
|
condition: and(succeeded(), ne(variables['osName'], 'Windows'))
|
|
|
|
- bash: ls -lR
|
|
|
|
- task: Bash@3
|
|
|
|
displayName: Run Automation Tests
|
|
|
|
inputs:
|
|
|
|
targetType: 'filePath'
|
|
|
|
filePath: '$(testsFolder)/test.sh'
|
|
|
|
arguments: $(osName) Automation Test
|
|
|
|
- task: PublishTestResults@2
|
|
|
|
inputs:
|
|
|
|
testResultsFormat: 'NUnit'
|
|
|
|
testResultsFiles: '**/TestResult.xml'
|
|
|
|
testRunTitle: '$(osName) Automation Tests'
|
|
|
|
failTaskOnFailedTests: $(failBuild)
|
|
|
|
displayName: Publish Test Results
|
|
|
|
|
2019-10-14 22:21:00 +02:00
|
|
|
- stage: Analyze
|
|
|
|
dependsOn: []
|
|
|
|
displayName: Analyze
|
|
|
|
|
2019-09-02 23:03:41 +02:00
|
|
|
|
2019-10-14 22:21:00 +02:00
|
|
|
jobs:
|
|
|
|
- job: Lint_Frontend
|
|
|
|
displayName: Lint Frontend
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
Linux:
|
|
|
|
osName: 'Linux'
|
|
|
|
imageName: 'ubuntu-16.04'
|
|
|
|
Windows:
|
|
|
|
osName: 'Windows'
|
|
|
|
imageName: 'windows-2019'
|
|
|
|
pool:
|
|
|
|
vmImage: $(imageName)
|
|
|
|
steps:
|
|
|
|
- task: NodeTool@0
|
|
|
|
displayName: Set Node.js version
|
|
|
|
inputs:
|
|
|
|
versionSpec: '10.x'
|
|
|
|
- checkout: self
|
|
|
|
submodules: true
|
|
|
|
fetchDepth: 1
|
|
|
|
- bash: ./build.sh --lint
|
|
|
|
displayName: Lint Radarr Frontend
|
|
|
|
env:
|
|
|
|
FORCE_COLOR: 0
|
|
|
|
|
|
|
|
# - job: Analyze_Frontend
|
|
|
|
# displayName: Frontend
|
|
|
|
# condition: eq(variables['system.pullrequest.isfork'], false)
|
|
|
|
# pool:
|
|
|
|
# vmImage: windows-2019
|
|
|
|
# steps:
|
|
|
|
# - checkout: self # Need history for Sonar analysis
|
|
|
|
# - task: SonarCloudPrepare@1
|
|
|
|
# env:
|
|
|
|
# SONAR_SCANNER_OPTS: ''
|
|
|
|
# inputs:
|
|
|
|
# SonarCloud: 'SonarCloud'
|
|
|
|
# organization: 'radarr'
|
|
|
|
# scannerMode: 'CLI'
|
|
|
|
# configMode: 'manual'
|
|
|
|
# cliProjectKey: 'radarr_Radarr.UI'
|
|
|
|
# cliProjectName: 'RadarrUI'
|
|
|
|
# cliProjectVersion: '$(radarrVersion)'
|
|
|
|
# cliSources: './frontend'
|
|
|
|
# - task: SonarCloudAnalyze@1
|
2019-09-02 23:03:41 +02:00
|
|
|
|
2019-10-14 22:21:00 +02:00
|
|
|
# - job: Analyze_Backend
|
|
|
|
# displayName: Backend
|
|
|
|
# condition: eq(variables['system.pullrequest.isfork'], false)
|
|
|
|
# pool:
|
|
|
|
# vmImage: windows-2019
|
|
|
|
# steps:
|
|
|
|
# - checkout: self # Need history for Sonar analysis
|
|
|
|
# submodules: true
|
|
|
|
# - task: UseDotNet@2
|
|
|
|
# displayName: 'Install .net core 3.0'
|
|
|
|
# inputs:
|
|
|
|
# version: $(dotnetVersion)
|
|
|
|
# - task: SonarCloudPrepare@1
|
|
|
|
# inputs:
|
|
|
|
# SonarCloud: 'SonarCloud'
|
|
|
|
# organization: 'radarr'
|
|
|
|
# scannerMode: 'MSBuild'
|
|
|
|
# projectKey: 'radarr_Radarr'
|
|
|
|
# projectName: 'Radarr'
|
|
|
|
# projectVersion: '$(radarrVersion)'
|
|
|
|
# extraProperties: |
|
|
|
|
# sonar.exclusions=**/obj/**,**/*.dll,**/NzbDrone.Core.Test/Files/**/*,./frontend/**,**/ExternalModules/**,./src/Libraries/**
|
|
|
|
# sonar.coverage.exclusions=**/Radarr.Api.V1/**/*,**/MonoTorrent/**/*,**/Marr.Data/**/*
|
|
|
|
# sonar.cs.opencover.reportsPaths=$(Build.SourcesDirectory)/_tests/CoverageResults/coverage.opencover.xml
|
|
|
|
# sonar.cs.nunit.reportsPaths=$(Build.SourcesDirectory)/TestResult.xml
|
|
|
|
# - task: DotNetCoreCLI@2
|
|
|
|
# displayName: Build backend
|
|
|
|
# inputs:
|
|
|
|
# command: 'build'
|
|
|
|
# projects: 'src/Radarr.Windows.sln'
|
|
|
|
# - task: Bash@3
|
|
|
|
# displayName: Coverage Unit Tests
|
|
|
|
# inputs:
|
|
|
|
# targetType: 'filePath'
|
|
|
|
# filePath: ./test.sh
|
|
|
|
# arguments: Windows Unit Coverage
|
|
|
|
# - task: PublishCodeCoverageResults@1
|
|
|
|
# displayName: Publish Coverage Results
|
|
|
|
# inputs:
|
|
|
|
# codeCoverageTool: 'cobertura'
|
|
|
|
# summaryFileLocation: './_tests/CoverageResults/coverage.cobertura.xml'
|
|
|
|
# - task: SonarCloudAnalyze@1
|