2019-09-02 21:03:41 +00: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'
|
2022-01-20 21:40:40 +00:00
|
|
|
yarnCacheFolder: $(Pipeline.Workspace)/.yarn
|
|
|
|
nugetCacheFolder: $(Pipeline.Workspace)/.nuget/packages
|
2023-09-03 04:28:12 +00:00
|
|
|
majorVersion: '5.0.2'
|
2019-09-02 21:03:41 +00:00
|
|
|
minorVersion: $[counter('minorVersion', 2000)]
|
|
|
|
radarrVersion: '$(majorVersion).$(minorVersion)'
|
|
|
|
buildName: '$(Build.SourceBranchName).$(radarrVersion)'
|
2020-04-28 05:26:05 +00:00
|
|
|
sentryOrg: 'servarr'
|
|
|
|
sentryUrl: 'https://sentry.servarr.com'
|
2023-04-14 00:15:09 +00:00
|
|
|
dotnetVersion: '6.0.408'
|
2022-03-05 17:05:02 +00:00
|
|
|
nodeVersion: '16.X'
|
2022-02-16 22:19:42 +00:00
|
|
|
innoVersion: '6.2.0'
|
2022-01-20 21:40:40 +00:00
|
|
|
windowsImage: 'windows-2022'
|
|
|
|
linuxImage: 'ubuntu-20.04'
|
|
|
|
macImage: 'macOS-11'
|
2019-09-02 21:03:41 +00:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- develop
|
2020-09-27 02:03:14 +00:00
|
|
|
- master
|
2023-08-19 12:03:42 +00:00
|
|
|
paths:
|
|
|
|
exclude:
|
|
|
|
- .github
|
|
|
|
- src/Radarr.Api.*/openapi.json
|
2019-09-02 21:03:41 +00:00
|
|
|
|
|
|
|
pr:
|
2021-05-13 20:16:40 +00:00
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- develop
|
|
|
|
paths:
|
|
|
|
exclude:
|
2023-08-19 12:03:42 +00:00
|
|
|
- .github
|
2021-05-13 20:16:40 +00:00
|
|
|
- src/NzbDrone.Core/Localization/Core
|
2021-08-30 03:33:32 +00:00
|
|
|
- src/Radarr.Api.*/openapi.json
|
2019-09-02 21:03:41 +00:00
|
|
|
|
|
|
|
stages:
|
2019-12-24 04:03:04 +00:00
|
|
|
- stage: Setup
|
|
|
|
displayName: Setup
|
|
|
|
jobs:
|
|
|
|
- job:
|
|
|
|
displayName: Build Variables
|
|
|
|
pool:
|
2022-01-20 21:40:40 +00:00
|
|
|
vmImage: ${{ variables.linuxImage }}
|
2019-12-24 04:03:04 +00:00
|
|
|
steps:
|
|
|
|
# Set the build name properly. The 'name' property won't recursively expand so hack here:
|
|
|
|
- bash: echo "##vso[build.updatebuildnumber]$RADARRVERSION"
|
|
|
|
displayName: Set Build Name
|
|
|
|
- bash: |
|
2020-01-05 05:41:33 +00:00
|
|
|
if [[ $BUILD_REASON == "PullRequest" ]]; then
|
2020-09-27 02:03:14 +00:00
|
|
|
git diff origin/develop...HEAD --name-only | grep -E "^(src/|azure-pipelines.yml)"
|
2020-01-03 20:34:28 +00:00
|
|
|
echo $? > not_backend_update
|
2020-01-05 05:41:33 +00:00
|
|
|
else
|
|
|
|
echo 0 > not_backend_update
|
|
|
|
fi
|
2020-01-03 20:34:28 +00:00
|
|
|
cat not_backend_update
|
2019-12-24 04:03:04 +00:00
|
|
|
displayName: Check for Backend File Changes
|
2020-01-03 20:34:28 +00:00
|
|
|
- publish: not_backend_update
|
|
|
|
artifact: not_backend_update
|
2019-12-24 04:03:04 +00:00
|
|
|
displayName: Publish update type
|
2019-09-02 21:03:41 +00:00
|
|
|
- stage: Build_Backend
|
|
|
|
displayName: Build Backend
|
2019-12-24 04:03:04 +00:00
|
|
|
dependsOn: Setup
|
2019-09-02 21:03:41 +00:00
|
|
|
jobs:
|
|
|
|
- job: Backend
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
Linux:
|
|
|
|
osName: 'Linux'
|
2022-01-20 21:40:40 +00:00
|
|
|
imageName: ${{ variables.linuxImage }}
|
2021-03-04 18:16:44 +00:00
|
|
|
enableAnalysis: 'true'
|
2019-09-02 21:03:41 +00:00
|
|
|
Mac:
|
|
|
|
osName: 'Mac'
|
2022-01-20 21:40:40 +00:00
|
|
|
imageName: ${{ variables.macImage }}
|
2021-03-04 18:16:44 +00:00
|
|
|
enableAnalysis: 'false'
|
2019-09-02 21:03:41 +00:00
|
|
|
Windows:
|
|
|
|
osName: 'Windows'
|
2022-01-20 21:40:40 +00:00
|
|
|
imageName: ${{ variables.windowsImage }}
|
2021-03-04 18:16:44 +00:00
|
|
|
enableAnalysis: 'false'
|
2019-09-02 21:03:41 +00:00
|
|
|
|
|
|
|
pool:
|
|
|
|
vmImage: $(imageName)
|
2020-08-21 01:58:38 +00:00
|
|
|
variables:
|
|
|
|
# Disable stylecop here - linting errors get caught by the analyze task
|
2021-03-04 18:16:44 +00:00
|
|
|
EnableAnalyzers: $(enableAnalysis)
|
2019-09-02 21:03:41 +00:00
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
submodules: true
|
|
|
|
fetchDepth: 1
|
2019-10-14 20:21:00 +00:00
|
|
|
- task: UseDotNet@2
|
2019-12-05 21:41:55 +00:00
|
|
|
displayName: 'Install .net core'
|
2019-10-14 20:20:59 +00:00
|
|
|
inputs:
|
|
|
|
version: $(dotnetVersion)
|
2021-02-09 21:09:13 +00:00
|
|
|
- bash: |
|
|
|
|
BUNDLEDVERSIONS=${AGENT_TOOLSDIRECTORY}/dotnet/sdk/${DOTNETVERSION}/Microsoft.NETCoreSdk.BundledVersions.props
|
|
|
|
echo $BUNDLEDVERSIONS
|
|
|
|
if grep -q freebsd-x64 $BUNDLEDVERSIONS; then
|
2022-04-12 20:20:24 +00:00
|
|
|
echo "Extra platforms already enabled"
|
2021-02-09 21:09:13 +00:00
|
|
|
else
|
2022-04-12 20:20:24 +00:00
|
|
|
echo "Enabling extra platform support"
|
|
|
|
sed -i.ORI 's/osx-x64/osx-x64;freebsd-x64;linux-x86/' $BUNDLEDVERSIONS
|
2021-02-09 21:09:13 +00:00
|
|
|
fi
|
2022-04-12 20:20:24 +00:00
|
|
|
displayName: Enable Extra Platform Support
|
|
|
|
- bash: ./build.sh --backend --enable-extra-platforms
|
2019-09-02 21:03:41 +00:00
|
|
|
displayName: Build Radarr Backend
|
2019-10-14 20:20:59 +00: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 "{}" \;
|
|
|
|
displayName: Clean up intermediate output
|
2020-01-19 19:28:04 +00:00
|
|
|
condition: and(succeeded(), ne(variables['osName'], 'Windows'))
|
2019-09-02 21:03:41 +00:00
|
|
|
- publish: $(outputFolder)
|
|
|
|
artifact: '$(osName)Backend'
|
|
|
|
displayName: Publish Backend
|
|
|
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
2021-11-22 21:14:28 +00:00
|
|
|
- publish: '$(testsFolder)/net6.0/win-x64/publish'
|
2022-04-12 20:20:24 +00:00
|
|
|
artifact: win-x64-tests
|
|
|
|
displayName: Publish win-x64 Test Package
|
2019-10-14 20:20:59 +00:00
|
|
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
2021-11-22 21:14:28 +00:00
|
|
|
- publish: '$(testsFolder)/net6.0/linux-x64/publish'
|
2022-04-12 20:20:24 +00:00
|
|
|
artifact: linux-x64-tests
|
|
|
|
displayName: Publish linux-x64 Test Package
|
|
|
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
|
|
|
- publish: '$(testsFolder)/net6.0/linux-x86/publish'
|
|
|
|
artifact: linux-x86-tests
|
|
|
|
displayName: Publish linux-x86 Test Package
|
2019-10-14 21:42:30 +00:00
|
|
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
2021-11-22 21:14:28 +00:00
|
|
|
- publish: '$(testsFolder)/net6.0/linux-musl-x64/publish'
|
2022-04-12 20:20:24 +00:00
|
|
|
artifact: linux-musl-x64-tests
|
|
|
|
displayName: Publish linux-musl-x64 Test Package
|
2020-07-26 20:52:27 +00:00
|
|
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
2021-11-22 21:14:28 +00:00
|
|
|
- publish: '$(testsFolder)/net6.0/freebsd-x64/publish'
|
2022-04-12 20:20:24 +00:00
|
|
|
artifact: freebsd-x64-tests
|
|
|
|
displayName: Publish freebsd-x64 Test Package
|
2021-02-09 21:09:13 +00:00
|
|
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
2021-11-22 21:14:28 +00:00
|
|
|
- publish: '$(testsFolder)/net6.0/osx-x64/publish'
|
2022-04-12 20:20:24 +00:00
|
|
|
artifact: osx-x64-tests
|
|
|
|
displayName: Publish osx-x64 Test Package
|
2019-09-02 21:03:41 +00:00
|
|
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
|
|
|
|
|
|
|
- stage: Build_Frontend
|
2019-10-14 20:21:00 +00:00
|
|
|
displayName: Frontend
|
2019-12-24 04:03:04 +00:00
|
|
|
dependsOn: Setup
|
2019-09-02 21:03:41 +00:00
|
|
|
jobs:
|
2019-10-14 20:21:00 +00:00
|
|
|
- job: Build
|
2019-09-02 21:03:41 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
Linux:
|
|
|
|
osName: 'Linux'
|
2022-01-20 21:40:40 +00:00
|
|
|
imageName: ${{ variables.linuxImage }}
|
2019-09-02 21:03:41 +00:00
|
|
|
Mac:
|
|
|
|
osName: 'Mac'
|
2022-01-20 21:40:40 +00:00
|
|
|
imageName: ${{ variables.macImage }}
|
2019-09-02 21:03:41 +00:00
|
|
|
Windows:
|
|
|
|
osName: 'Windows'
|
2022-01-20 21:40:40 +00:00
|
|
|
imageName: ${{ variables.windowsImage }}
|
2019-09-02 21:03:41 +00:00
|
|
|
pool:
|
|
|
|
vmImage: $(imageName)
|
|
|
|
steps:
|
|
|
|
- task: NodeTool@0
|
|
|
|
displayName: Set Node.js version
|
|
|
|
inputs:
|
2022-03-05 17:05:02 +00:00
|
|
|
versionSpec: $(nodeVersion)
|
2019-09-02 21:03:41 +00:00
|
|
|
- checkout: self
|
|
|
|
submodules: true
|
|
|
|
fetchDepth: 1
|
2020-08-21 02:25:50 +00:00
|
|
|
- task: Cache@2
|
|
|
|
inputs:
|
|
|
|
key: 'yarn | "$(osName)" | yarn.lock'
|
|
|
|
restoreKeys: |
|
|
|
|
yarn | "$(osName)"
|
|
|
|
path: $(yarnCacheFolder)
|
|
|
|
displayName: Cache Yarn packages
|
2019-10-14 20:21:00 +00:00
|
|
|
- bash: ./build.sh --frontend
|
2019-09-02 21:03:41 +00:00
|
|
|
displayName: Build Radarr Frontend
|
|
|
|
env:
|
|
|
|
FORCE_COLOR: 0
|
2020-08-21 02:25:50 +00:00
|
|
|
YARN_CACHE_FOLDER: $(yarnCacheFolder)
|
2019-09-02 21:03:41 +00:00
|
|
|
- publish: $(outputFolder)
|
|
|
|
artifact: '$(osName)Frontend'
|
|
|
|
displayName: Publish Frontend
|
|
|
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
|
|
|
|
2019-10-14 20:21:00 +00:00
|
|
|
- stage: Installer
|
2019-09-02 21:03:41 +00:00
|
|
|
dependsOn:
|
|
|
|
- Build_Backend
|
|
|
|
- Build_Frontend
|
|
|
|
jobs:
|
|
|
|
- job: Windows_Installer
|
|
|
|
displayName: Create Installer
|
|
|
|
pool:
|
2022-01-20 21:40:40 +00:00
|
|
|
vmImage: ${{ variables.windowsImage }}
|
2019-09-02 21:03:41 +00: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
|
|
|
|
- bash: |
|
2022-02-16 22:19:42 +00:00
|
|
|
./build.sh --packages --installer
|
2023-05-14 14:18:49 +00:00
|
|
|
cp distribution/windows/setup/output/Radarr.*win-x64.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/Radarr.${BUILDNAME}.windows-core-x64-installer.exe
|
|
|
|
cp distribution/windows/setup/output/Radarr.*win-x86.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/Radarr.${BUILDNAME}.windows-core-x86-installer.exe
|
2022-02-16 22:19:42 +00:00
|
|
|
displayName: Create Installers
|
2019-09-02 21:03:41 +00:00
|
|
|
- publish: $(Build.ArtifactStagingDirectory)
|
|
|
|
artifact: 'WindowsInstaller'
|
|
|
|
displayName: Publish Installer
|
2019-10-14 20:21:00 +00:00
|
|
|
|
|
|
|
- stage: Packages
|
|
|
|
dependsOn:
|
|
|
|
- Build_Backend
|
|
|
|
- Build_Frontend
|
|
|
|
jobs:
|
2019-09-02 21:03:41 +00:00
|
|
|
- job: Other_Packages
|
|
|
|
displayName: Create Standard Packages
|
|
|
|
pool:
|
2022-01-20 21:40:40 +00:00
|
|
|
vmImage: ${{ variables.linuxImage }}
|
2019-09-02 21:03:41 +00: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
|
2022-04-12 20:20:24 +00:00
|
|
|
- bash: ./build.sh --packages --enable-extra-platforms
|
2019-09-02 21:03:41 +00:00
|
|
|
displayName: Create Packages
|
|
|
|
- bash: |
|
2021-11-09 06:31:05 +00:00
|
|
|
find . -name "ffprobe" -exec chmod a+x {} \;
|
2019-10-14 20:21:00 +00:00
|
|
|
find . -name "Radarr" -exec chmod a+x {} \;
|
|
|
|
find . -name "Radarr.Update" -exec chmod a+x {} \;
|
|
|
|
displayName: Set executable bits
|
2019-09-02 21:03:41 +00:00
|
|
|
- task: ArchiveFiles@2
|
2022-04-12 20:20:24 +00:00
|
|
|
displayName: Create win-x64 zip
|
2019-09-02 21:03:41 +00:00
|
|
|
inputs:
|
2019-10-14 21:42:30 +00:00
|
|
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).windows-core-x64.zip'
|
2019-09-02 21:03:41 +00:00
|
|
|
archiveType: 'zip'
|
|
|
|
includeRootFolder: false
|
2021-11-22 21:14:28 +00:00
|
|
|
rootFolderOrFile: $(artifactsFolder)/win-x64/net6.0
|
2020-11-11 03:56:47 +00:00
|
|
|
- task: ArchiveFiles@2
|
2022-04-12 20:20:24 +00:00
|
|
|
displayName: Create win-x86 zip
|
2020-11-11 03:56:47 +00:00
|
|
|
inputs:
|
|
|
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).windows-core-x86.zip'
|
|
|
|
archiveType: 'zip'
|
|
|
|
includeRootFolder: false
|
2021-11-22 21:14:28 +00:00
|
|
|
rootFolderOrFile: $(artifactsFolder)/win-x86/net6.0
|
2019-09-02 21:03:41 +00:00
|
|
|
- task: ArchiveFiles@2
|
2022-04-12 20:20:24 +00:00
|
|
|
displayName: Create osx-x64 app
|
2019-09-02 21:03:41 +00:00
|
|
|
inputs:
|
2019-10-14 21:42:30 +00:00
|
|
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).osx-app-core-x64.zip'
|
2019-09-02 21:03:41 +00:00
|
|
|
archiveType: 'zip'
|
|
|
|
includeRootFolder: false
|
2021-11-13 14:15:02 +00:00
|
|
|
rootFolderOrFile: $(artifactsFolder)/osx-x64-app/net6.0
|
2019-09-02 21:03:41 +00:00
|
|
|
- task: ArchiveFiles@2
|
2022-04-12 20:20:24 +00:00
|
|
|
displayName: Create osx-x64 tar
|
2019-09-02 21:03:41 +00:00
|
|
|
inputs:
|
2019-10-14 21:42:30 +00:00
|
|
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).osx-core-x64.tar.gz'
|
2019-09-02 21:03:41 +00:00
|
|
|
archiveType: 'tar'
|
|
|
|
tarCompression: 'gz'
|
|
|
|
includeRootFolder: false
|
2021-11-13 14:15:02 +00:00
|
|
|
rootFolderOrFile: $(artifactsFolder)/osx-x64/net6.0
|
|
|
|
- task: ArchiveFiles@2
|
2022-04-12 20:20:24 +00:00
|
|
|
displayName: Create osx-arm64 app
|
2021-11-13 14:15:02 +00:00
|
|
|
inputs:
|
|
|
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).osx-app-core-arm64.zip'
|
|
|
|
archiveType: 'zip'
|
|
|
|
includeRootFolder: false
|
|
|
|
rootFolderOrFile: $(artifactsFolder)/osx-arm64-app/net6.0
|
|
|
|
- task: ArchiveFiles@2
|
2022-04-12 20:20:24 +00:00
|
|
|
displayName: Create osx-arm64 tar
|
2021-11-13 14:15:02 +00:00
|
|
|
inputs:
|
|
|
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).osx-core-arm64.tar.gz'
|
|
|
|
archiveType: 'tar'
|
|
|
|
tarCompression: 'gz'
|
|
|
|
includeRootFolder: false
|
|
|
|
rootFolderOrFile: $(artifactsFolder)/osx-arm64/net6.0
|
2019-10-14 21:42:30 +00:00
|
|
|
- task: ArchiveFiles@2
|
2022-04-12 20:20:24 +00:00
|
|
|
displayName: Create linux-x64 tar
|
2019-10-14 21:42:30 +00:00
|
|
|
inputs:
|
|
|
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).linux-core-x64.tar.gz'
|
|
|
|
archiveType: 'tar'
|
|
|
|
tarCompression: 'gz'
|
|
|
|
includeRootFolder: false
|
2021-11-22 21:14:28 +00:00
|
|
|
rootFolderOrFile: $(artifactsFolder)/linux-x64/net6.0
|
2020-07-26 20:52:27 +00:00
|
|
|
- task: ArchiveFiles@2
|
2022-04-12 20:20:24 +00:00
|
|
|
displayName: Create linux-musl-x64 tar
|
2020-07-26 20:52:27 +00:00
|
|
|
inputs:
|
|
|
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).linux-musl-core-x64.tar.gz'
|
|
|
|
archiveType: 'tar'
|
|
|
|
tarCompression: 'gz'
|
|
|
|
includeRootFolder: false
|
2021-11-22 21:14:28 +00:00
|
|
|
rootFolderOrFile: $(artifactsFolder)/linux-musl-x64/net6.0
|
2019-10-14 21:42:30 +00:00
|
|
|
- task: ArchiveFiles@2
|
2022-04-12 20:20:24 +00:00
|
|
|
displayName: Create linux-x86 tar
|
|
|
|
inputs:
|
|
|
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).linux-core-x86.tar.gz'
|
|
|
|
archiveType: 'tar'
|
|
|
|
tarCompression: 'gz'
|
|
|
|
includeRootFolder: false
|
|
|
|
rootFolderOrFile: $(artifactsFolder)/linux-x86/net6.0
|
|
|
|
- task: ArchiveFiles@2
|
|
|
|
displayName: Create linux-arm tar
|
2019-10-14 21:42:30 +00:00
|
|
|
inputs:
|
|
|
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).linux-core-arm.tar.gz'
|
|
|
|
archiveType: 'tar'
|
|
|
|
tarCompression: 'gz'
|
|
|
|
includeRootFolder: false
|
2021-11-22 21:14:28 +00:00
|
|
|
rootFolderOrFile: $(artifactsFolder)/linux-arm/net6.0
|
2021-11-13 14:15:02 +00:00
|
|
|
- task: ArchiveFiles@2
|
2022-04-12 20:20:24 +00:00
|
|
|
displayName: Create linux-musl-arm tar
|
2021-11-13 14:15:02 +00:00
|
|
|
inputs:
|
|
|
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).linux-musl-core-arm.tar.gz'
|
|
|
|
archiveType: 'tar'
|
|
|
|
tarCompression: 'gz'
|
|
|
|
includeRootFolder: false
|
|
|
|
rootFolderOrFile: $(artifactsFolder)/linux-musl-arm/net6.0
|
2019-10-14 21:42:30 +00:00
|
|
|
- task: ArchiveFiles@2
|
2022-04-12 20:20:24 +00:00
|
|
|
displayName: Create linux-arm64 tar
|
2019-10-14 21:42:30 +00:00
|
|
|
inputs:
|
|
|
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).linux-core-arm64.tar.gz'
|
|
|
|
archiveType: 'tar'
|
|
|
|
tarCompression: 'gz'
|
|
|
|
includeRootFolder: false
|
2021-11-22 21:14:28 +00:00
|
|
|
rootFolderOrFile: $(artifactsFolder)/linux-arm64/net6.0
|
2020-07-26 20:52:27 +00:00
|
|
|
- task: ArchiveFiles@2
|
2022-04-12 20:20:24 +00:00
|
|
|
displayName: Create linux-musl-arm64 tar
|
2020-07-26 20:52:27 +00:00
|
|
|
inputs:
|
|
|
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).linux-musl-core-arm64.tar.gz'
|
|
|
|
archiveType: 'tar'
|
|
|
|
tarCompression: 'gz'
|
|
|
|
includeRootFolder: false
|
2021-11-22 21:14:28 +00:00
|
|
|
rootFolderOrFile: $(artifactsFolder)/linux-musl-arm64/net6.0
|
2021-02-09 21:09:13 +00:00
|
|
|
- task: ArchiveFiles@2
|
2022-04-12 20:20:24 +00:00
|
|
|
displayName: Create freebsd-x64 tar
|
2021-02-09 21:09:13 +00:00
|
|
|
inputs:
|
|
|
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).freebsd-core-x64.tar.gz'
|
|
|
|
archiveType: 'tar'
|
|
|
|
tarCompression: 'gz'
|
|
|
|
includeRootFolder: false
|
2021-11-22 21:14:28 +00:00
|
|
|
rootFolderOrFile: $(artifactsFolder)/freebsd-x64/net6.0
|
2019-09-02 21:03:41 +00:00
|
|
|
- publish: $(Build.ArtifactStagingDirectory)
|
|
|
|
artifact: 'Packages'
|
|
|
|
displayName: Publish Packages
|
|
|
|
- bash: |
|
|
|
|
echo "Uploading source maps to sentry"
|
|
|
|
curl -sL https://sentry.io/get-cli/ | bash
|
2023-07-04 17:12:44 +00:00
|
|
|
RELEASENAME="Radarr@${RADARRVERSION}-${BUILD_SOURCEBRANCHNAME}"
|
2020-04-28 06:13:49 +00:00
|
|
|
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
|
2019-09-02 21:03:41 +00:00
|
|
|
sentry-cli releases set-commits --auto "${RELEASENAME}"
|
2020-09-27 02:03:14 +00:00
|
|
|
if [[ ${BUILD_SOURCEBRANCH} == "refs/heads/develop" ]]; then
|
|
|
|
sentry-cli releases deploys "${RELEASENAME}" new -e nightly
|
|
|
|
else
|
|
|
|
sentry-cli releases deploys "${RELEASENAME}" new -e production
|
|
|
|
fi
|
2020-04-22 18:18:38 +00:00
|
|
|
if [ $? -gt 0 ]; then
|
2020-04-22 18:02:16 +00:00
|
|
|
echo "##vso[task.logissue type=warning]Error uploading source maps."
|
|
|
|
fi
|
|
|
|
exit 0
|
2019-09-02 21:03:41 +00:00
|
|
|
displayName: Publish Sentry Source Maps
|
2020-09-27 02:03:14 +00:00
|
|
|
condition: |
|
|
|
|
or
|
|
|
|
(
|
|
|
|
and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/develop')),
|
|
|
|
and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
|
|
|
|
)
|
2019-09-02 21:03:41 +00:00
|
|
|
env:
|
2020-04-28 05:26:05 +00:00
|
|
|
SENTRY_AUTH_TOKEN: $(sentryAuthTokenServarr)
|
2019-09-02 21:03:41 +00:00
|
|
|
SENTRY_ORG: $(sentryOrg)
|
2020-04-28 05:26:05 +00:00
|
|
|
SENTRY_URL: $(sentryUrl)
|
2019-09-02 21:03:41 +00:00
|
|
|
|
|
|
|
- stage: Unit_Test
|
|
|
|
displayName: Unit Tests
|
|
|
|
dependsOn: Build_Backend
|
2019-12-24 04:03:04 +00:00
|
|
|
|
2019-09-02 21:03:41 +00:00
|
|
|
jobs:
|
2019-12-24 04:03:04 +00:00
|
|
|
- job: Prepare
|
|
|
|
pool:
|
2022-01-20 21:40:40 +00:00
|
|
|
vmImage: ${{ variables.linuxImage }}
|
2019-12-24 04:03:04 +00:00
|
|
|
steps:
|
|
|
|
- checkout: none
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
2020-01-03 20:34:28 +00:00
|
|
|
artifactName: 'not_backend_update'
|
2019-12-24 04:03:04 +00:00
|
|
|
targetPath: '.'
|
2020-01-03 20:34:28 +00:00
|
|
|
- bash: echo "##vso[task.setvariable variable=backendNotUpdated;isOutput=true]$(cat not_backend_update)"
|
2019-12-24 04:03:04 +00:00
|
|
|
name: setVar
|
|
|
|
|
2019-09-02 21:03:41 +00:00
|
|
|
- job: Unit
|
2019-10-14 20:21:00 +00:00
|
|
|
displayName: Unit Native
|
2019-12-24 04:03:04 +00:00
|
|
|
dependsOn: Prepare
|
2020-01-03 20:34:28 +00:00
|
|
|
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
2021-02-09 21:09:13 +00:00
|
|
|
workspace:
|
|
|
|
clean: all
|
2019-12-24 04:03:04 +00:00
|
|
|
|
2019-09-02 21:03:41 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2019-10-14 21:42:30 +00:00
|
|
|
MacCore:
|
2019-09-02 21:03:41 +00:00
|
|
|
osName: 'Mac'
|
2022-04-12 20:20:24 +00:00
|
|
|
testName: 'osx-x64'
|
2021-02-09 21:09:13 +00:00
|
|
|
poolName: 'Azure Pipelines'
|
2022-01-20 21:40:40 +00:00
|
|
|
imageName: ${{ variables.macImage }}
|
2019-10-14 21:42:30 +00:00
|
|
|
WindowsCore:
|
2019-09-02 21:03:41 +00:00
|
|
|
osName: 'Windows'
|
2022-04-12 20:20:24 +00:00
|
|
|
testName: 'win-x64'
|
2021-02-09 21:09:13 +00:00
|
|
|
poolName: 'Azure Pipelines'
|
2022-01-20 21:40:40 +00:00
|
|
|
imageName: ${{ variables.windowsImage }}
|
2019-10-14 21:42:30 +00:00
|
|
|
LinuxCore:
|
|
|
|
osName: 'Linux'
|
2022-04-12 20:20:24 +00:00
|
|
|
testName: 'linux-x64'
|
2021-02-09 21:09:13 +00:00
|
|
|
poolName: 'Azure Pipelines'
|
2022-01-20 21:40:40 +00:00
|
|
|
imageName: ${{ variables.linuxImage }}
|
2021-02-09 21:09:13 +00:00
|
|
|
FreebsdCore:
|
|
|
|
osName: 'Linux'
|
2022-04-12 20:20:24 +00:00
|
|
|
testName: 'freebsd-x64'
|
2021-02-09 21:09:13 +00:00
|
|
|
poolName: 'FreeBSD'
|
|
|
|
imageName:
|
2019-09-02 21:03:41 +00:00
|
|
|
|
|
|
|
pool:
|
2021-02-09 21:09:13 +00:00
|
|
|
name: $(poolName)
|
2019-09-02 21:03:41 +00:00
|
|
|
vmImage: $(imageName)
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout: none
|
2019-10-14 21:42:30 +00:00
|
|
|
- task: UseDotNet@2
|
2019-12-05 21:41:55 +00:00
|
|
|
displayName: 'Install .net core'
|
2019-10-14 21:42:30 +00:00
|
|
|
inputs:
|
|
|
|
version: $(dotnetVersion)
|
2021-02-09 21:09:13 +00:00
|
|
|
condition: ne(variables['poolName'], 'FreeBSD')
|
2019-09-02 21:03:41 +00:00
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
displayName: Download Test Artifact
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
2022-04-12 20:20:24 +00:00
|
|
|
artifactName: '$(testName)-tests'
|
2019-09-02 21:03:41 +00:00
|
|
|
targetPath: $(testsFolder)
|
|
|
|
- powershell: Set-Service SCardSvr -StartupType Manual
|
|
|
|
displayName: Enable Windows Test Service
|
|
|
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
2021-11-09 06:31:05 +00:00
|
|
|
- bash: |
|
|
|
|
chmod a+x _tests/ffprobe
|
|
|
|
displayName: Make ffprobe Executable
|
|
|
|
condition: and(succeeded(), ne(variables['osName'], 'Windows'))
|
2019-10-14 20:20:59 +00:00
|
|
|
- bash: find ${TESTSFOLDER} -name "Radarr.Test.Dummy" -exec chmod a+x {} \;
|
|
|
|
displayName: Make Test Dummy Executable
|
2020-01-19 19:28:04 +00:00
|
|
|
condition: and(succeeded(), ne(variables['osName'], 'Windows'))
|
2020-02-25 22:17:55 +00:00
|
|
|
- bash: |
|
|
|
|
chmod a+x ${TESTSFOLDER}/test.sh
|
|
|
|
${TESTSFOLDER}/test.sh ${OSNAME} Unit Test
|
2019-09-02 21:03:41 +00:00
|
|
|
displayName: Run Tests
|
|
|
|
env:
|
|
|
|
TEST_DIR: $(Build.SourcesDirectory)/_tests
|
|
|
|
- task: PublishTestResults@2
|
|
|
|
displayName: Publish Test Results
|
|
|
|
inputs:
|
|
|
|
testResultsFormat: 'NUnit'
|
|
|
|
testResultsFiles: '**/TestResult.xml'
|
2019-10-14 21:42:30 +00:00
|
|
|
testRunTitle: '$(testName) Unit Tests'
|
2019-10-14 20:21:00 +00:00
|
|
|
failTaskOnFailedTests: true
|
|
|
|
|
|
|
|
- job: Unit_Docker
|
|
|
|
displayName: Unit Docker
|
2019-12-24 04:03:04 +00:00
|
|
|
dependsOn: Prepare
|
2020-01-03 20:34:28 +00:00
|
|
|
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
2019-10-14 20:21:00 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-07-26 20:52:27 +00:00
|
|
|
alpine:
|
|
|
|
testName: 'Musl Net Core'
|
2022-04-12 20:20:24 +00:00
|
|
|
artifactName: linux-musl-x64-tests
|
2021-01-19 21:43:53 +00:00
|
|
|
containerImage: ghcr.io/servarr/testimages:alpine
|
2022-04-12 20:20:24 +00:00
|
|
|
linux-x86:
|
|
|
|
testName: 'linux-x86'
|
|
|
|
artifactName: linux-x86-tests
|
|
|
|
containerImage: ghcr.io/servarr/testimages:linux-x86
|
2019-10-14 20:21:00 +00:00
|
|
|
|
|
|
|
pool:
|
2022-01-20 21:40:40 +00:00
|
|
|
vmImage: ${{ variables.linuxImage }}
|
2019-10-14 20:21:00 +00:00
|
|
|
|
|
|
|
container: $[ variables['containerImage'] ]
|
2019-09-02 21:03:41 +00:00
|
|
|
|
2019-10-14 20:21:00 +00:00
|
|
|
timeoutInMinutes: 10
|
|
|
|
|
|
|
|
steps:
|
2019-10-14 21:42:30 +00:00
|
|
|
- task: UseDotNet@2
|
2022-04-12 20:20:24 +00:00
|
|
|
displayName: 'Install .NET'
|
2019-10-14 21:42:30 +00:00
|
|
|
inputs:
|
|
|
|
version: $(dotnetVersion)
|
2022-04-12 20:20:24 +00:00
|
|
|
condition: and(succeeded(), ne(variables['testName'], 'linux-x86'))
|
|
|
|
- bash: |
|
|
|
|
SDKURL=$(curl -s https://api.github.com/repos/Servarr/dotnet-linux-x86/releases | jq -rc '.[].assets[].browser_download_url' | grep sdk-${DOTNETVERSION}.*gz$)
|
|
|
|
curl -fsSL $SDKURL | tar xzf - -C /opt/dotnet
|
|
|
|
displayName: 'Install .NET'
|
|
|
|
condition: and(succeeded(), eq(variables['testName'], 'linux-x86'))
|
2019-10-14 20:21:00 +00:00
|
|
|
- checkout: none
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
displayName: Download Test Artifact
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
2020-07-26 20:52:27 +00:00
|
|
|
artifactName: $(artifactName)
|
2019-10-14 20:21:00 +00:00
|
|
|
targetPath: $(testsFolder)
|
2021-11-09 06:31:05 +00:00
|
|
|
- bash: |
|
|
|
|
chmod a+x _tests/ffprobe
|
|
|
|
displayName: Make ffprobe Executable
|
2020-07-26 20:52:27 +00:00
|
|
|
- bash: find ${TESTSFOLDER} -name "Radarr.Test.Dummy" -exec chmod a+x {} \;
|
|
|
|
displayName: Make Test Dummy Executable
|
|
|
|
condition: and(succeeded(), ne(variables['osName'], 'Windows'))
|
2020-02-25 22:17:55 +00:00
|
|
|
- bash: |
|
|
|
|
chmod a+x ${TESTSFOLDER}/test.sh
|
2020-07-26 20:52:27 +00:00
|
|
|
ls -lR ${TESTSFOLDER}
|
2020-02-25 22:17:55 +00:00
|
|
|
${TESTSFOLDER}/test.sh Linux Unit Test
|
2019-10-14 20:21:00 +00:00
|
|
|
displayName: Run Tests
|
|
|
|
- task: PublishTestResults@2
|
|
|
|
displayName: Publish Test Results
|
|
|
|
inputs:
|
|
|
|
testResultsFormat: 'NUnit'
|
|
|
|
testResultsFiles: '**/TestResult.xml'
|
|
|
|
testRunTitle: '$(testName) Unit Tests'
|
|
|
|
failTaskOnFailedTests: true
|
2022-03-28 20:46:21 +00:00
|
|
|
|
2023-08-09 20:04:37 +00:00
|
|
|
- job: Unit_LinuxCore_Postgres14
|
|
|
|
displayName: Unit Native LinuxCore with Postgres14 Database
|
2022-03-28 20:46:21 +00:00
|
|
|
dependsOn: Prepare
|
|
|
|
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
|
|
|
variables:
|
|
|
|
pattern: 'Radarr.*.linux-core-x64.tar.gz'
|
2022-04-12 20:20:24 +00:00
|
|
|
artifactName: linux-x64-tests
|
2022-03-28 20:46:21 +00:00
|
|
|
Radarr__Postgres__Host: 'localhost'
|
|
|
|
Radarr__Postgres__Port: '5432'
|
|
|
|
Radarr__Postgres__User: 'radarr'
|
|
|
|
Radarr__Postgres__Password: 'radarr'
|
|
|
|
|
|
|
|
pool:
|
2022-08-13 04:32:58 +00:00
|
|
|
vmImage: ${{ variables.linuxImage }}
|
2022-03-28 20:46:21 +00:00
|
|
|
|
|
|
|
timeoutInMinutes: 10
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- task: UseDotNet@2
|
|
|
|
displayName: 'Install .net core'
|
|
|
|
inputs:
|
|
|
|
version: $(dotnetVersion)
|
|
|
|
- checkout: none
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
displayName: Download Test Artifact
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
|
|
|
artifactName: $(artifactName)
|
|
|
|
targetPath: $(testsFolder)
|
|
|
|
- bash: |
|
|
|
|
chmod a+x _tests/ffprobe
|
|
|
|
displayName: Make ffprobe Executable
|
|
|
|
- bash: find ${TESTSFOLDER} -name "Radarr.Test.Dummy" -exec chmod a+x {} \;
|
|
|
|
displayName: Make Test Dummy Executable
|
|
|
|
condition: and(succeeded(), ne(variables['osName'], 'Windows'))
|
|
|
|
- bash: |
|
|
|
|
docker run -d --name=postgres14 \
|
|
|
|
-e POSTGRES_PASSWORD=radarr \
|
|
|
|
-e POSTGRES_USER=radarr \
|
|
|
|
-p 5432:5432/tcp \
|
2022-07-18 13:57:15 +00:00
|
|
|
-v /usr/share/zoneinfo/America/Chicago:/etc/localtime:ro \
|
2022-03-28 20:46:21 +00:00
|
|
|
postgres:14
|
|
|
|
displayName: Start postgres
|
|
|
|
- bash: |
|
|
|
|
chmod a+x ${TESTSFOLDER}/test.sh
|
|
|
|
ls -lR ${TESTSFOLDER}
|
|
|
|
${TESTSFOLDER}/test.sh Linux Unit Test
|
|
|
|
displayName: Run Tests
|
|
|
|
- task: PublishTestResults@2
|
|
|
|
displayName: Publish Test Results
|
|
|
|
inputs:
|
|
|
|
testResultsFormat: 'NUnit'
|
|
|
|
testResultsFiles: '**/TestResult.xml'
|
2023-08-09 20:04:37 +00:00
|
|
|
testRunTitle: 'LinuxCore Postgres14 Unit Tests'
|
|
|
|
failTaskOnFailedTests: true
|
|
|
|
|
|
|
|
- job: Unit_LinuxCore_Postgres15
|
|
|
|
displayName: Unit Native LinuxCore with Postgres15 Database
|
|
|
|
dependsOn: Prepare
|
|
|
|
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
|
|
|
variables:
|
|
|
|
pattern: 'Radarr.*.linux-core-x64.tar.gz'
|
|
|
|
artifactName: linux-x64-tests
|
|
|
|
Radarr__Postgres__Host: 'localhost'
|
|
|
|
Radarr__Postgres__Port: '5432'
|
|
|
|
Radarr__Postgres__User: 'radarr'
|
|
|
|
Radarr__Postgres__Password: 'radarr'
|
|
|
|
|
|
|
|
pool:
|
|
|
|
vmImage: ${{ variables.linuxImage }}
|
|
|
|
|
|
|
|
timeoutInMinutes: 10
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- task: UseDotNet@2
|
|
|
|
displayName: 'Install .net core'
|
|
|
|
inputs:
|
|
|
|
version: $(dotnetVersion)
|
|
|
|
- checkout: none
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
displayName: Download Test Artifact
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
|
|
|
artifactName: $(artifactName)
|
|
|
|
targetPath: $(testsFolder)
|
|
|
|
- bash: |
|
|
|
|
chmod a+x _tests/ffprobe
|
|
|
|
displayName: Make ffprobe Executable
|
|
|
|
- bash: find ${TESTSFOLDER} -name "Radarr.Test.Dummy" -exec chmod a+x {} \;
|
|
|
|
displayName: Make Test Dummy Executable
|
|
|
|
condition: and(succeeded(), ne(variables['osName'], 'Windows'))
|
|
|
|
- bash: |
|
|
|
|
docker run -d --name=postgres15 \
|
|
|
|
-e POSTGRES_PASSWORD=radarr \
|
|
|
|
-e POSTGRES_USER=radarr \
|
|
|
|
-p 5432:5432/tcp \
|
|
|
|
-v /usr/share/zoneinfo/America/Chicago:/etc/localtime:ro \
|
|
|
|
postgres:15
|
|
|
|
displayName: Start postgres
|
|
|
|
- bash: |
|
|
|
|
chmod a+x ${TESTSFOLDER}/test.sh
|
|
|
|
ls -lR ${TESTSFOLDER}
|
|
|
|
${TESTSFOLDER}/test.sh Linux Unit Test
|
|
|
|
displayName: Run Tests
|
|
|
|
- task: PublishTestResults@2
|
|
|
|
displayName: Publish Test Results
|
|
|
|
inputs:
|
|
|
|
testResultsFormat: 'NUnit'
|
|
|
|
testResultsFiles: '**/TestResult.xml'
|
|
|
|
testRunTitle: 'LinuxCore Postgres15 Unit Tests'
|
2022-03-28 20:46:21 +00:00
|
|
|
failTaskOnFailedTests: true
|
2019-10-14 20:21:00 +00:00
|
|
|
|
|
|
|
- stage: Integration
|
|
|
|
displayName: Integration
|
|
|
|
dependsOn: Packages
|
2019-12-24 04:03:04 +00:00
|
|
|
|
2019-09-02 21:03:41 +00:00
|
|
|
jobs:
|
2019-12-24 04:03:04 +00:00
|
|
|
- job: Prepare
|
|
|
|
pool:
|
2022-01-20 21:40:40 +00:00
|
|
|
vmImage: ${{ variables.linuxImage }}
|
2019-12-24 04:03:04 +00:00
|
|
|
steps:
|
|
|
|
- checkout: none
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
2020-01-03 20:34:28 +00:00
|
|
|
artifactName: 'not_backend_update'
|
2019-12-24 04:03:04 +00:00
|
|
|
targetPath: '.'
|
2020-01-03 20:34:28 +00:00
|
|
|
- bash: echo "##vso[task.setvariable variable=backendNotUpdated;isOutput=true]$(cat not_backend_update)"
|
2019-12-24 04:03:04 +00:00
|
|
|
name: setVar
|
|
|
|
|
2019-10-14 20:21:00 +00:00
|
|
|
- job: Integration_Native
|
|
|
|
displayName: Integration Native
|
2019-12-24 04:03:04 +00:00
|
|
|
dependsOn: Prepare
|
2020-01-03 20:34:28 +00:00
|
|
|
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
2019-09-02 21:03:41 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2019-10-14 21:42:30 +00:00
|
|
|
MacCore:
|
2019-09-02 21:03:41 +00:00
|
|
|
osName: 'Mac'
|
2022-04-12 20:20:24 +00:00
|
|
|
testName: 'osx-x64'
|
2022-01-20 21:40:40 +00:00
|
|
|
imageName: ${{ variables.macImage }}
|
2021-02-09 21:09:13 +00:00
|
|
|
pattern: 'Radarr.*.osx-core-x64.tar.gz'
|
2019-10-14 21:42:30 +00:00
|
|
|
WindowsCore:
|
2019-09-02 21:03:41 +00:00
|
|
|
osName: 'Windows'
|
2022-04-12 20:20:24 +00:00
|
|
|
testName: 'win-x64'
|
2022-01-20 21:40:40 +00:00
|
|
|
imageName: ${{ variables.windowsImage }}
|
2021-02-09 21:09:13 +00:00
|
|
|
pattern: 'Radarr.*.windows-core-x64.zip'
|
2019-10-14 21:42:30 +00:00
|
|
|
LinuxCore:
|
|
|
|
osName: 'Linux'
|
2022-04-12 20:20:24 +00:00
|
|
|
testName: 'linux-x64'
|
2022-01-20 21:40:40 +00:00
|
|
|
imageName: ${{ variables.linuxImage }}
|
2021-02-09 21:09:13 +00:00
|
|
|
pattern: 'Radarr.*.linux-core-x64.tar.gz'
|
2019-09-02 21:03:41 +00:00
|
|
|
|
|
|
|
pool:
|
|
|
|
vmImage: $(imageName)
|
|
|
|
|
|
|
|
steps:
|
2019-10-14 21:42:30 +00:00
|
|
|
- task: UseDotNet@2
|
2019-12-05 21:41:55 +00:00
|
|
|
displayName: 'Install .net core'
|
2019-10-14 21:42:30 +00:00
|
|
|
inputs:
|
|
|
|
version: $(dotnetVersion)
|
2019-09-02 21:03:41 +00:00
|
|
|
- checkout: none
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
displayName: Download Test Artifact
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
2022-04-12 20:20:24 +00:00
|
|
|
artifactName: '$(testName)-tests'
|
2019-09-02 21:03:41 +00: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
|
2020-02-25 22:17:55 +00:00
|
|
|
- bash: |
|
|
|
|
chmod a+x ${TESTSFOLDER}/test.sh
|
|
|
|
${TESTSFOLDER}/test.sh ${OSNAME} Integration Test
|
2019-09-02 21:03:41 +00:00
|
|
|
displayName: Run Integration Tests
|
|
|
|
- task: PublishTestResults@2
|
|
|
|
inputs:
|
|
|
|
testResultsFormat: 'NUnit'
|
|
|
|
testResultsFiles: '**/TestResult.xml'
|
2019-10-14 21:42:30 +00:00
|
|
|
testRunTitle: '$(testName) Integration Tests'
|
2019-09-02 21:03:41 +00:00
|
|
|
failTaskOnFailedTests: true
|
|
|
|
displayName: Publish Test Results
|
|
|
|
|
2023-08-09 20:04:37 +00:00
|
|
|
- job: Integration_LinuxCore_Postgres14
|
|
|
|
displayName: Integration Native LinuxCore with Postgres14 Database
|
2022-03-28 20:46:21 +00:00
|
|
|
dependsOn: Prepare
|
|
|
|
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
|
|
|
variables:
|
|
|
|
pattern: 'Radarr.*.linux-core-x64.tar.gz'
|
|
|
|
Radarr__Postgres__Host: 'localhost'
|
|
|
|
Radarr__Postgres__Port: '5432'
|
|
|
|
Radarr__Postgres__User: 'radarr'
|
|
|
|
Radarr__Postgres__Password: 'radarr'
|
|
|
|
|
|
|
|
pool:
|
2022-08-13 04:32:58 +00:00
|
|
|
vmImage: ${{ variables.linuxImage }}
|
2022-03-28 20:46:21 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- task: UseDotNet@2
|
|
|
|
displayName: 'Install .net core'
|
|
|
|
inputs:
|
|
|
|
version: $(dotnetVersion)
|
|
|
|
- checkout: none
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
displayName: Download Test Artifact
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
2022-04-12 20:20:24 +00:00
|
|
|
artifactName: 'linux-x64-tests'
|
2022-03-28 20:46:21 +00: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: |
|
|
|
|
docker run -d --name=postgres14 \
|
|
|
|
-e POSTGRES_PASSWORD=radarr \
|
|
|
|
-e POSTGRES_USER=radarr \
|
|
|
|
-p 5432:5432/tcp \
|
2022-07-18 13:57:15 +00:00
|
|
|
-v /usr/share/zoneinfo/America/Chicago:/etc/localtime:ro \
|
2022-03-28 20:46:21 +00:00
|
|
|
postgres:14
|
|
|
|
displayName: Start postgres
|
|
|
|
- bash: |
|
|
|
|
chmod a+x ${TESTSFOLDER}/test.sh
|
|
|
|
${TESTSFOLDER}/test.sh Linux Integration Test
|
|
|
|
displayName: Run Integration Tests
|
|
|
|
- task: PublishTestResults@2
|
|
|
|
inputs:
|
|
|
|
testResultsFormat: 'NUnit'
|
|
|
|
testResultsFiles: '**/TestResult.xml'
|
2023-08-09 20:04:37 +00:00
|
|
|
testRunTitle: 'Integration LinuxCore Postgres14 Database Integration Tests'
|
|
|
|
failTaskOnFailedTests: true
|
|
|
|
displayName: Publish Test Results
|
|
|
|
|
|
|
|
|
|
|
|
- job: Integration_LinuxCore_Postgres15
|
|
|
|
displayName: Integration Native LinuxCore with Postgres Database
|
|
|
|
dependsOn: Prepare
|
|
|
|
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
|
|
|
variables:
|
|
|
|
pattern: 'Radarr.*.linux-core-x64.tar.gz'
|
|
|
|
Radarr__Postgres__Host: 'localhost'
|
|
|
|
Radarr__Postgres__Port: '5432'
|
|
|
|
Radarr__Postgres__User: 'radarr'
|
|
|
|
Radarr__Postgres__Password: 'radarr'
|
|
|
|
|
|
|
|
pool:
|
|
|
|
vmImage: ${{ variables.linuxImage }}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- task: UseDotNet@2
|
|
|
|
displayName: 'Install .net core'
|
|
|
|
inputs:
|
|
|
|
version: $(dotnetVersion)
|
|
|
|
- checkout: none
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
displayName: Download Test Artifact
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
|
|
|
artifactName: 'linux-x64-tests'
|
|
|
|
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: |
|
|
|
|
docker run -d --name=postgres15 \
|
|
|
|
-e POSTGRES_PASSWORD=radarr \
|
|
|
|
-e POSTGRES_USER=radarr \
|
|
|
|
-p 5432:5432/tcp \
|
|
|
|
-v /usr/share/zoneinfo/America/Chicago:/etc/localtime:ro \
|
|
|
|
postgres:15
|
|
|
|
displayName: Start postgres
|
|
|
|
- bash: |
|
|
|
|
chmod a+x ${TESTSFOLDER}/test.sh
|
|
|
|
${TESTSFOLDER}/test.sh Linux Integration Test
|
|
|
|
displayName: Run Integration Tests
|
|
|
|
- task: PublishTestResults@2
|
|
|
|
inputs:
|
|
|
|
testResultsFormat: 'NUnit'
|
|
|
|
testResultsFiles: '**/TestResult.xml'
|
|
|
|
testRunTitle: 'Integration LinuxCore Postgres15 Database Integration Tests'
|
2022-03-28 20:46:21 +00:00
|
|
|
failTaskOnFailedTests: true
|
|
|
|
displayName: Publish Test Results
|
|
|
|
|
2021-02-09 21:09:13 +00:00
|
|
|
- job: Integration_FreeBSD
|
|
|
|
displayName: Integration Native FreeBSD
|
|
|
|
dependsOn: Prepare
|
|
|
|
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
|
|
|
workspace:
|
|
|
|
clean: all
|
|
|
|
variables:
|
|
|
|
pattern: 'Radarr.*.freebsd-core-x64.tar.gz'
|
|
|
|
pool:
|
|
|
|
name: 'FreeBSD'
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout: none
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
displayName: Download Test Artifact
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
2022-04-12 20:20:24 +00:00
|
|
|
artifactName: 'freebsd-x64-tests'
|
2021-02-09 21:09:13 +00:00
|
|
|
targetPath: $(testsFolder)
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
displayName: Download Build Artifact
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
|
|
|
artifactName: Packages
|
2022-11-02 21:20:58 +00:00
|
|
|
itemPattern: '**/$(pattern)'
|
2021-02-09 21:09:13 +00:00
|
|
|
targetPath: $(Build.ArtifactStagingDirectory)
|
|
|
|
- bash: |
|
|
|
|
mkdir -p ${BUILD_ARTIFACTSTAGINGDIRECTORY}/bin
|
|
|
|
tar xf ${BUILD_ARTIFACTSTAGINGDIRECTORY}/$(pattern) -C ${BUILD_ARTIFACTSTAGINGDIRECTORY}/bin
|
|
|
|
displayName: Extract Package
|
|
|
|
- bash: |
|
|
|
|
mkdir -p ./bin/
|
|
|
|
cp -r -v ${BUILD_ARTIFACTSTAGINGDIRECTORY}/bin/Radarr/. ./bin/
|
|
|
|
displayName: Move Package Contents
|
|
|
|
- bash: |
|
|
|
|
chmod a+x ${TESTSFOLDER}/test.sh
|
|
|
|
${TESTSFOLDER}/test.sh Linux Integration Test
|
|
|
|
displayName: Run Integration Tests
|
|
|
|
- task: PublishTestResults@2
|
|
|
|
inputs:
|
|
|
|
testResultsFormat: 'NUnit'
|
|
|
|
testResultsFiles: '**/TestResult.xml'
|
|
|
|
testRunTitle: 'FreeBSD Integration Tests'
|
2021-04-27 20:56:11 +00:00
|
|
|
failTaskOnFailedTests: true
|
2021-02-09 21:09:13 +00:00
|
|
|
displayName: Publish Test Results
|
|
|
|
|
2019-10-14 20:21:00 +00:00
|
|
|
- job: Integration_Docker
|
|
|
|
displayName: Integration Docker
|
2019-12-24 04:03:04 +00:00
|
|
|
dependsOn: Prepare
|
2020-01-03 20:34:28 +00:00
|
|
|
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
2019-10-14 20:21:00 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-07-26 20:52:27 +00:00
|
|
|
alpine:
|
2022-04-12 20:20:24 +00:00
|
|
|
testName: 'linux-musl-x64'
|
|
|
|
artifactName: linux-musl-x64-tests
|
2021-01-19 21:43:53 +00:00
|
|
|
containerImage: ghcr.io/servarr/testimages:alpine
|
2021-02-09 21:09:13 +00:00
|
|
|
pattern: 'Radarr.*.linux-musl-core-x64.tar.gz'
|
2022-04-12 20:20:24 +00:00
|
|
|
linux-x86:
|
|
|
|
testName: 'linux-x86'
|
|
|
|
artifactName: linux-x86-tests
|
|
|
|
containerImage: ghcr.io/servarr/testimages:linux-x86
|
|
|
|
pattern: 'Radarr.*.linux-core-x86.tar.gz'
|
2019-10-14 20:21:00 +00:00
|
|
|
pool:
|
2022-01-20 21:40:40 +00:00
|
|
|
vmImage: ${{ variables.linuxImage }}
|
2019-10-14 20:21:00 +00:00
|
|
|
|
|
|
|
container: $[ variables['containerImage'] ]
|
2019-10-14 20:21:00 +00:00
|
|
|
|
|
|
|
timeoutInMinutes: 15
|
2019-10-14 20:21:00 +00:00
|
|
|
|
|
|
|
steps:
|
2019-10-14 21:42:30 +00:00
|
|
|
- task: UseDotNet@2
|
2022-04-12 20:20:24 +00:00
|
|
|
displayName: 'Install .NET'
|
2019-10-14 21:42:30 +00:00
|
|
|
inputs:
|
|
|
|
version: $(dotnetVersion)
|
2022-04-12 20:20:24 +00:00
|
|
|
condition: and(succeeded(), ne(variables['testName'], 'linux-x86'))
|
|
|
|
- bash: |
|
|
|
|
SDKURL=$(curl -s https://api.github.com/repos/Servarr/dotnet-linux-x86/releases | jq -rc '.[].assets[].browser_download_url' | grep sdk-${DOTNETVERSION}.*gz$)
|
|
|
|
curl -fsSL $SDKURL | tar xzf - -C /opt/dotnet
|
|
|
|
displayName: 'Install .NET'
|
|
|
|
condition: and(succeeded(), eq(variables['testName'], 'linux-x86'))
|
2019-10-14 20:21:00 +00:00
|
|
|
- checkout: none
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
displayName: Download Test Artifact
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
2020-07-26 20:52:27 +00:00
|
|
|
artifactName: $(artifactName)
|
2019-10-14 20:21:00 +00: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
|
2020-02-25 22:17:55 +00:00
|
|
|
- bash: |
|
|
|
|
chmod a+x ${TESTSFOLDER}/test.sh
|
|
|
|
${TESTSFOLDER}/test.sh Linux Integration Test
|
2019-10-14 20:21:00 +00:00
|
|
|
displayName: Run Integration Tests
|
|
|
|
- task: PublishTestResults@2
|
|
|
|
inputs:
|
|
|
|
testResultsFormat: 'NUnit'
|
|
|
|
testResultsFiles: '**/TestResult.xml'
|
|
|
|
testRunTitle: '$(testName) Integration Tests'
|
|
|
|
failTaskOnFailedTests: true
|
|
|
|
displayName: Publish Test Results
|
|
|
|
|
2019-10-14 20:21:00 +00:00
|
|
|
- stage: Automation
|
|
|
|
displayName: Automation
|
|
|
|
dependsOn: Packages
|
|
|
|
|
|
|
|
jobs:
|
2019-09-02 21:03:41 +00:00
|
|
|
- job: Automation
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
Linux:
|
|
|
|
osName: 'Linux'
|
2022-04-12 20:20:24 +00:00
|
|
|
artifactName: 'linux-x64'
|
2022-01-20 21:40:40 +00:00
|
|
|
imageName: ${{ variables.linuxImage }}
|
2021-02-09 21:09:13 +00:00
|
|
|
pattern: 'Radarr.*.linux-core-x64.tar.gz'
|
2019-09-02 21:03:41 +00:00
|
|
|
failBuild: true
|
|
|
|
Mac:
|
|
|
|
osName: 'Mac'
|
2022-04-12 20:20:24 +00:00
|
|
|
artifactName: 'osx-x64'
|
2022-01-20 21:40:40 +00:00
|
|
|
imageName: ${{ variables.macImage }}
|
2021-02-09 21:09:13 +00:00
|
|
|
pattern: 'Radarr.*.osx-core-x64.tar.gz'
|
2020-08-18 03:33:22 +00:00
|
|
|
failBuild: true
|
2019-09-02 21:03:41 +00:00
|
|
|
Windows:
|
|
|
|
osName: 'Windows'
|
2022-04-12 20:20:24 +00:00
|
|
|
artifactName: 'win-x64'
|
2022-01-20 21:40:40 +00:00
|
|
|
imageName: ${{ variables.windowsImage }}
|
2021-02-09 21:09:13 +00:00
|
|
|
pattern: 'Radarr.*.windows-core-x64.zip'
|
2020-08-18 03:33:22 +00:00
|
|
|
failBuild: true
|
2019-09-02 21:03:41 +00:00
|
|
|
|
|
|
|
pool:
|
|
|
|
vmImage: $(imageName)
|
|
|
|
|
|
|
|
steps:
|
2019-10-14 21:42:30 +00:00
|
|
|
- task: UseDotNet@2
|
2019-12-05 21:41:55 +00:00
|
|
|
displayName: 'Install .net core'
|
2019-10-14 21:42:30 +00:00
|
|
|
inputs:
|
|
|
|
version: $(dotnetVersion)
|
2019-09-02 21:03:41 +00:00
|
|
|
- checkout: none
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
displayName: Download Test Artifact
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
2022-04-12 20:20:24 +00:00
|
|
|
artifactName: '$(artifactName)-tests'
|
2019-09-02 21:03:41 +00: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
|
2020-02-25 22:17:55 +00:00
|
|
|
- bash: |
|
|
|
|
chmod a+x ${TESTSFOLDER}/test.sh
|
|
|
|
${TESTSFOLDER}/test.sh ${OSNAME} Automation Test
|
2020-08-17 20:11:02 +00:00
|
|
|
displayName: Run Automation Tests
|
2020-10-08 04:07:52 +00:00
|
|
|
- task: CopyFiles@2
|
|
|
|
displayName: 'Copy Screenshot to: $(Build.ArtifactStagingDirectory)'
|
|
|
|
inputs:
|
|
|
|
SourceFolder: '$(Build.SourcesDirectory)'
|
|
|
|
Contents: |
|
|
|
|
**/*_test_screenshot.png
|
|
|
|
TargetFolder: '$(Build.ArtifactStagingDirectory)/screenshots'
|
|
|
|
- publish: $(Build.ArtifactStagingDirectory)/screenshots
|
|
|
|
artifact: '$(osName)AutomationScreenshots'
|
|
|
|
displayName: Publish Screenshot Bundle
|
2020-10-16 01:14:27 +00:00
|
|
|
condition: and(succeeded(), eq(variables['System.JobAttempt'], '1'))
|
2019-09-02 21:03:41 +00:00
|
|
|
- task: PublishTestResults@2
|
|
|
|
inputs:
|
|
|
|
testResultsFormat: 'NUnit'
|
|
|
|
testResultsFiles: '**/TestResult.xml'
|
|
|
|
testRunTitle: '$(osName) Automation Tests'
|
|
|
|
failTaskOnFailedTests: $(failBuild)
|
|
|
|
displayName: Publish Test Results
|
|
|
|
|
2019-10-14 20:21:00 +00:00
|
|
|
- stage: Analyze
|
2019-12-24 04:03:04 +00:00
|
|
|
dependsOn:
|
|
|
|
- Setup
|
2019-10-14 20:21:00 +00:00
|
|
|
displayName: Analyze
|
|
|
|
|
|
|
|
jobs:
|
2019-12-24 04:03:04 +00:00
|
|
|
- job: Prepare
|
|
|
|
pool:
|
2022-01-20 21:40:40 +00:00
|
|
|
vmImage: ${{ variables.linuxImage }}
|
2019-12-24 04:03:04 +00:00
|
|
|
steps:
|
|
|
|
- checkout: none
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
2020-01-03 20:34:28 +00:00
|
|
|
artifactName: 'not_backend_update'
|
2019-12-24 04:03:04 +00:00
|
|
|
targetPath: '.'
|
2020-01-03 20:34:28 +00:00
|
|
|
- bash: echo "##vso[task.setvariable variable=backendNotUpdated;isOutput=true]$(cat not_backend_update)"
|
2019-12-24 04:03:04 +00:00
|
|
|
name: setVar
|
|
|
|
|
2019-10-14 20:21:00 +00:00
|
|
|
- job: Lint_Frontend
|
|
|
|
displayName: Lint Frontend
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
Linux:
|
|
|
|
osName: 'Linux'
|
2022-01-20 21:40:40 +00:00
|
|
|
imageName: ${{ variables.linuxImage }}
|
2019-10-14 20:21:00 +00:00
|
|
|
Windows:
|
|
|
|
osName: 'Windows'
|
2022-01-20 21:40:40 +00:00
|
|
|
imageName: ${{ variables.windowsImage }}
|
2019-10-14 20:21:00 +00:00
|
|
|
pool:
|
|
|
|
vmImage: $(imageName)
|
|
|
|
steps:
|
|
|
|
- task: NodeTool@0
|
|
|
|
displayName: Set Node.js version
|
|
|
|
inputs:
|
2022-03-05 17:05:02 +00:00
|
|
|
versionSpec: $(nodeVersion)
|
2019-10-14 20:21:00 +00:00
|
|
|
- checkout: self
|
|
|
|
submodules: true
|
|
|
|
fetchDepth: 1
|
2020-08-21 02:25:50 +00:00
|
|
|
- task: Cache@2
|
|
|
|
inputs:
|
|
|
|
key: 'yarn | "$(osName)" | yarn.lock'
|
|
|
|
restoreKeys: |
|
|
|
|
yarn | "$(osName)"
|
|
|
|
path: $(yarnCacheFolder)
|
|
|
|
displayName: Cache Yarn packages
|
2019-10-14 20:21:00 +00:00
|
|
|
- bash: ./build.sh --lint
|
|
|
|
displayName: Lint Radarr Frontend
|
|
|
|
env:
|
|
|
|
FORCE_COLOR: 0
|
2020-08-21 02:25:50 +00:00
|
|
|
YARN_CACHE_FOLDER: $(yarnCacheFolder)
|
2019-10-14 20:21:00 +00:00
|
|
|
|
2019-12-07 07:37:11 +00:00
|
|
|
- job: Analyze_Frontend
|
|
|
|
displayName: Frontend
|
2019-12-10 02:48:14 +00:00
|
|
|
condition: eq(variables['System.PullRequest.IsFork'], 'False')
|
2019-12-07 07:37:11 +00:00
|
|
|
pool:
|
2022-01-20 21:40:40 +00:00
|
|
|
vmImage: ${{ variables.windowsImage }}
|
2019-12-07 07:37:11 +00:00
|
|
|
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'
|
2019-12-10 02:48:14 +00:00
|
|
|
cliProjectName: 'RadarrUI'
|
2019-12-07 07:37:11 +00:00
|
|
|
cliProjectVersion: '$(radarrVersion)'
|
|
|
|
cliSources: './frontend'
|
|
|
|
- task: SonarCloudAnalyze@1
|
2021-08-30 03:33:32 +00:00
|
|
|
|
|
|
|
- job: Api_Docs
|
|
|
|
displayName: API Docs
|
|
|
|
dependsOn: Prepare
|
|
|
|
condition: |
|
|
|
|
and
|
|
|
|
(
|
|
|
|
and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/develop')),
|
|
|
|
and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
|
|
|
)
|
|
|
|
|
|
|
|
pool:
|
2022-01-20 21:40:40 +00:00
|
|
|
vmImage: ${{ variables.windowsImage }}
|
2021-08-30 03:33:32 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- task: UseDotNet@2
|
|
|
|
displayName: 'Install .net core'
|
|
|
|
inputs:
|
|
|
|
version: $(dotnetVersion)
|
|
|
|
- checkout: self
|
|
|
|
submodules: true
|
|
|
|
persistCredentials: true
|
|
|
|
fetchDepth: 1
|
|
|
|
- bash: ./docs.sh Windows
|
|
|
|
displayName: Create openapi.json
|
|
|
|
- bash: |
|
|
|
|
git config --global user.email "development@lidarr.audio"
|
|
|
|
git config --global user.name "Servarr"
|
|
|
|
git checkout -b api-docs
|
|
|
|
git add .
|
2022-03-15 03:25:17 +00:00
|
|
|
git status
|
|
|
|
if git status | grep modified
|
2021-08-30 03:33:32 +00:00
|
|
|
then
|
|
|
|
git commit -am 'Automated API Docs update'
|
|
|
|
git push -f --set-upstream origin api-docs
|
|
|
|
curl -X POST -H "Authorization: token ${GITHUBTOKEN}" -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/radarr/radarr/pulls -d '{"head":"api-docs","base":"develop","title":"Update API docs"}'
|
|
|
|
else
|
|
|
|
echo "No changes since last run"
|
|
|
|
fi
|
|
|
|
displayName: Commit API Doc Change
|
|
|
|
continueOnError: true
|
|
|
|
env:
|
|
|
|
GITHUBTOKEN: $(githubToken)
|
|
|
|
- task: CopyFiles@2
|
|
|
|
displayName: 'Copy openapi.json to: $(Build.ArtifactStagingDirectory)'
|
|
|
|
inputs:
|
|
|
|
SourceFolder: '$(Build.SourcesDirectory)'
|
|
|
|
Contents: |
|
|
|
|
**/*openapi.json
|
|
|
|
TargetFolder: '$(Build.ArtifactStagingDirectory)/api_docs'
|
|
|
|
- publish: $(Build.ArtifactStagingDirectory)/api_docs
|
|
|
|
artifact: 'APIDocs'
|
|
|
|
displayName: Publish API Docs Bundle
|
|
|
|
condition: and(succeeded(), eq(variables['System.JobAttempt'], '1'))
|
2019-09-02 21:03:41 +00:00
|
|
|
|
2019-12-07 07:37:11 +00:00
|
|
|
- job: Analyze_Backend
|
|
|
|
displayName: Backend
|
2019-12-24 04:03:04 +00:00
|
|
|
dependsOn: Prepare
|
2020-01-03 20:34:28 +00:00
|
|
|
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
2019-12-24 04:03:04 +00:00
|
|
|
|
2019-12-07 07:37:11 +00:00
|
|
|
variables:
|
|
|
|
disable.coverage.autogenerate: 'true'
|
2021-03-04 18:29:15 +00:00
|
|
|
EnableAnalyzers: 'false'
|
2019-12-24 04:03:04 +00:00
|
|
|
|
|
|
|
pool:
|
2022-01-20 21:40:40 +00:00
|
|
|
vmImage: ${{ variables.windowsImage }}
|
2019-12-24 04:03:04 +00:00
|
|
|
|
2019-12-07 07:37:11 +00:00
|
|
|
steps:
|
|
|
|
- task: UseDotNet@2
|
|
|
|
displayName: 'Install .net core'
|
|
|
|
inputs:
|
|
|
|
version: $(dotnetVersion)
|
|
|
|
- checkout: self # Need history for Sonar analysis
|
|
|
|
submodules: true
|
|
|
|
- powershell: Set-Service SCardSvr -StartupType Manual
|
|
|
|
displayName: Enable Windows Test Service
|
|
|
|
- task: SonarCloudPrepare@1
|
2019-12-10 02:48:14 +00:00
|
|
|
condition: eq(variables['System.PullRequest.IsFork'], 'False')
|
2019-12-07 07:37:11 +00:00
|
|
|
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/**
|
2021-05-23 16:44:19 +00:00
|
|
|
sonar.coverage.exclusions=**/Radarr.Api.V3/**/*
|
2019-12-07 07:37:11 +00:00
|
|
|
sonar.cs.opencover.reportsPaths=$(Build.SourcesDirectory)/CoverageResults/**/coverage.opencover.xml
|
|
|
|
sonar.cs.nunit.reportsPaths=$(Build.SourcesDirectory)/TestResult.xml
|
|
|
|
- bash: |
|
2021-11-22 21:14:28 +00:00
|
|
|
./build.sh --backend -f net6.0 -r win-x64
|
|
|
|
TEST_DIR=_tests/net6.0/win-x64/publish/ ./test.sh Windows Unit Coverage
|
2019-12-07 07:37:11 +00:00
|
|
|
displayName: Coverage Unit Tests
|
|
|
|
- task: SonarCloudAnalyze@1
|
2019-12-10 02:48:14 +00:00
|
|
|
condition: eq(variables['System.PullRequest.IsFork'], 'False')
|
2019-12-07 07:37:11 +00:00
|
|
|
displayName: Publish SonarCloud Results
|
|
|
|
- task: reportgenerator@4
|
|
|
|
displayName: Generate Coverage Report
|
|
|
|
inputs:
|
|
|
|
reports: '$(Build.SourcesDirectory)/CoverageResults/**/coverage.opencover.xml'
|
|
|
|
targetdir: '$(Build.SourcesDirectory)/CoverageResults/combined'
|
|
|
|
reporttypes: 'HtmlInline_AzurePipelines;Cobertura;Badges'
|
|
|
|
- task: PublishCodeCoverageResults@1
|
|
|
|
displayName: Publish Coverage Report
|
|
|
|
inputs:
|
|
|
|
codeCoverageTool: 'cobertura'
|
|
|
|
summaryFileLocation: './CoverageResults/combined/Cobertura.xml'
|
2019-12-22 21:42:56 +00:00
|
|
|
reportDirectory: './CoverageResults/combined/'
|
2020-04-22 21:04:43 +00:00
|
|
|
|
|
|
|
- stage: Report_Out
|
|
|
|
dependsOn:
|
|
|
|
- Analyze
|
|
|
|
- Unit_Test
|
|
|
|
- Integration
|
|
|
|
- Automation
|
2020-05-14 06:17:11 +00:00
|
|
|
condition: eq(variables['system.pullrequest.isfork'], false)
|
2020-04-22 21:04:43 +00:00
|
|
|
displayName: Build Status Report
|
|
|
|
jobs:
|
|
|
|
- job:
|
|
|
|
displayName: Discord Notification
|
|
|
|
pool:
|
2022-01-20 21:40:40 +00:00
|
|
|
vmImage: ${{ variables.linuxImage }}
|
2020-04-22 21:04:43 +00:00
|
|
|
steps:
|
2020-10-08 04:07:52 +00:00
|
|
|
- task: DownloadPipelineArtifact@2
|
2020-10-14 01:53:17 +00:00
|
|
|
continueOnError: true
|
2020-10-08 04:07:52 +00:00
|
|
|
displayName: Download Screenshot Artifact
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
|
|
|
artifactName: 'WindowsAutomationScreenshots'
|
|
|
|
targetPath: $(Build.SourcesDirectory)
|
2020-04-22 21:04:43 +00:00
|
|
|
- checkout: none
|
2021-06-26 19:35:23 +00:00
|
|
|
- pwsh: |
|
2020-04-24 20:04:28 +00:00
|
|
|
iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/Servarr/AzureDiscordNotify/master/DiscordNotify.ps1'))
|
2020-04-22 21:04:43 +00:00
|
|
|
env:
|
2020-04-24 20:04:28 +00:00
|
|
|
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
|
|
|
|
DISCORDCHANNELID: $(discordChannelId)
|
|
|
|
DISCORDWEBHOOKKEY: $(discordWebhookKey)
|
2022-10-17 04:23:13 +00:00
|
|
|
DISCORDTHREADID: $(discordThreadId)
|
2020-04-24 20:04:28 +00:00
|
|
|
|