Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable skipping of copying build artifacts back to host. #900

Merged
merged 1 commit into from
Jul 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).

### Added

- #900 - add the option to skip copying build artifacts back to host when using remote cross via `CROSS_REMOTE_SKIP_BUILD_ARTIFACTS`.
- #891 - support custom user namespace overrides by setting the `CROSS_CONTAINER_USER_NAMESPACE` environment variable.
- #890 - support rootless docker via the `CROSS_ROOTLESS_CONTAINER_ENGINE` environment variable.

Expand Down
5 changes: 4 additions & 1 deletion src/docker/remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,10 @@ symlink_recurse \"${{prefix}}\"

// 7. copy data from our target dir back to host
// this might not exist if we ran `clean`.
if container_path_exists(engine, &container, &target_dir, msg_info)? {
let skip_artifacts = env::var("CROSS_REMOTE_SKIP_BUILD_ARTIFACTS")
.map(|s| bool_from_envvar(&s))
.unwrap_or_default();
if !skip_artifacts && container_path_exists(engine, &container, &target_dir, msg_info)? {
subcommand(engine, "cp")
.arg("-a")
.arg(&format!("{container}:{}", target_dir.as_posix()?))
Expand Down