mirror of
https://github.com/Jackett/Jackett
synced 2025-03-04 10:48:26 +00:00
ci/cd: cleanup azure pipelines (#13874)
This commit is contained in:
parent
92c711eb19
commit
761ec2b7f6
1 changed files with 51 additions and 49 deletions
|
@ -26,7 +26,7 @@ stages:
|
|||
jobs:
|
||||
- job: Build
|
||||
workspace:
|
||||
clean: outputs
|
||||
clean: all
|
||||
strategy:
|
||||
matrix:
|
||||
Windows:
|
||||
|
@ -104,8 +104,6 @@ stages:
|
|||
displayName: ${{ variables.buildDescription }}
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: false
|
||||
path: '$(framework)-$(runtime)'
|
||||
|
||||
- task: UseDotNet@2
|
||||
displayName: Install .NET Core SDK
|
||||
|
@ -114,15 +112,29 @@ stages:
|
|||
version: $(netCoreSdkVersion)
|
||||
installationPath: $(Agent.ToolsDirectory)/dotnet
|
||||
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: Build DateTimeRoutines
|
||||
# this task is not mandatory since DateTimeRoutines is build in the next task, but the purpose is to fix:
|
||||
# error MSB4018: System.IO.IOException: The process cannot access the file
|
||||
# '/home/vsts/work/1/net6.0-linux-musl-arm/src/DateTimeRoutines/bin/Release/netstandard2.0/DateTimeRoutines.deps.json'
|
||||
# because it is being used by another process.
|
||||
inputs:
|
||||
command: build
|
||||
projects: 'src/DateTimeRoutines/DateTimeRoutines.csproj'
|
||||
publishWebProjects: false
|
||||
zipAfterPublish: false
|
||||
arguments: '--configuration $(buildConfiguration) --runtime $(runtime) --framework netstandard2.0'
|
||||
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: Build Jackett Server
|
||||
retryCountOnTaskFailure: 2
|
||||
# the retries are just in case the previous task doesn't fix the error
|
||||
retryCountOnTaskFailure: 3
|
||||
inputs:
|
||||
command: publish
|
||||
projects: 'src/Jackett.Server/Jackett.Server.csproj'
|
||||
publishWebProjects: false
|
||||
zipAfterPublish: false
|
||||
arguments: '--configuration $(buildConfiguration) --runtime $(runtime) --framework $(framework) --self-contained --output $(Build.BinariesDirectory)/$(framework)-$(runtime) /p:AssemblyVersion=$(jackettVersion) /p:FileVersion=$(jackettVersion) /p:InformationalVersion=$(jackettVersion) /p:Version=$(jackettVersion)'
|
||||
arguments: '--configuration $(buildConfiguration) --runtime $(runtime) --framework $(framework) --self-contained --output $(Build.BinariesDirectory) /p:AssemblyVersion=$(jackettVersion) /p:FileVersion=$(jackettVersion) /p:InformationalVersion=$(jackettVersion) /p:Version=$(jackettVersion)'
|
||||
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: Build Jackett Updater
|
||||
|
@ -131,7 +143,7 @@ stages:
|
|||
projects: 'src/Jackett.Updater/Jackett.Updater.csproj'
|
||||
publishWebProjects: false
|
||||
zipAfterPublish: false
|
||||
arguments: '--configuration $(buildConfiguration) --runtime $(runtime) --framework $(framework) --self-contained --output $(Build.BinariesDirectory)/$(framework)-$(runtime) /p:AssemblyVersion=$(jackettVersion) /p:FileVersion=$(jackettVersion) /p:InformationalVersion=$(jackettVersion) /p:Version=$(jackettVersion)'
|
||||
arguments: '--configuration $(buildConfiguration) --runtime $(runtime) --framework $(framework) --self-contained --output $(Build.BinariesDirectory) /p:AssemblyVersion=$(jackettVersion) /p:FileVersion=$(jackettVersion) /p:InformationalVersion=$(jackettVersion) /p:Version=$(jackettVersion)'
|
||||
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: Build Jackett Tray (Windows only)
|
||||
|
@ -141,7 +153,7 @@ stages:
|
|||
projects: 'src/Jackett.Tray/Jackett.Tray.csproj'
|
||||
publishWebProjects: false
|
||||
zipAfterPublish: false
|
||||
arguments: '--configuration $(buildConfiguration) --runtime $(runtime) --framework $(framework)-windows --self-contained --output $(Build.BinariesDirectory)/$(framework)-$(runtime) /p:AssemblyVersion=$(jackettVersion) /p:FileVersion=$(jackettVersion) /p:InformationalVersion=$(jackettVersion) /p:Version=$(jackettVersion)'
|
||||
arguments: '--configuration $(buildConfiguration) --runtime $(runtime) --framework $(framework)-windows --self-contained --output $(Build.BinariesDirectory) /p:AssemblyVersion=$(jackettVersion) /p:FileVersion=$(jackettVersion) /p:InformationalVersion=$(jackettVersion) /p:Version=$(jackettVersion)'
|
||||
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: Build Jackett Service (Windows only)
|
||||
|
@ -151,50 +163,50 @@ stages:
|
|||
projects: 'src/Jackett.Service/Jackett.Service.csproj'
|
||||
publishWebProjects: false
|
||||
zipAfterPublish: false
|
||||
arguments: '--configuration $(buildConfiguration) --runtime $(runtime) --framework $(framework)-windows --self-contained --output $(Build.BinariesDirectory)/$(framework)-$(runtime) /p:AssemblyVersion=$(jackettVersion) /p:FileVersion=$(jackettVersion) /p:InformationalVersion=$(jackettVersion) /p:Version=$(jackettVersion)'
|
||||
arguments: '--configuration $(buildConfiguration) --runtime $(runtime) --framework $(framework)-windows --self-contained --output $(Build.BinariesDirectory) /p:AssemblyVersion=$(jackettVersion) /p:FileVersion=$(jackettVersion) /p:InformationalVersion=$(jackettVersion) /p:Version=$(jackettVersion)'
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: Copy Jackett Server
|
||||
inputs:
|
||||
SourceFolder: $(Build.BinariesDirectory)/$(framework)-$(runtime)/Jackett.Server
|
||||
SourceFolder: $(Build.BinariesDirectory)/Jackett.Server
|
||||
contents: '**'
|
||||
targetFolder: $(Build.BinariesDirectory)/$(framework)-$(runtime)/Jackett
|
||||
targetFolder: $(Build.BinariesDirectory)/Jackett
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: Copy Jackett Updater
|
||||
inputs:
|
||||
SourceFolder: $(Build.BinariesDirectory)/$(framework)-$(runtime)/Jackett.Updater
|
||||
SourceFolder: $(Build.BinariesDirectory)/Jackett.Updater
|
||||
contents: JackettUpdater*
|
||||
targetFolder: $(Build.BinariesDirectory)/$(framework)-$(runtime)/Jackett
|
||||
targetFolder: $(Build.BinariesDirectory)/Jackett
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: Copy Jackett Tray (Windows only)
|
||||
condition: and(succeeded(), startsWith(variables['runtime'], 'win'))
|
||||
inputs:
|
||||
SourceFolder: $(Build.BinariesDirectory)/$(framework)-$(runtime)/Jackett.Tray
|
||||
SourceFolder: $(Build.BinariesDirectory)/Jackett.Tray
|
||||
contents: |
|
||||
System.Drawing.dll
|
||||
System.Security.Cryptography.ProtectedData.dll
|
||||
WindowsBase.dll
|
||||
targetFolder: $(Build.BinariesDirectory)/$(framework)-$(runtime)/Jackett
|
||||
targetFolder: $(Build.BinariesDirectory)/Jackett
|
||||
overWrite: true
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: Copy Jackett Tray Part 2 (Windows only)
|
||||
condition: and(succeeded(), startsWith(variables['runtime'], 'win'))
|
||||
inputs:
|
||||
SourceFolder: $(Build.BinariesDirectory)/$(framework)-$(runtime)/Jackett.Tray
|
||||
SourceFolder: $(Build.BinariesDirectory)/Jackett.Tray
|
||||
contents: '*'
|
||||
targetFolder: $(Build.BinariesDirectory)/$(framework)-$(runtime)/Jackett
|
||||
targetFolder: $(Build.BinariesDirectory)/Jackett
|
||||
overWrite: false
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: Copy Jackett Service (Windows only)
|
||||
condition: and(succeeded(), startsWith(variables['runtime'], 'win'))
|
||||
inputs:
|
||||
SourceFolder: $(Build.BinariesDirectory)/$(framework)-$(runtime)/Jackett.Service
|
||||
SourceFolder: $(Build.BinariesDirectory)/Jackett.Service
|
||||
contents: JackettService*
|
||||
targetFolder: $(Build.BinariesDirectory)/$(framework)-$(runtime)/Jackett
|
||||
targetFolder: $(Build.BinariesDirectory)/Jackett
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: Copy Windows Specific Scripts (Windows only)
|
||||
|
@ -202,7 +214,7 @@ stages:
|
|||
inputs:
|
||||
SourceFolder: $(Build.SourcesDirectory)
|
||||
contents: jackett_launcher.bat
|
||||
targetFolder: $(Build.BinariesDirectory)/$(framework)-$(runtime)/Jackett
|
||||
targetFolder: $(Build.BinariesDirectory)/Jackett
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: Copy Mono Specific Scripts
|
||||
|
@ -212,7 +224,7 @@ stages:
|
|||
contents: |
|
||||
install_service_systemd_mono.sh
|
||||
Upstart.config
|
||||
targetFolder: $(Build.BinariesDirectory)/$(framework)-$(runtime)/Jackett
|
||||
targetFolder: $(Build.BinariesDirectory)/Jackett
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: Copy macOS Specific Scripts
|
||||
|
@ -222,7 +234,7 @@ stages:
|
|||
contents: |
|
||||
install_service_macos
|
||||
uninstall_jackett_macos
|
||||
targetFolder: $(Build.BinariesDirectory)/$(framework)-$(runtime)/Jackett
|
||||
targetFolder: $(Build.BinariesDirectory)/Jackett
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: Copy Linux Specific Scripts
|
||||
|
@ -232,7 +244,7 @@ stages:
|
|||
contents: |
|
||||
install_service_systemd.sh
|
||||
jackett_launcher.sh
|
||||
targetFolder: $(Build.BinariesDirectory)/$(framework)-$(runtime)/Jackett
|
||||
targetFolder: $(Build.BinariesDirectory)/Jackett
|
||||
|
||||
# There is an issue with Mono 5.8 (fixed in Mono 5.12) where its expecting to use its own patched version of
|
||||
# System.Net.Http.dll, instead of the version supplied in folder
|
||||
|
@ -246,26 +258,26 @@ stages:
|
|||
displayName: Patch Mono Build (Mono only)
|
||||
condition: and(succeeded(), startsWith(variables['buildDescription'], 'Mono'))
|
||||
inputs:
|
||||
workingDirectory: $(Build.BinariesDirectory)/$(framework)-$(runtime)/Jackett
|
||||
workingDirectory: $(Build.BinariesDirectory)/Jackett
|
||||
targetType: inline
|
||||
script: |
|
||||
$file = '$(Build.BinariesDirectory)/$(framework)-$(runtime)/Jackett/JackettConsole.exe.config'
|
||||
$file = '$(Build.BinariesDirectory)/Jackett/JackettConsole.exe.config'
|
||||
$xml = [xml] (Get-Content $file)
|
||||
$newVersion = $xml.SelectSingleNode("configuration/runtime/*[name()='assemblyBinding']/*[name()='dependentAssembly']/*[name()='assemblyIdentity'][@name='System.Net.Http']/../*[name()='bindingRedirect']/@newVersion")
|
||||
$newVersion.Value = '4.0.0.0'
|
||||
$xml.Save($file)
|
||||
Remove-Item '$(Build.BinariesDirectory)/$(framework)-$(runtime)/Jackett/System.Net.Http.dll'
|
||||
Remove-Item '$(Build.BinariesDirectory)/$(framework)-$(runtime)/Jackett/System.Runtime.InteropServices.RuntimeInformation.dll'
|
||||
Remove-Item '$(Build.BinariesDirectory)/Jackett/System.Net.Http.dll'
|
||||
Remove-Item '$(Build.BinariesDirectory)/Jackett/System.Runtime.InteropServices.RuntimeInformation.dll'
|
||||
|
||||
- task: Bash@3
|
||||
displayName: Set Folder and File Permissions (Mono, Linux and macOS)
|
||||
condition: and(succeeded(), not(startsWith(variables['runtime'], 'win')))
|
||||
inputs:
|
||||
workingDirectory: $(Build.BinariesDirectory)/$(framework)-$(runtime)/Jackett
|
||||
workingDirectory: $(Build.BinariesDirectory)/Jackett
|
||||
targetType: inline
|
||||
script: |
|
||||
chmod 755 $(find "$(Build.BinariesDirectory)/$(framework)-$(runtime)"/Jackett -type d)
|
||||
chmod 644 $(find "$(Build.BinariesDirectory)/$(framework)-$(runtime)"/Jackett -type f)
|
||||
chmod 755 $(find "$(Build.BinariesDirectory)"/Jackett -type d)
|
||||
chmod 644 $(find "$(Build.BinariesDirectory)"/Jackett -type f)
|
||||
chmod 755 jackett
|
||||
chmod 755 JackettUpdater
|
||||
if [ -f install_service_systemd_mono.sh ]; then chmod 755 install_service_systemd_mono.sh; fi
|
||||
|
@ -277,7 +289,7 @@ stages:
|
|||
- task: ArchiveFiles@2
|
||||
displayName: Compress Binaries
|
||||
inputs:
|
||||
rootFolderOrFile: $(Build.BinariesDirectory)/$(framework)-$(runtime)/Jackett
|
||||
rootFolderOrFile: $(Build.BinariesDirectory)/Jackett
|
||||
includeRootFolder: true
|
||||
archiveType: '$(archiveType)'
|
||||
tarCompression: gz
|
||||
|
@ -291,7 +303,7 @@ stages:
|
|||
iscc.exe $(Build.SourcesDirectory)/Installer.iss
|
||||
/O"$(Build.ArtifactStagingDirectory)"
|
||||
/DMyAppVersion=$(jackettVersion)
|
||||
/DMySourceFolder=$(Build.BinariesDirectory)/$(framework)-$(runtime)/Jackett
|
||||
/DMySourceFolder=$(Build.BinariesDirectory)/Jackett
|
||||
/DMyOutputFilename=Jackett.Installer.Windows
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
|
@ -307,11 +319,9 @@ stages:
|
|||
pool:
|
||||
vmImage: ubuntu-22.04
|
||||
workspace:
|
||||
clean: outputs
|
||||
clean: all
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: false
|
||||
path: lint-dotnet
|
||||
|
||||
- task: UseDotNet@2
|
||||
displayName: Install .NET Core SDK
|
||||
|
@ -342,11 +352,9 @@ stages:
|
|||
pool:
|
||||
vmImage: ubuntu-22.04
|
||||
workspace:
|
||||
clean: outputs
|
||||
clean: all
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: false
|
||||
path: lint-yaml
|
||||
|
||||
- task: UsePythonVersion@0
|
||||
displayName: Install Python
|
||||
|
@ -364,11 +372,9 @@ stages:
|
|||
pool:
|
||||
vmImage: ubuntu-22.04
|
||||
workspace:
|
||||
clean: outputs
|
||||
clean: all
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: false
|
||||
path: validate-yaml
|
||||
|
||||
- task: Bash@3
|
||||
displayName: Validate YAML Schema
|
||||
|
@ -398,7 +404,7 @@ stages:
|
|||
jobs:
|
||||
- job: UnitTest
|
||||
workspace:
|
||||
clean: outputs
|
||||
clean: all
|
||||
strategy:
|
||||
matrix:
|
||||
Windows:
|
||||
|
@ -426,8 +432,6 @@ stages:
|
|||
displayName: ${{ variables.buildDescription }}
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: false
|
||||
path: '$(framework)-$(runtime)'
|
||||
|
||||
- task: UseDotNet@2
|
||||
displayName: Install .NET Core SDK
|
||||
|
@ -444,6 +448,7 @@ stages:
|
|||
command: restore
|
||||
projects: '**/*.Test*/*.csproj'
|
||||
includeNuGetOrg: true
|
||||
restoreArguments: '--runtime $(runtime)'
|
||||
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: Unit Tests (Mono, Linux and macOS)
|
||||
|
@ -493,7 +498,7 @@ stages:
|
|||
jobs:
|
||||
- job: IntegrationTest
|
||||
workspace:
|
||||
clean: outputs
|
||||
clean: all
|
||||
strategy:
|
||||
matrix:
|
||||
Windows:
|
||||
|
@ -525,8 +530,6 @@ stages:
|
|||
displayName: ${{ variables.buildDescription }}
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: false
|
||||
path: '$(framework)-$(runtime)'
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download artifacts for integration tests
|
||||
|
@ -571,6 +574,7 @@ stages:
|
|||
command: restore
|
||||
projects: '**/*IntegrationTest*/*.csproj'
|
||||
includeNuGetOrg: true
|
||||
restoreArguments: '--runtime $(runtime)'
|
||||
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: Integration Tests (Mono, Linux and macOS)
|
||||
|
@ -599,13 +603,11 @@ stages:
|
|||
jobs:
|
||||
- job: Publish
|
||||
workspace:
|
||||
clean: outputs
|
||||
clean: all
|
||||
pool:
|
||||
vmImage: ubuntu-22.04
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: false
|
||||
path: publish
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Artifacts for Publish
|
||||
|
|
Loading…
Add table
Reference in a new issue