|
|
@ -27,6 +27,10 @@ trigger:
|
|
|
|
include:
|
|
|
|
include:
|
|
|
|
- develop
|
|
|
|
- develop
|
|
|
|
- master
|
|
|
|
- master
|
|
|
|
|
|
|
|
paths:
|
|
|
|
|
|
|
|
exclude:
|
|
|
|
|
|
|
|
- .github
|
|
|
|
|
|
|
|
- src/Lidarr.Api.*/openapi.json
|
|
|
|
|
|
|
|
|
|
|
|
pr:
|
|
|
|
pr:
|
|
|
|
branches:
|
|
|
|
branches:
|
|
|
@ -34,6 +38,7 @@ pr:
|
|
|
|
- develop
|
|
|
|
- develop
|
|
|
|
paths:
|
|
|
|
paths:
|
|
|
|
exclude:
|
|
|
|
exclude:
|
|
|
|
|
|
|
|
- .github
|
|
|
|
- src/NzbDrone.Core/Localization/Core
|
|
|
|
- src/NzbDrone.Core/Localization/Core
|
|
|
|
- src/Lidarr.Api.*/openapi.json
|
|
|
|
- src/Lidarr.Api.*/openapi.json
|
|
|
|
|
|
|
|
|
|
|
@ -184,7 +189,7 @@ stages:
|
|
|
|
artifact: '$(osName)Frontend'
|
|
|
|
artifact: '$(osName)Frontend'
|
|
|
|
displayName: Publish Frontend
|
|
|
|
displayName: Publish Frontend
|
|
|
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
|
|
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
|
|
|
|
|
|
|
|
|
|
|
- stage: Installer
|
|
|
|
- stage: Installer
|
|
|
|
dependsOn:
|
|
|
|
dependsOn:
|
|
|
|
- Build_Backend
|
|
|
|
- Build_Backend
|
|
|
@ -392,6 +397,7 @@ stages:
|
|
|
|
displayName: Unit Tests
|
|
|
|
displayName: Unit Tests
|
|
|
|
dependsOn: Build_Backend
|
|
|
|
dependsOn: Build_Backend
|
|
|
|
condition: succeeded()
|
|
|
|
condition: succeeded()
|
|
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
jobs:
|
|
|
|
- job: Prepare
|
|
|
|
- job: Prepare
|
|
|
|
pool:
|
|
|
|
pool:
|
|
|
@ -459,7 +465,7 @@ stages:
|
|
|
|
- bash: |
|
|
|
|
- bash: |
|
|
|
|
chmod a+x _tests/fpcalc
|
|
|
|
chmod a+x _tests/fpcalc
|
|
|
|
displayName: Make fpcalc Executable
|
|
|
|
displayName: Make fpcalc Executable
|
|
|
|
condition: and(succeeded(), or(eq(variables['osName'], 'Mac'), eq(variables['testName'], 'linux-x64')))
|
|
|
|
condition: and(succeeded(), and(ne(variables['osName'], 'Windows'), ne(variables['poolName'], 'FreeBSD')))
|
|
|
|
- bash: find ${TESTSFOLDER} -name "Lidarr.Test.Dummy" -exec chmod a+x {} \;
|
|
|
|
- bash: find ${TESTSFOLDER} -name "Lidarr.Test.Dummy" -exec chmod a+x {} \;
|
|
|
|
displayName: Make Test Dummy Executable
|
|
|
|
displayName: Make Test Dummy Executable
|
|
|
|
condition: and(succeeded(), ne(variables['osName'], 'Windows'))
|
|
|
|
condition: and(succeeded(), ne(variables['osName'], 'Windows'))
|
|
|
@ -494,11 +500,11 @@ stages:
|
|
|
|
|
|
|
|
|
|
|
|
pool:
|
|
|
|
pool:
|
|
|
|
vmImage: ${{ variables.linuxImage }}
|
|
|
|
vmImage: ${{ variables.linuxImage }}
|
|
|
|
|
|
|
|
|
|
|
|
container: $[ variables['containerImage'] ]
|
|
|
|
container: $[ variables['containerImage'] ]
|
|
|
|
|
|
|
|
|
|
|
|
timeoutInMinutes: 10
|
|
|
|
timeoutInMinutes: 10
|
|
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
|
- task: UseDotNet@2
|
|
|
|
- task: UseDotNet@2
|
|
|
|
displayName: 'Install .NET'
|
|
|
|
displayName: 'Install .NET'
|
|
|
@ -518,9 +524,11 @@ stages:
|
|
|
|
artifactName: $(artifactName)
|
|
|
|
artifactName: $(artifactName)
|
|
|
|
targetPath: $(testsFolder)
|
|
|
|
targetPath: $(testsFolder)
|
|
|
|
- bash: |
|
|
|
|
- bash: |
|
|
|
|
find ${TESTSFOLDER} -name "Lidarr.Test.Dummy" -exec chmod a+x {} \;
|
|
|
|
|
|
|
|
chmod a+x _tests/fpcalc
|
|
|
|
chmod a+x _tests/fpcalc
|
|
|
|
displayName: Make fpcalc and Test Dummy Executable
|
|
|
|
displayName: Make fpcalc Executable
|
|
|
|
|
|
|
|
condition: and(succeeded(), ne(variables['osName'], 'Windows'))
|
|
|
|
|
|
|
|
- bash: find ${TESTSFOLDER} -name "Lidarr.Test.Dummy" -exec chmod a+x {} \;
|
|
|
|
|
|
|
|
displayName: Make Test Dummy Executable
|
|
|
|
condition: and(succeeded(), ne(variables['osName'], 'Windows'))
|
|
|
|
condition: and(succeeded(), ne(variables['osName'], 'Windows'))
|
|
|
|
- bash: |
|
|
|
|
- bash: |
|
|
|
|
chmod a+x ${TESTSFOLDER}/test.sh
|
|
|
|
chmod a+x ${TESTSFOLDER}/test.sh
|
|
|
@ -534,7 +542,7 @@ stages:
|
|
|
|
testResultsFiles: '**/TestResult.xml'
|
|
|
|
testResultsFiles: '**/TestResult.xml'
|
|
|
|
testRunTitle: '$(testName) Unit Tests'
|
|
|
|
testRunTitle: '$(testName) Unit Tests'
|
|
|
|
failTaskOnFailedTests: true
|
|
|
|
failTaskOnFailedTests: true
|
|
|
|
|
|
|
|
|
|
|
|
- job: Unit_LinuxCore_Postgres14
|
|
|
|
- job: Unit_LinuxCore_Postgres14
|
|
|
|
displayName: Unit Native LinuxCore with Postgres14 Database
|
|
|
|
displayName: Unit Native LinuxCore with Postgres14 Database
|
|
|
|
dependsOn: Prepare
|
|
|
|
dependsOn: Prepare
|
|
|
@ -551,7 +559,7 @@ stages:
|
|
|
|
vmImage: ${{ variables.linuxImage }}
|
|
|
|
vmImage: ${{ variables.linuxImage }}
|
|
|
|
|
|
|
|
|
|
|
|
timeoutInMinutes: 10
|
|
|
|
timeoutInMinutes: 10
|
|
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
|
- task: UseDotNet@2
|
|
|
|
- task: UseDotNet@2
|
|
|
|
displayName: 'Install .net core'
|
|
|
|
displayName: 'Install .net core'
|
|
|
@ -576,6 +584,7 @@ stages:
|
|
|
|
-e POSTGRES_PASSWORD=lidarr \
|
|
|
|
-e POSTGRES_PASSWORD=lidarr \
|
|
|
|
-e POSTGRES_USER=lidarr \
|
|
|
|
-e POSTGRES_USER=lidarr \
|
|
|
|
-p 5432:5432/tcp \
|
|
|
|
-p 5432:5432/tcp \
|
|
|
|
|
|
|
|
-v /usr/share/zoneinfo/America/Chicago:/etc/localtime:ro \
|
|
|
|
postgres:14
|
|
|
|
postgres:14
|
|
|
|
displayName: Start postgres
|
|
|
|
displayName: Start postgres
|
|
|
|
- bash: |
|
|
|
|
- bash: |
|
|
|
@ -602,12 +611,12 @@ stages:
|
|
|
|
Lidarr__Postgres__Port: '5432'
|
|
|
|
Lidarr__Postgres__Port: '5432'
|
|
|
|
Lidarr__Postgres__User: 'lidarr'
|
|
|
|
Lidarr__Postgres__User: 'lidarr'
|
|
|
|
Lidarr__Postgres__Password: 'lidarr'
|
|
|
|
Lidarr__Postgres__Password: 'lidarr'
|
|
|
|
|
|
|
|
|
|
|
|
pool:
|
|
|
|
pool:
|
|
|
|
vmImage: ${{ variables.linuxImage }}
|
|
|
|
vmImage: ${{ variables.linuxImage }}
|
|
|
|
|
|
|
|
|
|
|
|
timeoutInMinutes: 10
|
|
|
|
timeoutInMinutes: 10
|
|
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
|
- task: UseDotNet@2
|
|
|
|
- task: UseDotNet@2
|
|
|
|
displayName: 'Install .net core'
|
|
|
|
displayName: 'Install .net core'
|
|
|
@ -651,6 +660,7 @@ stages:
|
|
|
|
- stage: Integration
|
|
|
|
- stage: Integration
|
|
|
|
displayName: Integration
|
|
|
|
displayName: Integration
|
|
|
|
dependsOn: Packages
|
|
|
|
dependsOn: Packages
|
|
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
jobs:
|
|
|
|
- job: Prepare
|
|
|
|
- job: Prepare
|
|
|
|
pool:
|
|
|
|
pool:
|
|
|
@ -689,7 +699,7 @@ stages:
|
|
|
|
|
|
|
|
|
|
|
|
pool:
|
|
|
|
pool:
|
|
|
|
vmImage: $(imageName)
|
|
|
|
vmImage: $(imageName)
|
|
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
|
- task: UseDotNet@2
|
|
|
|
- task: UseDotNet@2
|
|
|
|
displayName: 'Install .net core'
|
|
|
|
displayName: 'Install .net core'
|
|
|
@ -711,7 +721,7 @@ stages:
|
|
|
|
targetPath: $(Build.ArtifactStagingDirectory)
|
|
|
|
targetPath: $(Build.ArtifactStagingDirectory)
|
|
|
|
- task: ExtractFiles@1
|
|
|
|
- task: ExtractFiles@1
|
|
|
|
inputs:
|
|
|
|
inputs:
|
|
|
|
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
|
|
|
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
|
|
|
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
|
|
|
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
|
|
|
displayName: Extract Package
|
|
|
|
displayName: Extract Package
|
|
|
|
- bash: |
|
|
|
|
- bash: |
|
|
|
@ -765,7 +775,7 @@ stages:
|
|
|
|
targetPath: $(Build.ArtifactStagingDirectory)
|
|
|
|
targetPath: $(Build.ArtifactStagingDirectory)
|
|
|
|
- task: ExtractFiles@1
|
|
|
|
- task: ExtractFiles@1
|
|
|
|
inputs:
|
|
|
|
inputs:
|
|
|
|
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
|
|
|
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
|
|
|
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
|
|
|
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
|
|
|
displayName: Extract Package
|
|
|
|
displayName: Extract Package
|
|
|
|
- bash: |
|
|
|
|
- bash: |
|
|
|
@ -828,7 +838,7 @@ stages:
|
|
|
|
targetPath: $(Build.ArtifactStagingDirectory)
|
|
|
|
targetPath: $(Build.ArtifactStagingDirectory)
|
|
|
|
- task: ExtractFiles@1
|
|
|
|
- task: ExtractFiles@1
|
|
|
|
inputs:
|
|
|
|
inputs:
|
|
|
|
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
|
|
|
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
|
|
|
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
|
|
|
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
|
|
|
displayName: Extract Package
|
|
|
|
displayName: Extract Package
|
|
|
|
- bash: |
|
|
|
|
- bash: |
|
|
|
@ -923,7 +933,7 @@ stages:
|
|
|
|
container: $[ variables['containerImage'] ]
|
|
|
|
container: $[ variables['containerImage'] ]
|
|
|
|
|
|
|
|
|
|
|
|
timeoutInMinutes: 15
|
|
|
|
timeoutInMinutes: 15
|
|
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
|
- task: UseDotNet@2
|
|
|
|
- task: UseDotNet@2
|
|
|
|
displayName: 'Install .NET'
|
|
|
|
displayName: 'Install .NET'
|
|
|
@ -951,7 +961,7 @@ stages:
|
|
|
|
targetPath: $(Build.ArtifactStagingDirectory)
|
|
|
|
targetPath: $(Build.ArtifactStagingDirectory)
|
|
|
|
- task: ExtractFiles@1
|
|
|
|
- task: ExtractFiles@1
|
|
|
|
inputs:
|
|
|
|
inputs:
|
|
|
|
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
|
|
|
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
|
|
|
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
|
|
|
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
|
|
|
displayName: Extract Package
|
|
|
|
displayName: Extract Package
|
|
|
|
- bash: |
|
|
|
|
- bash: |
|
|
|
@ -973,7 +983,7 @@ stages:
|
|
|
|
- stage: Automation
|
|
|
|
- stage: Automation
|
|
|
|
displayName: Automation
|
|
|
|
displayName: Automation
|
|
|
|
dependsOn: Packages
|
|
|
|
dependsOn: Packages
|
|
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
jobs:
|
|
|
|
- job: Automation
|
|
|
|
- job: Automation
|
|
|
|
strategy:
|
|
|
|
strategy:
|
|
|
@ -999,7 +1009,7 @@ stages:
|
|
|
|
|
|
|
|
|
|
|
|
pool:
|
|
|
|
pool:
|
|
|
|
vmImage: $(imageName)
|
|
|
|
vmImage: $(imageName)
|
|
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
|
- task: UseDotNet@2
|
|
|
|
- task: UseDotNet@2
|
|
|
|
displayName: 'Install .net core'
|
|
|
|
displayName: 'Install .net core'
|
|
|
@ -1021,7 +1031,7 @@ stages:
|
|
|
|
targetPath: $(Build.ArtifactStagingDirectory)
|
|
|
|
targetPath: $(Build.ArtifactStagingDirectory)
|
|
|
|
- task: ExtractFiles@1
|
|
|
|
- task: ExtractFiles@1
|
|
|
|
inputs:
|
|
|
|
inputs:
|
|
|
|
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
|
|
|
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
|
|
|
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
|
|
|
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
|
|
|
displayName: Extract Package
|
|
|
|
displayName: Extract Package
|
|
|
|
- bash: |
|
|
|
|
- bash: |
|
|
|
@ -1055,6 +1065,7 @@ stages:
|
|
|
|
dependsOn:
|
|
|
|
dependsOn:
|
|
|
|
- Setup
|
|
|
|
- Setup
|
|
|
|
displayName: Analyze
|
|
|
|
displayName: Analyze
|
|
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
jobs:
|
|
|
|
- job: Prepare
|
|
|
|
- job: Prepare
|
|
|
|
pool:
|
|
|
|
pool:
|
|
|
@ -1122,7 +1133,7 @@ stages:
|
|
|
|
cliProjectVersion: '$(lidarrVersion)'
|
|
|
|
cliProjectVersion: '$(lidarrVersion)'
|
|
|
|
cliSources: './frontend'
|
|
|
|
cliSources: './frontend'
|
|
|
|
- task: SonarCloudAnalyze@1
|
|
|
|
- task: SonarCloudAnalyze@1
|
|
|
|
|
|
|
|
|
|
|
|
- job: Api_Docs
|
|
|
|
- job: Api_Docs
|
|
|
|
displayName: API Docs
|
|
|
|
displayName: API Docs
|
|
|
|
dependsOn: Prepare
|
|
|
|
dependsOn: Prepare
|
|
|
@ -1144,7 +1155,7 @@ stages:
|
|
|
|
- checkout: self
|
|
|
|
- checkout: self
|
|
|
|
submodules: true
|
|
|
|
submodules: true
|
|
|
|
persistCredentials: true
|
|
|
|
persistCredentials: true
|
|
|
|
fetchDepth: 1
|
|
|
|
fetchDepth: 1
|
|
|
|
- bash: ./docs.sh Windows
|
|
|
|
- bash: ./docs.sh Windows
|
|
|
|
displayName: Create openapi.json
|
|
|
|
displayName: Create openapi.json
|
|
|
|
- bash: |
|
|
|
|
- bash: |
|
|
|
@ -1152,10 +1163,9 @@ stages:
|
|
|
|
git config --global user.name "Servarr"
|
|
|
|
git config --global user.name "Servarr"
|
|
|
|
git checkout -b api-docs
|
|
|
|
git checkout -b api-docs
|
|
|
|
git add .
|
|
|
|
git add .
|
|
|
|
git status
|
|
|
|
if git status | grep -q modified
|
|
|
|
if git status | grep modified
|
|
|
|
|
|
|
|
then
|
|
|
|
then
|
|
|
|
git commit -am 'Automated API Docs update [skip ci]'
|
|
|
|
git commit -am 'Automated API Docs update'
|
|
|
|
git push -f --set-upstream origin api-docs
|
|
|
|
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/lidarr/lidarr/pulls -d '{"head":"api-docs","base":"develop","title":"Update API docs"}'
|
|
|
|
curl -X POST -H "Authorization: token ${GITHUBTOKEN}" -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/lidarr/lidarr/pulls -d '{"head":"api-docs","base":"develop","title":"Update API docs"}'
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -1261,3 +1271,4 @@ stages:
|
|
|
|
DISCORDCHANNELID: $(discordChannelId)
|
|
|
|
DISCORDCHANNELID: $(discordChannelId)
|
|
|
|
DISCORDWEBHOOKKEY: $(discordWebhookKey)
|
|
|
|
DISCORDWEBHOOKKEY: $(discordWebhookKey)
|
|
|
|
DISCORDTHREADID: $(discordThreadId)
|
|
|
|
DISCORDTHREADID: $(discordThreadId)
|
|
|
|
|
|
|
|
|
|
|
|