buildkite / buildkite/agent

Preserve file permissions in artifacts

Open
#980 8 comments 9 reactions 0 assignees View on GitHub
artifacts enhancement
Dominant language
Go
Stars
1.1k
Forks
378
Avg merge
2d 6h
Merged PRs (30d)
74

Description

Uploading and downloading artifacts doesn't properly preserve file modes. Downloading executables in particular would be very useful since when moving tasks out into concurrent steps it can break build scripts to lose the executable bit. Also not great when building docker images out of the executables.

https://buildkite.com/betterteamapp/dummy-pipeline/builds/7#2db28ceb-5fd4-45db-abe9-8dbb4f1623cd is a repro of the issue. It's a dummy repro, but the key is the pipeline:

``` yaml
steps:
- command: "echo \"#/usr/bin/env bash\\necho wow\" > wow\nchmod +x wow\nbuildkite-agent artifact upload wow"

- wait

- command: "buildkite-agent artifact download \"wow\" .\nls -la\n./wow"
```

Expected: `./wow` outputs `wow`.
Actual: Build fails.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.