Skip to content

Commit ee9b047

Browse files
authored
Upload host linux artifacts as .tar.gz to preserve file permissions (#11356)
1 parent 89dbbbc commit ee9b047

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

eng/ci/templates/official/jobs/build-artifacts-linux.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ jobs:
66
project: src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj
77
configuration: release
88
runtime: linux-x64
9+
intermediate_path: $(Agent.TempDirectory)/linux_host
910
drop_path: $(Build.ArtifactStagingDirectory)
1011
linux_drop_path: $(drop_path)/linux
1112
build_args: '-v m -c $(configuration) -r $(runtime) --self-contained true'
@@ -58,4 +59,15 @@ jobs:
5859
zipAfterPublish: false # we use our own zip logic
5960
modifyOutputPath: false
6061
projects: $(project)
61-
arguments: '$(build_args) --no-build -o $(linux_drop_path)/host'
62+
arguments: '$(build_args) --no-build -o $(intermediate_path)'
63+
64+
# Pipeline artifacts do not retain file metadata and lose file permission bits.
65+
# As a workaround, we tar/gzip the files to retain the permission bits.
66+
- task: ArchiveFiles@2
67+
displayName: Archive Linux Artifacts
68+
inputs:
69+
rootFolderOrFile: $(intermediate_path)
70+
includeRootFolder: false
71+
archiveType: tar
72+
tarCompression: gz
73+
archiveFile: $(linux_drop_path)/host.linux-x64.tar.gz

0 commit comments

Comments
 (0)