CI improvements

pull/3373/head
Jamie Rees 5 years ago
parent 58dcf15501
commit 52b1284b56

@ -21,6 +21,7 @@ variables:
buildConfiguration: 'Release' buildConfiguration: 'Release'
publishLocation: '$(Build.SourcesDirectory)/src/Ombi/bin/Release/netcoreapp3.0' publishLocation: '$(Build.SourcesDirectory)/src/Ombi/bin/Release/netcoreapp3.0'
gitTag: 'v4.0.$(Build.BuildId)' gitTag: 'v4.0.$(Build.BuildId)'
uiLocation: '$(Build.SourcesDirectory)/src/Ombi/ClientApp/'
pool: pool:
vmImage: 'ubuntu-latest' vmImage: 'ubuntu-latest'
@ -29,20 +30,20 @@ steps:
- task: Yarn@3 - task: Yarn@3
displayName: 'Install UI Dependancies' displayName: 'Install UI Dependancies'
inputs: inputs:
projectDirectory: '$(Build.SourcesDirectory)/src/Ombi/ClientApp/' projectDirectory: '$(uiLocation)'
arguments: 'install' arguments: 'install'
- task: Yarn@3 - task: Yarn@3
displayName: 'Build Angular App' displayName: 'Build and Publish Angular App'
inputs: inputs:
projectDirectory: '$(Build.SourcesDirectory)/src/Ombi/ClientApp/' projectDirectory: '$(uiLocation)'
arguments: 'run build' arguments: 'run build'
#- task: DotNetCoreCLI@2 - task: DotNetCoreCLI@2
# displayName: Run Unit Tests displayName: Run Unit Tests
# inputs: inputs:
# command: 'test' command: 'test'
# projects: '**/*Tests.csproj' projects: '**/*Tests.csproj'
### Publish ### Publish
@ -56,46 +57,81 @@ steps:
modifyOutputPath: false modifyOutputPath: false
- task: CopyFiles@2 - task: CopyFiles@2
displayName: 'Publish Angular App Win10-x64' displayName: 'Copy Angular App Win10-x64'
inputs: inputs:
SourceFolder: '$(Build.SourcesDirectory)/src/Ombi/ClientApp/dist' SourceFolder: '$(uiLocation)dist'
Contents: '**' Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)/win-64/ClientApp/dist' TargetFolder: '$(Build.ArtifactStagingDirectory)/win-64/ClientApp/dist'
#- task: DotNetCoreCLI@2 - task: DotNetCoreCLI@2
# displayName: Publish Win10-x86 displayName: Publish Win10-x86
# inputs: inputs:
# command: 'publish' command: 'publish'
# publishWebProjects: true publishWebProjects: true
# arguments: '-c $(buildConfiguration) -r "win10-x86" -o $(Build.ArtifactStagingDirectory)/win-86' arguments: '-c $(buildConfiguration) -r "win10-x86" -o $(Build.ArtifactStagingDirectory)/win-86'
#- task: DotNetCoreCLI@2 - task: CopyFiles@2
# displayName: Publish OSX-x64 displayName: 'Copy Angular App Win10-x86'
# inputs: inputs:
# command: 'publish' SourceFolder: '$(uiLocation)dist'
# publishWebProjects: true Contents: '**'
# arguments: '-c $(buildConfiguration) -r "osx-x64" -o $(Build.ArtifactStagingDirectory)/osx-64' TargetFolder: '$(Build.ArtifactStagingDirectory)/win-86/ClientApp/dist'
#
#- task: DotNetCoreCLI@2 - task: DotNetCoreCLI@2
# displayName: Publish Linux-x64 displayName: Publish OSX-x64
# inputs: inputs:
# command: 'publish' command: 'publish'
# publishWebProjects: true publishWebProjects: true
# arguments: '-c $(buildConfiguration) -r "linux-x64" -o $(Build.ArtifactStagingDirectory)/linux-64' arguments: '-c $(buildConfiguration) -r "osx-x64" -o $(Build.ArtifactStagingDirectory)/osx-64'
#
#- task: DotNetCoreCLI@2 - task: CopyFiles@2
# displayName: Publish Linux-ARM displayName: 'Copy Angular App OSX-x64'
# inputs: inputs:
# command: 'publish' SourceFolder: '$(uiLocation)dist'
# publishWebProjects: true Contents: '**'
# arguments: '-c $(buildConfiguration) -r "linux-arm" -o $(Build.ArtifactStagingDirectory)/linux-arm' TargetFolder: '$(Build.ArtifactStagingDirectory)/osx-64/ClientApp/dist'
#
#- task: DotNetCoreCLI@2 - task: DotNetCoreCLI@2
# displayName: Publish Linux-ARM-x64 displayName: Publish Linux-x64
# inputs: inputs:
# command: 'publish' command: 'publish'
# publishWebProjects: true publishWebProjects: true
# arguments: '-c $(buildConfiguration) -r "linux-arm64" -o $(Build.ArtifactStagingDirectory)/linux-arm64' arguments: '-c $(buildConfiguration) -r "linux-x64" -o $(Build.ArtifactStagingDirectory)/linux-64'
- task: CopyFiles@2
displayName: 'Copy Angular App Linux-x64'
inputs:
SourceFolder: '$(uiLocation)dist'
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)/linux-64/ClientApp/dist'
- task: DotNetCoreCLI@2
displayName: Publish Linux-ARM
inputs:
command: 'publish'
publishWebProjects: true
arguments: '-c $(buildConfiguration) -r "linux-arm" -o $(Build.ArtifactStagingDirectory)/linux-arm'
- task: CopyFiles@2
displayName: 'Copy Angular App Linux-ARM'
inputs:
SourceFolder: '$(uiLocation)dist'
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)/linux-arm/ClientApp/dist'
- task: DotNetCoreCLI@2
displayName: Publish Linux-ARM-x64
inputs:
command: 'publish'
publishWebProjects: true
arguments: '-c $(buildConfiguration) -r "linux-arm64" -o $(Build.ArtifactStagingDirectory)/linux-arm64'
- task: CopyFiles@2
displayName: 'Copy Angular App Linux-ARM64'
inputs:
SourceFolder: '$(uiLocation)dist'
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)/linux-arm64/ClientApp/dist'
### Zip them up ### Zip them up
@ -108,58 +144,57 @@ steps:
archiveFile: '$(Build.ArtifactStagingDirectory)/win-x64-$(Build.BuildId).zip' archiveFile: '$(Build.ArtifactStagingDirectory)/win-x64-$(Build.BuildId).zip'
replaceExistingArchive: true replaceExistingArchive: true
#- task: ArchiveFiles@2 - task: ArchiveFiles@2
# displayName: Zip Win-x86 displayName: Zip Win-x86
# inputs: inputs:
# rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/win-86' rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/win-86'
# includeRootFolder: true includeRootFolder: true
# archiveType: 'zip' archiveType: 'zip'
# archiveFile: '$(Build.ArtifactStagingDirectory)/win-x86-$(Build.BuildId).zip' archiveFile: '$(Build.ArtifactStagingDirectory)/win-x86-$(Build.BuildId).zip'
# replaceExistingArchive: true replaceExistingArchive: true
#
#- task: ArchiveFiles@2 - task: ArchiveFiles@2
# displayName: Zip OSX-x64 displayName: Zip OSX-x64
# inputs: inputs:
# rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/osx-64' rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/osx-64'
# includeRootFolder: true includeRootFolder: true
# archiveType: 'tar' archiveType: 'tar'
# archiveFile: '$(Build.ArtifactStagingDirectory)/osx-x64-$(Build.BuildId).tar.gz' archiveFile: '$(Build.ArtifactStagingDirectory)/osx-x64-$(Build.BuildId).tar.gz'
# replaceExistingArchive: true replaceExistingArchive: true
#
#- task: ArchiveFiles@2 - task: ArchiveFiles@2
# displayName: Zip Linux-x64 displayName: Zip Linux-x64
# inputs: inputs:
# rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/linux-64' rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/linux-64'
# includeRootFolder: true includeRootFolder: true
# archiveType: 'tar' archiveType: 'tar'
# archiveFile: '$(Build.ArtifactStagingDirectory)/linux-x64-$(Build.BuildId).tar.gz' archiveFile: '$(Build.ArtifactStagingDirectory)/linux-x64-$(Build.BuildId).tar.gz'
# replaceExistingArchive: true replaceExistingArchive: true
#
#- task: ArchiveFiles@2 - task: ArchiveFiles@2
# displayName: Zip Linux-ARM displayName: Zip Linux-ARM
# inputs: inputs:
# rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/linux-arm' rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/linux-arm'
# includeRootFolder: true includeRootFolder: true
# archiveType: 'tar' archiveType: 'tar'
archiveFile: '$(Build.ArtifactStagingDirectory)/linux-arm-$(Build.BuildId).tar.gz'
# archiveFile: '$(Build.ArtifactStagingDirectory)/linux-arm-$(Build.BuildId).tar.gz' replaceExistingArchive: true
# replaceExistingArchive: true
# - task: ArchiveFiles@2
#- task: ArchiveFiles@2 displayName: Zip Linux-ARM-x64
# displayName: Zip Linux-ARM-x64 inputs:
# inputs: rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/linux-arm64'
# rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/linux-arm64' includeRootFolder: true
# includeRootFolder: true archiveType: 'tar'
# archiveType: 'tar' archiveFile: '$(Build.ArtifactStagingDirectory)/linux-arm64-$(Build.BuildId).tar.gz'
# archiveFile: '$(Build.ArtifactStagingDirectory)/linux-arm64-$(Build.BuildId).tar.gz' replaceExistingArchive: true
# replaceExistingArchive: true
- task: PublishBuildArtifacts@1
#- task: PublishBuildArtifacts@1 displayName: Publish Win 64
# displayName: Publish Win 64 inputs:
# inputs: PathtoPublish: '$(Build.ArtifactStagingDirectory)/win-x64'
# PathtoPublish: '$(Build.ArtifactStagingDirectory)/win-x64' ArtifactName: 'win-x64-$(Build.BuildId).zip'
# ArtifactName: 'win-x64-$(Build.BuildId).zip' publishLocation: 'Container'
# publishLocation: 'Container'
- task: GitHubRelease@1 - task: GitHubRelease@1
inputs: inputs:
@ -175,38 +210,3 @@ steps:
isPreRelease: true isPreRelease: true
changeLogCompareToRelease: 'lastFullRelease' changeLogCompareToRelease: 'lastFullRelease'
changeLogType: 'commitBased' changeLogType: 'commitBased'
#- task: PublishBuildArtifacts@1
# displayName: Publish Win 86
# inputs:
# PathtoPublish: '$(Build.ArtifactStagingDirectory)/win-x86-$(Build.BuildId).zip'
# ArtifactName: 'win-x86-$(Build.BuildId).zip'
# publishLocation: 'Container'
#
#- task: PublishBuildArtifacts@1
# displayName: Publish OSX 64
# inputs:
# PathtoPublish: '$(Build.ArtifactStagingDirectory)/osx-x64-$(Build.BuildId).tar.gz'
# ArtifactName: 'osx-x64-$(Build.BuildId).tar.gz'
# publishLocation: 'Container'
#
#- task: PublishBuildArtifacts@1
# displayName: Publish Linux 64
# inputs:
# PathtoPublish: '$(Build.ArtifactStagingDirectory)/linux-x64-$(Build.BuildId).tar.gz'
# ArtifactName: 'drop'
# publishLocation: 'Container'
#
#- task: PublishBuildArtifacts@1
# displayName: Publish Linux ARM
# inputs:
# PathtoPublish: '$(Build.ArtifactStagingDirectory)/linux-arm-$(Build.BuildId).tar.gz'
# ArtifactName: 'linux-arm-$(Build.BuildId).tar.gz'
# publishLocation: 'Container'
#
#- task: PublishBuildArtifacts@1
# displayName: Publish OSX 64
# inputs:
# PathtoPublish: '$(Build.ArtifactStagingDirectory)/linux-arm64-$(Build.BuildId).tar.gz'
# ArtifactName: 'linux-arm64-$(Build.BuildId).tar.gz'
# publishLocation: 'Container'
Loading…
Cancel
Save