File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,6 +59,38 @@ steps:
5959 pre: "-rv remote:/build/ccache ./ccache"
6060` ` `
6161
62+
63+ # # Ugly Hacks
64+
65+ From `man rsync`, "Rsync is a fast and extraordinarily versatile file
66+ copying tool [...] it offers a large number of options that control every
67+ aspect of its behavior and permit very flexible specification."
68+
69+ :trollface :
70+
71+ Rsync does *not* support creation of nested output directories. Create
72+ a nested output directory via repeated "no-op" copies :
73+
74+ ` ` `
75+ steps:
76+ - plugins:
77+ uw-ipd/rsync#v0.1:
78+ post:
79+ - "-Rrv --exclude=* . remote:/build/artifacts"
80+ - "-Rrv --exclude=* . remote:/build/artifacts/${BUILDKITE_BRANCH}"
81+ - "-Rrv --exclude=* . remote:/build/artifacts/${BUILDKITE_BRANCH}/${BUILDKITE_BUILD_NUMBER}"
82+ - "-Rrv bin remote:/build/artifacts/${BUILDKITE_BRANCH}/${BUILDKITE_BUILD_NUMBER}"
83+ ` ` `
84+
85+ Create a nested output directory via the "rsync-path trick" :
86+
87+ ` ` ` yml
88+ steps:
89+ - plugins:
90+ uw-ipd/rsync#v0.1:
91+ post: "--rsync-path="mkdir -p /build/artifacts/${BUILDKITE_BRANCH}/${BUILDKITE_BUILD_NUMBER} && rsync" -Rrv bin remote:/build/artifacts/${BUILDKITE_BRANCH}/${BUILDKITE_BUILD_NUMBER}"
92+ ` ` `
93+
6294# # Configuration
6395
6496# ## `pre`
Original file line number Diff line number Diff line change @@ -28,5 +28,6 @@ echo "--- rsync-ing "
2828for path in " ${paths[@]} "
2929 do
3030 # # `eval` to support step-time varibles in the command
31+ echo rsync $path
3132 eval rsync $path
3233 done
Original file line number Diff line number Diff line change @@ -28,5 +28,6 @@ echo "--- rsync-ing "
2828for path in " ${paths[@]} "
2929 do
3030 # # `eval` to support step-time varibles in the command
31+ echo rsync $path
3132 eval rsync $path
3233 done
You can’t perform that action at this time.
0 commit comments