Commit de4b15ee authored by Stan Hu's avatar Stan Hu

Fix dotenv artifacts becoming empty files in CI

This is a workaround for the bug described in
https://github.com/docker/for-linux/issues/1015.
parent 119e0195
...@@ -24,6 +24,8 @@ RSpec.describe Ci::JobArtifacts::CreateService do ...@@ -24,6 +24,8 @@ RSpec.describe Ci::JobArtifacts::CreateService do
def file_to_upload(path, params = {}) def file_to_upload(path, params = {})
upload = Tempfile.new('upload') upload = Tempfile.new('upload')
FileUtils.copy(path, upload.path) FileUtils.copy(path, upload.path)
# This is a workaround for https://github.com/docker/for-linux/issues/1015
FileUtils.touch(upload.path)
UploadedFile.new(upload.path, **params) UploadedFile.new(upload.path, **params)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment