Applied single file publish

pull/3862/head
tidusjar 4 years ago
parent 6b668c62d6
commit 056a7b48aa

@ -5,7 +5,7 @@ steps:
displayName: 'Use .NET Core sdk ' displayName: 'Use .NET Core sdk '
inputs: inputs:
packageType: 'sdk' packageType: 'sdk'
version: '3.x' version: '5.x'
- task: Yarn@3 - task: Yarn@3
displayName: 'Install UI Dependancies' displayName: 'Install UI Dependancies'
@ -18,7 +18,7 @@ steps:
inputs: inputs:
projectDirectory: '$(UiLocation)' projectDirectory: '$(UiLocation)'
arguments: 'run build' arguments: 'run build'
- task: PublishPipelineArtifact@1 - task: PublishPipelineArtifact@1
inputs: inputs:
targetPath: '$(UiLocation)dist' targetPath: '$(UiLocation)dist'
@ -31,4 +31,4 @@ steps:
command: 'custom' command: 'custom'
projects: '$(TestProject)' projects: '$(TestProject)'
custom: 'test' custom: 'test'
continueOnError: false continueOnError: false

@ -3,7 +3,7 @@ steps:
displayName: 'Use .NET Core sdk ' displayName: 'Use .NET Core sdk '
inputs: inputs:
packageType: 'sdk' packageType: 'sdk'
version: '3.x' version: '5.x'
- task: DotNetCoreInstaller@1 - task: DotNetCoreInstaller@1
displayName: 'Use .NET Core sdk for versioning' displayName: 'Use .NET Core sdk for versioning'
@ -24,23 +24,23 @@ steps:
inputs: inputs:
command: 'publish' command: 'publish'
publishWebProjects: true publishWebProjects: true
arguments: '-c $(BuildConfiguration) -r "$(runtime)" -o $(Build.ArtifactStagingDirectory)/$(runtime)' arguments: '-c $(BuildConfiguration) -r "$(runtime)" -o $(Build.ArtifactStagingDirectory)/$(runtime)' --self-contained true -p:PublishSingleFile=true
zipAfterPublish: false zipAfterPublish: false
modifyOutputPath: false modifyOutputPath: false
- task: DownloadPipelineArtifact@2 - task: DownloadPipelineArtifact@2
inputs: inputs:
buildType: 'current' buildType: 'current'
artifactName: 'angular_dist' artifactName: 'angular_dist'
targetPath: '$(Build.ArtifactStagingDirectory)/angular_dist' targetPath: '$(Build.ArtifactStagingDirectory)/angular_dist'
- task: CopyFiles@2 - task: CopyFiles@2
displayName: 'Copy Angular App $(runtime)' displayName: 'Copy Angular App $(runtime)'
inputs: inputs:
SourceFolder: '$(Build.ArtifactStagingDirectory)/angular_dist' SourceFolder: '$(Build.ArtifactStagingDirectory)/angular_dist'
Contents: '**' Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)/$(runtime)/ClientApp/dist' TargetFolder: '$(Build.ArtifactStagingDirectory)/$(runtime)/ClientApp/dist'
- task: ArchiveFiles@2 - task: ArchiveFiles@2
displayName: 'Zip $(runtime)' displayName: 'Zip $(runtime)'
inputs: inputs:
@ -49,7 +49,7 @@ steps:
archiveType: $(compression) archiveType: $(compression)
archiveFile: '$(Build.ArtifactStagingDirectory)/$(runtime).$(format)' archiveFile: '$(Build.ArtifactStagingDirectory)/$(runtime).$(format)'
replaceExistingArchive: true replaceExistingArchive: true
- task: PublishPipelineArtifact@1 - task: PublishPipelineArtifact@1
inputs: inputs:
targetPath: '$(Build.ArtifactStagingDirectory)/$(runtime).$(format)' targetPath: '$(Build.ArtifactStagingDirectory)/$(runtime).$(format)'

@ -12,7 +12,7 @@ variables:
value: "**/*.Tests.csproj" value: "**/*.Tests.csproj"
- name: "NetCoreVersion" - name: "NetCoreVersion"
value: "3.1" value: "5.0"
- name: "PublishLocation" - name: "PublishLocation"
value: "$(Build.SourcesDirectory)/src/Ombi/bin/Release/netcoreapp$(NetCoreVersion)" value: "$(Build.SourcesDirectory)/src/Ombi/bin/Release/netcoreapp$(NetCoreVersion)"

Loading…
Cancel
Save